Modify

Opened 4 years ago

Closed 4 years ago

Last modified 19 months 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 Changed 4 years ago by skyper

+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 Changed 4 years ago by Aun Johnsen <lists@…>

Cc: lists@… added

comment:3 Changed 4 years ago by mkoniecz

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 Changed 4 years ago by anonymous

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

comment:5 Changed 4 years ago by anonymous

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

comment:6 Changed 4 years ago by mdk

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 Changed 4 years ago by mkoniecz

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.

comment:8 in reply to:  5 Changed 4 years ago by Klumbumbus

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.

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

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 Changed 4 years ago by stoecker

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 Changed 4 years ago by stoecker

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

comment:12 Changed 4 years ago by Richard

Sigh.

comment:13 Changed 4 years ago by skyper

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 Changed 4 years ago by 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.

comment:15 Changed 4 years ago by mdk

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 Changed 4 years ago by stoecker

See #11405.

comment:17 in reply to:  14 ; Changed 4 years ago by 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.

comment:18 in reply to:  13 Changed 4 years ago by aceman

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.

comment:19 in reply to:  17 Changed 4 years ago by Klumbumbus

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 Changed 2 years ago by Richard

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 Changed 2 years ago by Klumbumbus

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 Changed 2 years ago by anonymous

Maybe outright block uploading continent spanning buildings?

comment:23 Changed 2 years ago by Aun Johnsen <lists@…>

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 Changed 2 years ago by muz

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

comment:25 in reply to:  24 Changed 2 years ago by anonymous

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:26 Changed 20 months ago by SomeoneElse

comment:27 Changed 19 months ago by daganzdaanda

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.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.