Hi Marko / everybody, On Wed, Jul 6, 2011 at 1:18 PM, Ben Konrath <b...@bagu.org> wrote: [snip] > On Wed, Jul 6, 2011 at 9:15 AM, Marko Mäkelä <marko.mak...@iki.fi> wrote: [snip] >> Isn't it a bit redundant to add access=yes to ways? Usually, you would >> add access restrictions. I would say that this is a problem in the map >> data. > > This is a good point. Looking at the taginfo: > > http://taginfo.openstreetmap.org/keys/?key=access#values > > 'access = yes' is definitely being and it seems to be a valid > tag/value pair according the wiki. I think it would be a good idea to > remove the 'access = yes' from the OSM data. Perhaps we could remove > this tag/value pair when mkgmap is reading in the data? That way all > of the ways will be "normalized" to mean 'access = yes' if no access > tag is present. And then we could keep 'add access = no' for the > cycleways which would give the correct behaviour. I can see that my > 'set access = no' with overwrite other types of access like 'access = > destination' so it's not a good way forward. Thoughts? I'd be happy to > make the patch.
A proposed patch to solve this issue is attached. Comments are appreciated. Thanks, Ben
diff --git a/src/uk/me/parabola/mkgmap/reader/osm/HighwayHooks.java b/src/uk/me/parabola/mkgmap/reader/osm/HighwayHooks.java index 8627f26..9859807 100644 --- a/src/uk/me/parabola/mkgmap/reader/osm/HighwayHooks.java +++ b/src/uk/me/parabola/mkgmap/reader/osm/HighwayHooks.java @@ -167,6 +167,14 @@ public class HighwayHooks extends OsmReadingHooksAdaptor { } public void onAddWay(Way way) { + // always ignore 'access = yes' because no access tag has this meaning + // see this thread for more info: + // http://www.mkgmap.org.uk/pipermail/mkgmap-dev/2011q3/011884.html + String access = way.getTag("access"); + if (access != null && "yes".equals(access)) { + way.deleteTag("access"); + } + String highway = way.getTag("highway"); if (highway != null || "ferry".equals(way.getTag("route"))) { boolean oneway = way.isBoolTag("oneway");
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev