Modify

Opened 9 years ago

Closed 9 years ago

Last modified 7 years ago

#11215 closed defect (othersoftware)

Prevent silly geometries

Reported by: Richard Owned by: team
Priority: normal Milestone:
Component: Core Version:
Keywords: Cc: lists@…

Description

How to break the rendering servers for four days:

  1. Download some data
  2. Zoom out
  3. Move node several continents to the east
  4. Upload
  5. Giggle as each affected tile takes 68 seconds to render and the servers catch fire

Real-world example: http://www.openstreetmap.org/node/1262267499/history

Reproduced: http://www.openstreetmap.org/node/244893390/history

Possible fixes:

  1. <polyglot>Entirely disable node-moving functionality in JOSM and force users to use a proper editor</polyglot>
  2. Squawk very loudly if the user tries to upload a segment longer than (n) metres

Attachments (0)

Change History (27)

comment:1 by skyper, 9 years ago

+1

  • is there any use-case to move a node around over kilometres ?
    • a direct warning might be useful
  • huge segments are either data we do not want (aerial imagery cover) or data with a complete low resolution where you have to hunt the nodes to find the object to download.
    • validator warning

comment:2 by Aun Johnsen <lists@…>, 9 years ago

Cc: lists@… added

comment:3 by mkoniecz, 9 years ago

In case of massive movements (like in this example) it would be a good idea to not only warn in validator but completely refuse to upload a changeset.

As demonstrated such edits may cause massive damage.

comment:4 by anonymous, 9 years ago

Another example: https://www.openstreetmap.org/changeset/30558325 - this time the result was flooding the world with a lovely brown colour.

comment:5 by anonymous, 9 years ago

I would recommend concentrating not on the act of moving a node, but instead on the size of resulting geometries.

comment:6 by mdk, 9 years ago

As far as I can see, we have actually no long segments (connection between 2 nodes longer than about 0.3 degrees) on the whole planet:
http://tools.geofabrik.de/osmi/?view=geometry&lon=28.24807&lat=44.57954&zoom=4&overlays=ways_with_long_segments,long_segments

I think it would be ok to show an error (not even a warning) in validator, if segment is to long.

How long should be the accepted maximum length?
Should we offer an automatic fix by adding additional nodes in the segment?

comment:7 by mkoniecz, 9 years ago

Should we offer an automatic fix by adding additional nodes in the segment?

No. That is not a proper reaction to adding continent-sized buildings.

in reply to:  5 comment:8 by Klumbumbus, 9 years ago

Replying to anonymous:

I would recommend concentrating not on the act of moving a node, but instead on the size of resulting geometries.

But if we check the node move distance, you would also get a warning, if you accidentely move a way (e.g. a street) a long distance. This would not automatically result in a silly geometry.

in reply to:  4 comment:9 by Klumbumbus, 9 years ago

Replying to anonymous:

Another example: https://www.openstreetmap.org/changeset/30558325 - this time the result was flooding the world with a lovely brown colour.

related german forum thread: http://forum.openstreetmap.org/viewtopic.php?id=30938

comment:10 by stoecker, 9 years ago

Resolution: othersoftware
Status: newclosed

Actually I'm not convinced of that. JOSM already sometimes is a nagging software. Validator and many checks can prevent the fun of mapping a lot. We have checks for serious issues, like the many node moves, but these have been added because there were many serious troubles with these in the past. These floods are no serious trouble for me, as they happen very seldom. Actually for me this is more an issue with the renderers - They simply should flag these silly geometries for fixing instead of rendering them.

I will not allow that we try to prevent every possible error a user makes. Risking the fun and the usefulness only because 1 mapper out of many hundred thousands makes an bigger error every few months and the render tools are to dumb to catch it is not a good reason to me. They got the water flooding under control, they also will solve the building floods.

So: Report it to mapnik or the carto style (in case postgis requests can be changed to ignore such stuff).

comment:11 by stoecker, 9 years ago

P.S. A warning level validator check "Very Large Geometry" could be acceptable if someone want to make one.

comment:12 by Richard, 9 years ago

Sigh.

comment:13 by skyper, 9 years ago

In fact, I am much more annoyed about the 20+ moving warning, but I have the option to suppress it and I have to admit that it did prevent errors in the past.

