logo separator

[mkgmap-dev] patches

From Ben Konrath ben at bagu.org on Mon Nov 10 13:11:21 GMT 2014

Hi Brian,

Thanks for the feedback.

On Thu, Nov 6, 2014 at 3:13 AM, Brian Egge <brianegge at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20141110/354ac148/attachment.html>


More information about the mkgmap-dev mailing list