Multipart feature with wrong geometry

Nov 9, 2011 at 5:03 PM

Hey!

Today I wanted to convert ("Load OSM file") an OSM file that contained a multipart feature (http://www.openstreetmap.org/browse/relation/1706103). This multipart feature represents the river Rhine and is mapped as relation with inner and outer ways. No matter which OSM Editor version I used (1.1 or 2.0 beta1), the converted feature was a multipart feature out of the ways http://www.openstreetmap.org/browse/way/33000921 and http://www.openstreetmap.org/browse/way/34254230. It looks like two island. However, I expect a donut with two holes instead of two islands.

Best wishes,
Eva

Developer
Nov 9, 2011 at 6:11 PM
Edited Nov 9, 2011 at 6:12 PM

Eva,

could you please post the OSM file? I would suspect that the OSM file didn't include all the other outer ways and after running repair geometry you end up with only the two inner as the remains. If this is indeed the case then it might be a bug as the relation should have never been converted into a multi-part polygon if one of the relation members is missing from the OSM file.

- Thomas

Nov 10, 2011 at 8:04 AM
Hi Thomas,

I have checked the OSM file: All referenced ways exist. However, I haven't checked if all their nodes exist. Please find attached the OSM file and the log files of the versions 1.1 and 2.0 beta1.

Thanks,
Eva

Developer
Nov 14, 2011 at 8:48 PM

Eva,

I did take a look at the osm file and it does seem to be a bug in the code. As of right know the plan was to only allow for "homogeneous" relations, meaning either all lines or all polygons. The relation you are dealing with is a case where the outer line is a piece meal of lines forming the outer ring and the two polygons forming islands.

I'll check if the current code can be expanded to appropriately deal with this case.

- Thomas

 

Nov 15, 2011 at 7:52 AM

Many thanks!

Could you please inform me as soon as you have fixed this case and when I can test it?

Eva

Developer
Nov 19, 2011 at 12:39 AM

Eva,

the code is checked in and the section of the Rhine now comes through as a polygon with holes. You can download the code and compile locally on your machine or wait a little longer until we officially make the beta2 binaries (incl. installer) available.

- Thomas