Overlapping Polygons

Hi,

I’ve recently come across some new data giving accurate boundaries for some large parks. Problem is, the data is huge with tens of thousands of nodes. To make the polygons a little more compact, I can simplify the way in JOSM. However, when two touching boundaries are simplified, they don’t always simplify in the exact same manner. This causes overlapping of the two polygons. Some of the overlaps are bigger than others, and they don’t look great.

What’s the standard procedure for dealing with this? Is simplifying the way the wrong approach? If I were to use the full data set, it wouldn’t cause an issue and the polygons would agree. Is there another way to merge these polygons without going node by node?

I’m also curious if simplifying the way, which significantly cuts down the data resolution, is appropriate? Is the full resolution data more desirable (even if the amount of data is way larger)?

Thanks!

Can you give us the position vie OSM URL for such an example?

Then we can evaluate better and give a statement.

And in my personal opinion: simplifying way elements is a quite sensible topic, it depends on each unique case.

This blog posting also came in my mind:
https://www.openstreetmap.org/user/bdiscoe/diary/37473

I assume that “sensible” should have been “sensitive”.

I would say that any simplification should be done on the shared boundary section not on the the individual boundary.

I think you may be able to use relations to construct a polygon from multiple polylines, but I haven’t done so.

Hi, here’s one such problem:
http://www.openstreetmap.org/#map=19/51.16526/-115.26993

Note the size of the Don Getty Wildland Provincial Park and the Bow Valley Wildland Provincial Park - they are both huge. (Ignore the issues with the overlap from Banff National Park to the west - this will be fixed once we reach a conclusion here. It’s old data.)

Simplifying the ways brings down some of the polygons from say 18,000 nodes to about 1,000 nodes. It’s much more reasonable to handle, but the loss in data resolution is significant at a close scale.

Fixing the nodes one-by-one would be a monumental task given the number of shared boundaries on areas that I have yet to add.

Thanks for any suggestions!

The way I’d do it is to use multipolygon relations for both parks. For the shared portion of the boundaries, use a single way and add it as a member of both park multipolygon relations. This sharing eliminates any overlap. Also, by using a relation, you can keep the higher resolution data and split the outer way(s) into chunks of less than 2000 nodes (that’s the limit for a way).

That seems reasonable, thanks.
So you would use the high res data and split it up a 20,000 node polygon into 10 or 11 ways rather than using the simplify function? That doesn’t affect rendering or capacity or anything like that?

It would depend on the resolution of the data. For example, if there are so many nodes that you have one node every metre or less, then you should probably simplify it because it’s overkill. For very large areas like the provincial parks in question, 20000 nodes may be an appropriate level of detail, but I’d have to see the data myself to say for sure.

BTW, you can control how much simplification the command performs. In JOSM, go to Edit > Preferences and scroll down to the last section on the left (“Advanced Preferences”). Locate or search for “simplify-way.max-error”. If you find the default of 3m is simplifying too much, you can try reducing this number.

Just looking at a couple at random:

9,000 nodes, 170 km (18 m/node)
12,000 nodes, 202 km (17 m/node)
12,000 nodes, 755 km (63 m/node)

I gather these are probably a reasonable resolution without simplification, no?