
Thanks Ben for the hints with the boundary files. It looks like they are published weekly on the site you linked to. I modify my build script to download them when they change: wget -N --user-agent="www.theeggeadventure.com" http://osm2.pleiades.uni-wuppertal.de/sea/latest/sea.zip wget -N --user-agent="www.theeggeadventure.com" http://osm2.pleiades.uni-wuppertal.de/bounds/latest/bounds.zip <http://osm2.pleiades.uni-wuppertal.de/bounds/latest/bounds.zip> The NYC addresses are working well. I have a minor correction as follows: Index: resources/styles/default/inc/address =================================================================== --- resources/styles/default/inc/address (revision 3342) +++ resources/styles/default/inc/address (working copy) @@ -66,8 +66,11 @@ # New York City has different admin levels than the rest of the US. # https://wiki.openstreetmap.org/wiki/United_States_admin_level mkgmap:country=USA & mkgmap:city!=* & mkgmap:admin_level5='New York City' & mkgmap:admin_level6='New York County' { set mkgmap:city='New York' } -mkgmap:country=USA & mkgmap:city!=* & mkgmap:admin_level5='New York City' & mkgmap:admin_level6='Bronx County' { set mkgmap:city='The Bronx' } +mkgmap:country=USA & mkgmap:city!=* & mkgmap:admin_level5='New York City' & mkgmap:admin_level6='Bronx County' { set mkgmap:city='Bronx' } mkgmap:country=USA & mkgmap:city!=* & mkgmap:admin_level5='New York City' & mkgmap:admin_level6='Kings County' { set mkgmap:city='Brooklyn' } +# Queens uses neighborhoods for city in postal addresses +# http://en.wikipedia.org/wiki/List_of_Queens_neighborhoods +mkgmap:country=USA & mkgmap:city!=* & mkgmap:admin_level5='New York City' & mkgmap:admin_level6='Queens County' & mkgmap:admin_level8=* { set mkgmap:city='${mkgmap:admin_level8}' } mkgmap:country=USA & mkgmap:city!=* & mkgmap:admin_level5='New York City' & mkgmap:admin_level6='Queens County' { set mkgmap:city='Queens' } mkgmap:country=USA & mkgmap:city!=* & mkgmap:admin_level5='New York City' & mkgmap:admin_level6='Richmond County' { set mkgmap:city='Staten Island' } mkgmap:country=USA & mkgmap:city!=* & mkgmap:admin_level8=* { set mkgmap:city='${mkgmap:admin_level8|subst:City of }’ } One always says ‘The Bronx’, but in addresses is it’s simply Bronx. For Queens, the neighborhood is used in mailing addresses, though sometimes people will use ‘Queens’ instead. If you look up "40-01 43 AVENUE” www.usps.com <http://www.usps.com/>, it says the standardized address is: 4001 43RD AVE SUNNYSIDE NY 11104-3205 But, the school board <http://schools.nyc.gov/SchoolPortals/30/Q150/default.htm> lists it’s address as: 40-01 43 AVENUE QUEENS, NY11104 While the school itself <https://sites.google.com/site/ps150queens/> says it’s address is: 40-01 43 Avenue Sunnyside, NY 11104 If I’m given an address, most likely it will have the neighborhood in it, and not ‘Queens’. Here’s an alternative patch to pick up place_name: Index: src/uk/me/parabola/mkgmap/build/LocatorUtil.java =================================================================== --- src/uk/me/parabola/mkgmap/build/LocatorUtil.java (revision 3342) +++ src/uk/me/parabola/mkgmap/build/LocatorUtil.java (working copy) @@ -28,7 +28,7 @@ .compile("[,\\s]+"); public static List<String> getNameTags(Properties props) { - String nameTagProp = props.getProperty("name-tag-list", "name"); + String nameTagProp = props.getProperty("name-tag-list", "name,place_name"); return Arrays.asList(COMMA_OR_SPACE_PATTERN.split(nameTagProp)); } Can we reduce the logging from the RuleFileReader by default? It produces a huge amount of output which probably isn’t useful unless you are debugging the rule reader. Index: src/uk/me/parabola/mkgmap/osmstyle/RuleFileReader.java =================================================================== --- src/uk/me/parabola/mkgmap/osmstyle/RuleFileReader.java (revision 3342) +++ src/uk/me/parabola/mkgmap/osmstyle/RuleFileReader.java (working copy) @@ -243,7 +243,7 @@ * from the expression. */ private void saveRule(TokenScanner scanner, Op op, ActionList actions, GType gt) { - log.info("EXP", op, ", type=", gt); + log.debug("EXP", op, ", type=", gt); // check if the type definition is allowed if (inFinalizeSection && gt != null) Here’s a bit friendlier documentation: Index: src/uk/me/parabola/mkgmap/osmstyle/StyledConverter.java =================================================================== --- src/uk/me/parabola/mkgmap/osmstyle/StyledConverter.java (revision 3342) +++ src/uk/me/parabola/mkgmap/osmstyle/StyledConverter.java (working copy) @@ -926,7 +926,10 @@ } else { mp = new MapPoint(); - log.warn("Motorway exit", node.getName(), "(" + node.getLocation().toOSMURL() + ") has no motorway! (either make the exit share a node with the motorway or specify the motorway ref with a", Exit.TAG_ROAD_REF, "tag)"); + // This may be caused by a motorway node connecting to two motorway links and no motorway + log.warn("Motorway exit", node.getName(), "(" , node.toBrowseURL(), + ") has no motorway! (either make the exit share a node with the motorway or specify the motorway ref with a", + Exit.TAG_ROAD_REF, "tag)"); } } else { Note - it an enhancement would be to see if the motorway_link is connected to another motorway_link, and attempt to follow the links back the motorway. Standardize the URL: Index: src/uk/me/parabola/mkgmap/reader/osm/Element.java =================================================================== --- src/uk/me/parabola/mkgmap/reader/osm/Element.java (revision 3342) +++ src/uk/me/parabola/mkgmap/reader/osm/Element.java (working copy) @@ -251,7 +251,7 @@ } public String toBrowseURL() { - return "http://www.openstreetmap.org/browse/" + kind() + "/" + id; + return "http://www.openstreetmap.org/" + kind() + "/" + id; } public Element copy() { Brian

