[mkgmap-dev] mkgmap dropping ways on multipolygon boundary "outer"
From Felix Hartmann extremecarver at googlemail.com on Sun Dec 27 21:53:30 GMT 2009
On 27.12.2009 22:33, Mark Burton wrote: > Festive greetings Felix, > > >> Have a look here, wherever the boundaries use the same way as the ways, >> the ways get dropped, even if not rendering the boundaries at all >> (removing any reference to boundary from the style-file). >> >> Is this maybe a geofabrik error, or some error in mkgmap multipolygon >> handling? I have noticed many (all that I checked) mkgmap maps suffer >> from missing roads in this example. (anyhow I don't render boundaries >> >admin_level=6) >> >> http://www.openstreetmap.org/?lat=48.03113&lon=16.88459&zoom=16&layers=B000FTF >> >> Seems to be a bug in the Multipolygon Code. >> > Perhaps it's the same issue as I mentioned yesterday (outer ways in > multipolygons are trashed by the process of generating the polygon). I > suggested that we should duplicate() the outer ways to preserve their > original use. As it stands, if a way is referenced in some multipolygon > its tags are wiped out so it will not work as the original author of > the way intended. > > Cheers, > > Mark > > diff --git a/src/uk/me/parabola/mkgmap/reader/osm/xml/Osm5XmlHandler.java b/src/uk/me/parabola/mkgmap/reader/osm/xml/Osm5XmlHandler.java > index acc5cf9..fbb1d57 100644 > --- a/src/uk/me/parabola/mkgmap/reader/osm/xml/Osm5XmlHandler.java > +++ b/src/uk/me/parabola/mkgmap/reader/osm/xml/Osm5XmlHandler.java > @@ -266,10 +266,12 @@ class Osm5XmlHandler extends DefaultHandler { > private void startInRelation(String qName, Attributes attributes) { > if (qName.equals("member")) { > long id = idVal(attributes.getValue("ref")); > - Element el; > + Element el = null; > String type = attributes.getValue("type"); > - if ("way".equals(type)){ > - el = wayMap.get(id); > + if ("way".equals(type)) { > + Way way = wayMap.get(id); > + if(way != null) > + el = way.duplicate(); > } else if ("node".equals(type)) { > el = nodeMap.get(id); > if(el == null) { > > _______________________________________________ > mkgmap-dev mailing list > mkgmap-dev at lists.mkgmap.org.uk > http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev > Thanks for that patch... It does remove the bug, but all relations seem to get dropped by using this patch too. So not an ideal solution -:) BTW before using this patch, relations like cycleroutes would even show up when all ways were dropped due to multipolygon outer...
- Previous message: [mkgmap-dev] mkgmap dropping ways on multipolygon boundary "outer"
- Next message: [mkgmap-dev] mkgmap dropping ways on multipolygon boundary "outer"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the mkgmap-dev mailing list