logo separator

[mkgmap-dev] osm2mp.pl: CountryName not added to POIs

From Michael Schlenstedt schlenn at gmail.com on Fri Feb 12 16:23:30 GMT 2016

Hi,

I use osm2mp.pl (latest from https://github.com/liosha/osm2mp) to convert
from OSM to Polish format. Before converting, I use splitter to split the
big OSM file into smaller tiles.

The whole process really works fine, including routing over tiles, except
that my my map includes several different countries. That is why I cannot
use a Default Country and Default Region. Unfortunately, address search on
Nuvi does not work (Mapsource is fine) due to missing CountryName= at my
POI descriptions. This is how a POI is converted from OSM to MP:

; NodeID = 3307527863
; place = hamlet
[POI]
Data0=(27.6784496,85.2754185)
EndLevel=2
Type=0x0C00
Label=Jhwah-cha
City=Y
CityName=Jhwah-cha
RegionName=Central Development Region
[END]

As you can see CityName and RegionName are added perfectly, but
CountryName= is missing... I found this code in lib/GarminTools.pl the
following (line 50):

if ( $address->{country} ) {
#        $mp_address{country} = rename_country( $address->{country} );
        $mp_address{country} = $address->{country};
}

I think it should add the country, but it seems not to work.

This is how I invoke osm2mp:

osm2pl --default-lang en --target-lang en --translit --header id=80000358
--header name=80000358 --header FID=8000 -o 80000358.mp 80000358.osm


Anybody can help? I put my sample files to:
http://www.schlenn.net/download/temp/

Thanks,
Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20160212/f7fdea89/attachment.html>


More information about the mkgmap-dev mailing list