Wonder how often you intensionally want to move a node some kilometres. I remember only on occasion in my mapping career when a shop mapped as node did move to a different location.

comment:14 by Klumbumbus, 9 years ago

I don't understand about which warning you are talking about. I do not get a warning if I move half of a town 50 kilometers away and then click on upload.

comment:15 by mdk, 9 years ago

I think the original post is about moving a node, which is part of a way, a long distance where other nodes of the way stay untouched. The problem is the resulting geometry with long segments. But I didn't know a simple way to accidentally move a node with JOSM a long distance, so I wouldn't add a warning in this case.

But I think a validator warning about long segments would make sense. As I mention before OSM Inspector warns about segments longer than 0.3 degrees.

comment:16 by stoecker, 9 years ago

See #11405.

in reply to:  14 ; comment:17 by aceman, 9 years ago

Replying to Klumbumbus:

I don't understand about which warning you are talking about. I do not get a warning if I move half of a town 50 kilometers away and then click on upload.

Yes, there is a warning if you move about 20+ nodes at once by some distance. Unless you permanently disabled it.

in reply to:  13 comment:18 by aceman, 9 years ago

Replying to skyper:

Wonder how often you intensionally want to move a node some kilometres. I remember only on occasion in my mapping career when a shop mapped as node did move to a different location.

Then even better. Why are you opposing a warning that you will never see to annoy you? :) Only the 1 in 100000 user will get it and it may prevent him to make the error being discussed here.

in reply to:  17 comment:19 by Klumbumbus, 9 years ago

Replying to aceman:

Replying to Klumbumbus:

I don't understand about which warning you are talking about. I do not get a warning if I move half of a town 50 kilometers away and then click on upload.

Yes, there is a warning if you move about 20+ nodes at once by some distance. Unless you permanently disabled it.

Ah, right. It is a direct popup. I thougt it is a validator warning.

comment:20 by Richard, 7 years ago

And again: https://www.openstreetmap.org/changeset/43343413

You could of course say that this could be fixed at the server level, and in theory it could. But it would seem to me that it would be kind for the JOSM developers to prevent this given that the coding would be much, much simpler at the JOSM level. Thank you for being good OSM citizens. :)

comment:21 by Klumbumbus, 7 years ago

We have now a long segment warning (#11405) and a too large building warning (which was even raised to error level in r11049). Both warn about such a building like in changeset/43343413. It seems the user ignored both :(

comment:22 by anonymous, 7 years ago

Maybe outright block uploading continent spanning buildings?

comment:23 by Aun Johnsen <lists@…>, 7 years ago

Hope you mean continents

Though I see valid reasons for certain objects to span between continents, there is no reason for such objects not to have a series of nodes in between. Just an example is undersea cables between the continents. 2 reasons why such objects have nodes in between:
1) It is no clear rule in the database what kind of straight line is between two nodes, straight lines when observed on the ground generally take the form of either one of "rhumb line", "great circle", or "UTM straight line", which are different from each other.
2) Very few objects keep a completely straight line covering kilometers.

comment:24 by muz, 7 years ago

I would be nice to warn users when moving nodes over large distances, like josm warns for ways :)

in reply to:  24 comment:25 by anonymous, 7 years ago

Replying to muz:

I would be nice to warn users when moving nodes over large distances, like josm warns for ways :)

s/I/It

comment:27 by daganzdaanda, 7 years ago

IMHO we need two checks:

The first, similar to the "move 20+ nodes" warning, should show up just after a node was moved more than, let's say, a kilometer. In my opinion, in the rare instance that you really want to move many nodes for a long way, it's acceptable to have to click away a nag-screen. But usually these things are mistakes, and then people will be happy to undo them.

And the second check should be before upload, because sometimes the node was actually not moved by the user, but by some hiccup that either happens with the API or the database or maybe JOSM. In case the issue happens with the API/database, I don't believe JOSM can really check for it, though?
See the node from the last example: http://www.openstreetmap.org/node/5009482079/history
This was created 2 months ago in the middle of Zambia, then version 2 suddenly appeared as a restaurant in Vienna. I'm sure that the very experienced mapper (62k edits) would have noticed if he had dragged a node from Zambia to re-use it in Vienna. So I guess this is some data error, maybe an existing ID gets re-used?? Could JOSM check this, or would such a error only happen after the upload on the servers?

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.