iD icon indicating copy to clipboard operation
iD copied to clipboard

Polygon rounding creates too many nodes

Open MichaelMontani opened this issue 4 years ago • 13 comments

When rounding closed ways on iD with the 'O' shortcut, iD creates a standard circular polygon with number of nodes that seems vary between 19 - 36. This has been causing problems in mapping, especially when newbies add many circular huts: adding 19 nodes for an hut which is 1-2 meters long adds unwanted complexity to the data causing problems with download of OSM data, especially when they are many.

On JOSM, the 'O' shortcut makes polygons circular keeping constant the number of nodes of the polygons. Shouldn't be this method be preferred instead of dropping 19 nodes each time? It is possible to validate this on JOSM, but wouldn't be better to create rounded polygons with less nodes, or keep the number of nodes constant?

Screenshot from 2021-03-10 09-37-37

MichaelMontani avatar Mar 10 '21 08:03 MichaelMontani

adding 19 nodes for an hut which is 1-2 meters long

This is perfectly fine in mapping.

causing problems with download of OSM data

Can you be more specific where and how this problem is happening?

matkoniecz avatar Mar 10 '21 11:03 matkoniecz

This is perfectly fine in mapping.

Technically fine but very bad mapping in my opinion. An hut of 1-2 meters doesn't need 19 nodes, and the same hut with way less nodes is fine as well.

Can you be more specific where and how this problem is happening?

Tens of thousands of huts like these ones are making it difficult to download the area from JOSM or for any use. We validated the area (which was previously mapped by others in https://tasks.hotosm.org/projects/10189) but would be easier if newbies wouldn't be able to create 19 nodes 1-2 meter huts simply by clicking the 'O' key in iD..

MichaelMontani avatar Mar 10 '21 16:03 MichaelMontani

This has come up before in #2061 and #3565..

bhousel avatar Mar 10 '21 16:03 bhousel

Is it about objects like https://www.openstreetmap.org/way/901270415 ? Again, looking at it - that seems 100% fine and preferable to lower accuracy.

It is not "very bad mapping".

matkoniecz avatar Mar 10 '21 17:03 matkoniecz

Checking the imagery, it seems too blurry to me to state those are totally circular huts. More nodes doesn't mean better accuracy. You can express the same information accuracy using less nodes, especially when it's not so clear they are actually circular.

MichaelMontani avatar Mar 10 '21 17:03 MichaelMontani

iD is unable to stop mapper using circles for something that is not a circle.

For "polygon rounding creates too many nodes" it is not relevant whatever specific circular geometries are represent objects circular in reality.

In the same way as iD will be unable to stop mapper mapping fake rivers or fictional cities.

matkoniecz avatar Mar 12 '21 11:03 matkoniecz

Would be great if circular objects are created with less nodes, ideally like in JOSM where the amount of nodes is based on the size of object. My reasoning is OSM rate limit. With 19 nodes + 1 way = 20 and rate limit being 1 000 changes means new user can map only 50 rounded buildings per hour the first day. That is not enough.

Patrik-Br avatar Jul 01 '25 06:07 Patrik-Br

rate limit being 1 000 changes means new user can map only 50 rounded buildings per hour the first day

are you sure that initial limit is 1000/hour? I am pretty sure it is higher

matkoniecz avatar Jul 01 '25 07:07 matkoniecz

@matkoniecz How big is the limit? I can't find any specific I saw 1000/hour on both github pull request and OSM forum discussion.

Patrik-Br avatar Jul 01 '25 08:07 Patrik-Br

My reasoning is OSM rate limit. With 19 nodes + 1 way = 20 and rate limit being 1 000 changes means new user can map only 50 rounded buildings per hour the first day. That is not enough.

even extremely degraded to 9 nodes + 1 way it raises to 100 buildings/hour, at cost of making them so bad that they need to be redrawn from scratch

matkoniecz avatar Jul 01 '25 08:07 matkoniecz

even extremely degraded to 9 nodes + 1 way it raises to 100 buildings/hour, at cost of making them so bad that they need to be redrawn from scratch

Noone is talking about such radical values. Here is a real example of two buildings. In ID Editor it takes 40 changes in JOSM it's 26. Even if there would be only these bigger buildings in JOSM it is 15 changes which in comparison to 20 with ID Editor will give you 16 more buildings (66x15 = 990) if we talk about 1 000 changes per hour. Can you tell me what is the initial limit per hour?

Image

Patrik-Br avatar Jul 01 '25 09:07 Patrik-Br

Can you tell me what is the initial limit per hour?

I have no better source than yours. I can add that at least default value seems unchanged since then: https://github.com/search?q=repo%3Aopenstreetmap%2Fopenstreetmap-website%20initial_changes_per_hour&type=code

matkoniecz avatar Jul 01 '25 10:07 matkoniecz

If an object is explicitly mapped with numerous nodes, iD will keep many nodes and may return assymetrical circle, instead of (having option to) simplify object as needed.

  1. Map 'circle' with numerous nodes. (using several slightly blurry/shadowed imagery layers to make sure it has a good 'fit'); might not be able to get enough of the circle. sometimes it has to be adjusted a bit. otherwise I understand it is redundant.
  2. Circularize the object. Still has many nodes. Sometimes returns too many too close nodes warnings for most/all nodes.
  3. Remove half the nodes +- 1. In some cases it is assymetrical in density so delete two nodes next to each other in most dense position.
  4. Circularize again. Usually circle is now symmetrical in density (though it might have uneven number of nodes).
  5. Repeat with next object.

danieldegroot2 avatar Nov 29 '25 17:11 danieldegroot2