On Thu, Nov 6, 2014 at 12:13 AM, Brian Egge <brianegge@gmail.com> wrote:
public static List<String> getNameTags(Properties props) { - String nameTagProp = props.getProperty("name-tag-list", "name"); + String nameTagProp = props.getProperty("name-tag-list", "name,place_name");
place_name is a key that should be fixed in OSM itself: http://wiki.openstreetmap.org/wiki/Proposed_features/drop_recommendation_for...

I agree it should be fixed in OSM. I recently submitted a patch to JOSM to flag this in the validation. https://josm.openstreetmap.de/ticket/10693 There are still about 25,000 objects with place_name in them: https://taginfo.openstreetmap.org/keys/place_name That's too many for me to fix, and I'm not keen on trying to do a mass tag change. Since this tag is widely used for cities, I'd like for mkgmap to read it in. On Wed Nov 05 2014 at 9:45:37 PM Nelson A. de Oliveira <naoliv@gmail.com> wrote:
On Thu, Nov 6, 2014 at 12:13 AM, Brian Egge <brianegge@gmail.com> wrote:
public static List<String> getNameTags(Properties props) { - String nameTagProp = props.getProperty("name-tag-list", "name"); + String nameTagProp = props.getProperty("name-tag-list", "name,place_name");
place_name is a key that should be fixed in OSM itself: http://wiki.openstreetmap.org/wiki/Proposed_features/drop_ recommendation_for_place_name _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Brian, Thanks for the feedback. On Thu, Nov 6, 2014 at 3:13 AM, Brian Egge <brianegge@gmail.com> wrote: <snip>
The NYC addresses are working well. I have a minor correction as follows:
Index: resources/styles/default/inc/address =================================================================== --- resources/styles/default/inc/address (revision 3342) +++ resources/styles/default/inc/address (working copy) @@ -66,8 +66,11 @@ # New York City has different admin levels than the rest of the US. # https://wiki.openstreetmap.org/wiki/United_States_admin_level mkgmap:country=USA & mkgmap:city!=* & mkgmap:admin_level5='New York City' & mkgmap:admin_level6='New York County' { set mkgmap:city='New York' } -mkgmap:country=USA & mkgmap:city!=* & mkgmap:admin_level5='New York City' & mkgmap:admin_level6='Bronx County' { set mkgmap:city='The Bronx' } +mkgmap:country=USA & mkgmap:city!=* & mkgmap:admin_level5='New York City' & mkgmap:admin_level6='Bronx County' { set mkgmap:city='Bronx' } mkgmap:country=USA & mkgmap:city!=* & mkgmap:admin_level5='New York City' & mkgmap:admin_level6='Kings County' { set mkgmap:city='Brooklyn' } +# Queens uses neighborhoods for city in postal addresses +# http://en.wikipedia.org/wiki/List_of_Queens_neighborhoods +mkgmap:country=USA & mkgmap:city!=* & mkgmap:admin_level5='New York City' & mkgmap:admin_level6='Queens County' & mkgmap:admin_level8=* { set mkgmap:city='${mkgmap:admin_level8}' } mkgmap:country=USA & mkgmap:city!=* & mkgmap:admin_level5='New York City' & mkgmap:admin_level6='Queens County' { set mkgmap:city='Queens' } mkgmap:country=USA & mkgmap:city!=* & mkgmap:admin_level5='New York City' & mkgmap:admin_level6='Richmond County' { set mkgmap:city='Staten Island' } mkgmap:country=USA & mkgmap:city!=* & mkgmap:admin_level8=* { set mkgmap:city='${mkgmap:admin_level8|subst:City of }’ }
One always says ‘The Bronx’, but in addresses is it’s simply Bronx. For Queens, the neighborhood is used in mailing addresses, though sometimes people will use ‘Queens’ instead. If you look up "40-01 43 AVENUE” www.usps.com, it says the standardized address is: 4001 43RD AVE SUNNYSIDE NY 11104-3205
But, the school board <http://schools.nyc.gov/SchoolPortals/30/Q150/default.htm> lists it’s address as: 40-01 43 AVENUE QUEENS, NY11104
While the school itself <https://sites.google.com/site/ps150queens/> says it’s address is: 40-01 43 Avenue Sunnyside, NY 11104
If I’m given an address, most likely it will have the neighborhood in it, and not ‘Queens’.
I briefly looked into this as well and you are correct. Good catch, thanks. @Gerd (or other mkgmap developers): Can you update the address rules for NYC with Brian's patch. Thanks. Here’s an alternative patch to pick up place_name:
Index: src/uk/me/parabola/mkgmap/build/LocatorUtil.java =================================================================== --- src/uk/me/parabola/mkgmap/build/LocatorUtil.java (revision 3342) +++ src/uk/me/parabola/mkgmap/build/LocatorUtil.java (working copy) @@ -28,7 +28,7 @@ .compile("[,\\s]+");
public static List<String> getNameTags(Properties props) { - String nameTagProp = props.getProperty("name-tag-list", "name"); + String nameTagProp = props.getProperty("name-tag-list", "name,place_name"); return Arrays.asList(COMMA_OR_SPACE_PATTERN.split(nameTagProp)); }
I think it makes sense to have this in mkgmap. Personally I prefer the patch which displays a warning message so that I can include it in the list of warnings to fix on my website. But I guess the mkgmap developers are in the best position to decide which is best. If this solution is chosen, a comment would be useful - maybe just indicate that 'place_name' is only included for compatibility with an old tag. Perhaps place_name would be removed in the future when it's no longer in OSM. Your other patches seem ok to me but I'm probably not the best person to review them. :) Thanks again for this work. Ben

Hi, I've committed three of five patches. 1) I think there is no need to change the default for option name-tag-list from "name" to "name,place_name", but I would not mind to do it. 2) Reg. the patch for RuleFileReader: I leave that to Steve or WanMil. I think it can be configured in the logging.properties as well. Gerd Date: Mon, 10 Nov 2014 14:11:21 +0100 From: ben@bagu.org To: mkgmap-dev@lists.mkgmap.org.uk Subject: Re: [mkgmap-dev] patches Hi Brian, Thanks for the feedback. On Thu, Nov 6, 2014 at 3:13 AM, Brian Egge <brianegge@gmail.com> wrote: <snip> The NYC addresses are working well. I have a minor correction as follows: Index: resources/styles/default/inc/address===================================================================--- resources/styles/default/inc/address (revision 3342)+++ resources/styles/default/inc/address (working copy)@@ -66,8 +66,11 @@ # New York City has different admin levels than the rest of the US. # https://wiki.openstreetmap.org/wiki/United_States_admin_level mkgmap:country=USA & mkgmap:city!=* & mkgmap:admin_level5='New York City' & mkgmap:admin_level6='New York County' { set mkgmap:city='New York' }-mkgmap:country=USA & mkgmap:city!=* & mkgmap:admin_level5='New York City' & mkgmap:admin_level6='Bronx County' { set mkgmap:city='The Bronx' }+mkgmap:country=USA & mkgmap:city!=* & mkgmap:admin_level5='New York City' & mkgmap:admin_level6='Bronx County' { set mkgmap:city='Bronx' } mkgmap:country=USA & mkgmap:city!=* & mkgmap:admin_level5='New York City' & mkgmap:admin_level6='Kings County' { set mkgmap:city='Brooklyn' }+# Queens uses neighborhoods for city in postal addresses+# http://en.wikipedia.org/wiki/List_of_Queens_neighborhoods+mkgmap:country=USA & mkgmap:city!=* & mkgmap:admin_level5='New York City' & mkgmap:admin_level6='Queens County' & mkgmap:admin_level8=* { set mkgmap:city='${mkgmap:admin_level8}' } mkgmap:country=USA & mkgmap:city!=* & mkgmap:admin_level5='New York City' & mkgmap:admin_level6='Queens County' { set mkgmap:city='Queens' } mkgmap:country=USA & mkgmap:city!=* & mkgmap:admin_level5='New York City' & mkgmap:admin_level6='Richmond County' { set mkgmap:city='Staten Island' } mkgmap:country=USA & mkgmap:city!=* & mkgmap:admin_level8=* { set mkgmap:city='${mkgmap:admin_level8|subst:City of }’ } One always says ‘The Bronx’, but in addresses is it’s simply Bronx. For Queens, the neighborhood is used in mailing addresses, though sometimes people will use ‘Queens’ instead. If you look up "40-01 43 AVENUE” www.usps.com, it says the standardized address is:4001 43RD AVE SUNNYSIDE NY 11104-3205 But, the school board lists it’s address as:40-01 43 AVENUE QUEENS, NY11104 While the school itself says it’s address is:40-01 43 Avenue Sunnyside, NY 11104 If I’m given an address, most likely it will have the neighborhood in it, and not ‘Queens’. I briefly looked into this as well and you are correct. Good catch, thanks. @Gerd (or other mkgmap developers): Can you update the address rules for NYC with Brian's patch. Thanks. Here’s an alternative patch to pick up place_name:Index: src/uk/me/parabola/mkgmap/build/LocatorUtil.java===================================================================--- src/uk/me/parabola/mkgmap/build/LocatorUtil.java (revision 3342)+++ src/uk/me/parabola/mkgmap/build/LocatorUtil.java (working copy)@@ -28,7 +28,7 @@ .compile("[,\\s]+"); public static List<String> getNameTags(Properties props) {- String nameTagProp = props.getProperty("name-tag-list", "name");+ String nameTagProp = props.getProperty("name-tag-list", "name,place_name"); return Arrays.asList(COMMA_OR_SPACE_PATTERN.split(nameTagProp)); } I think it makes sense to have this in mkgmap. Personally I prefer the patch which displays a warning message so that I can include it in the list of warnings to fix on my website. But I guess the mkgmap developers are in the best position to decide which is best. If this solution is chosen, a comment would be useful - maybe just indicate that 'place_name' is only included for compatibility with an old tag. Perhaps place_name would be removed in the future when it's no longer in OSM. Your other patches seem ok to me but I'm probably not the best person to review them. :) Thanks again for this work. Ben _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
participants (5)
-
Ben Konrath
-
Brian Egge
-
Gerd Petermann
-
Nelson A. de Oliveira
-
Steve Ratcliffe