[PATCH v1] Merge from the mp branch

The attached patch contains a merge from the mp branch and fixes lots of multipolygon issues. I have also added some more javadoc and code comments, renamed methods and variables and removed not very useful logging statements. The mp branch is no longer needed. WanMil

Hi WanMil,
The attached patch contains a merge from the mp branch and fixes lots of multipolygon issues. I have also added some more javadoc and code comments, renamed methods and variables and removed not very useful logging statements.
The mp branch is no longer needed.
I tried making the Baltic map using this version of the MP code and --generate-sea=multipolygon,no-sea-sectors I received a lot of messages like this: 2010/01/16 21:06:59 WARNING (MultiPolygonRelation): Unclosed polygons in multipolygon relation 27016: 2010/01/16 21:06:59 WARNING (MultiPolygonRelation): - way: 29411823 role: outer osm: http://www.openstreetmap.org/browse/way/29411823 2010/01/16 21:06:59 WARNING (MultiPolygonRelation): - way: 30108097 role: outer osm: http://www.openstreetmap.org/browse/way/30108097 2010/01/16 21:06:59 WARNING (MultiPolygonRelation): - way: 29413658 role: outer osm: http://www.openstreetmap.org/browse/way/29413658 and: 2010/01/16 21:07:00 SEVERE (MultiPolygonRelation): Multipolygon http://www.openstreetmap.org/browse/relation/51154 contains intersected ways 2010/01/16 21:07:00 SEVERE (MultiPolygonRelation): - http://www.openstreetmap.org/browse/way/4611686018427387987 I guess that last way (with the fake id) is some joined up coastline segments. (incidentally, there's no point in creating an OSM URL for elements with fake ids, perhaps we should spot the fake ids and output something more appropriate). Anyway, the resulting map has a few nice islands but all of the land mass that touches the edges of a tile is flooded. I tried a couple of the tiles with the old MP code and the flooding went away so I think it's the new code rather than the generate-sea code that's causing the flooding. Mark

Am 16.01.2010 22:31, schrieb Mark Burton:
Hi WanMil,
The attached patch contains a merge from the mp branch and fixes lots of multipolygon issues. I have also added some more javadoc and code comments, renamed methods and variables and removed not very useful logging statements.
The mp branch is no longer needed.
I tried making the Baltic map using this version of the MP code and --generate-sea=multipolygon,no-sea-sectors
I received a lot of messages like this:
2010/01/16 21:06:59 WARNING (MultiPolygonRelation): Unclosed polygons in multipolygon relation 27016: 2010/01/16 21:06:59 WARNING (MultiPolygonRelation): - way: 29411823 role: outer osm: http://www.openstreetmap.org/browse/way/29411823 2010/01/16 21:06:59 WARNING (MultiPolygonRelation): - way: 30108097 role: outer osm: http://www.openstreetmap.org/browse/way/30108097 2010/01/16 21:06:59 WARNING (MultiPolygonRelation): - way: 29413658 role: outer osm: http://www.openstreetmap.org/browse/way/29413658
and:
2010/01/16 21:07:00 SEVERE (MultiPolygonRelation): Multipolygon http://www.openstreetmap.org/browse/relation/51154 contains intersected ways 2010/01/16 21:07:00 SEVERE (MultiPolygonRelation): - http://www.openstreetmap.org/browse/way/4611686018427387987
I guess that last way (with the fake id) is some joined up coastline segments. (incidentally, there's no point in creating an OSM URL for elements with fake ids, perhaps we should spot the fake ids and output something more appropriate).
Anyway, the resulting map has a few nice islands but all of the land mass that touches the edges of a tile is flooded.
I tried a couple of the tiles with the old MP code and the flooding went away so I think it's the new code rather than the generate-sea code that's causing the flooding.
Mark
Mark, I will try to reproduce your errors and to improve the error messages. Which dump do you use for your Baltic map? WanMil

WanMil,
I will try to reproduce your errors and to improve the error messages.
I wasn't complaining about the quality of the messages, merely telling you that they were happening.
Which dump do you use for your Baltic map?
I grabbed it with XAPI (a mistake as it was about 2GB uncompressed) and have merged some other stuff into it. So to make life easy, I have uploaded a tile that you can try to: http://www.smartavionics.com/OSM/63240006.osm.gz That tile has land in the bottom half and a few islands. Mark

WanMil,
I will try to reproduce your errors and to improve the error messages.
I wasn't complaining about the quality of the messages, merely telling you that they were happening.
You should complain :-) Logging fake ids does not help anyone to have a look on the OSM data. The warnings you see indicate wrong OSM data (an inner way intersects an outer way) OR it indicates problems with the tiles. In any case one must have the chance to check that.
Which dump do you use for your Baltic map?
I grabbed it with XAPI (a mistake as it was about 2GB uncompressed) and have merged some other stuff into it.
So to make life easy, I have uploaded a tile that you can try to:
http://www.smartavionics.com/OSM/63240006.osm.gz
That tile has land in the bottom half and a few islands.
Mark
That's great. I will grab it now and check it tomorrow. I suppose that the problem is the autoclosing mechanism. The new multipolygon code tries to close ways by just readding the first point. I think I must add a bounding box check (if first and last point of an unclosed polygon touches the bounding box then the polygon is complemented by the bounding box - otherwise the simple algorithm is taken) WanMil

Yeah, the islands are not bad but the main land masses are all flooded. There's a lot of spurious crap when you zoom out but that (almost completely) goes away if you use the patch I posted earlier this evening. Mark
participants (2)
-
Mark Burton
-
WanMil