Krakonos / merkaartor-oldbugs

0 stars 0 forks source link

Merge areas doesn't work with multipolygons (redmine import 3099, Toby Speight, created 08/17/2010) #74

Open Krakonos opened 9 years ago

Krakonos commented 9 years ago

I'd like to merge areas from OS VectorMap District, but joining areas is only offered for simple polygons. I think multipolygons should be supported. The algorithm is simple: put all the members (with roles) into the first multi, and add the simple polygons with role=outer. Then merge all "outer" and merge all "inner" using the simple polygon algorithm. It's just a little tedious to do manually...

Krakonos commented 9 years ago

Thanks for the suggestion. This is something that I've been meaning to fix but haven't had the incentive until now.

Your algorithm unfortunately wouldn't work with polygons which aren't already multipolygons that would produce an inner area if joined properly (e.g. 3 by 3 grid of squares without the middle one), but it would certainly be an improvement over the current capabilities.

Chris: any chance of being able to assign this bug to me?

CheersJames    
Krakonos commented 9 years ago

Assigned to set to James HoganMy pleasure ;-)

Krakonos commented 9 years ago

I've just discovered it's worse than that - I've just discovered in the OS data of Loch Maree, a part of it that is 'outer' in its own context, but 'inner' for the whole multipolygon...

Krakonos commented 9 years ago

Thinking further about my Loch Maree case, it's not as bad as I thought - it's roughly equivalent to the current case where the areas to be joined meet on two segments, creating a hole (imagine two horseshoe-shaped pieces facing each other). I discovered one of these whilst importing OS OpenData (the tile boundary went right through the island); the current implementation isn't quite right!