Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

deny 0 length segments #58

Closed
openstreetmap-trac opened this issue Jul 23, 2021 · 2 comments
Closed

deny 0 length segments #58

openstreetmap-trac opened this issue Jul 23, 2021 · 2 comments

Comments

@openstreetmap-trac
Copy link

Reporter: steve[at]fractalus.com
[Submitted to the original trac issue database at 2.51pm, Monday, 14th November 2005]

The applet and API should check for segments where node_a==node_b

@openstreetmap-trac
Copy link
Author

Author: nickblack1[at]gmail.com
[Added to the original trac issue at 9.14am, Wednesday, 17th January 2007]

I've adapted my local version of the applet so that you cannot delete a node that is joined to a segment. This stops 0 length segs, but also means it isnt possible to delete existing 0 length segs. Would this be better controlled by the server?

@openstreetmap-trac
Copy link
Author

Author: Sebastian[at]SSpaeth.de
[Added to the original trac issue at 11.09am, Monday, 14th May 2007]

root/sites/rails_port/app/controllers/segment_controller.rb
View revision: Revision 2864

7 def create
...
18 if segment.from_node == segment.to_node
19 render :nothing => true, :status => HTTP_EXPECTATION_FAILED
20 return
21 end

The API does check if the segment has the same start and end node. I guess 0 length is still possible if both nodes have exactly the same position, but that is probably not even an error. As the Server deals with that now, clients cannot create them by accident anymore. Closing this bug. Please reopen if this does not satisfy the original bug report.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant