osm2mp.pl: OSM -> Polish format converter

Version 0.65
http://gpsmapsearch.com/osm/osm2mp_v065.zip

  • added bbox cropping
  • added POI addresses
  • reimplemented turn restrictions - now both types (no_* and only_*) are supported
  • minor fixes

I then use ezMS to install in mapsource so that I can test the map’s routability before sending it to my gps device.

POI addresses and turn restrictions doesn’t yet work with mkgmap, looks great when compiled at mapcenter2 though. Maybe if you can create POI for roads we’ll then be able to search for street addresses as well :wink:

mkgmap can already create POI for roads. Use option --road-name-pois and you’ll get them in your map.
There’s also a patch for POI addresses, take a look at “POI Address support, Country Region autofill” thread in mkgmap mailing list: http://www.mkgmap.org.uk/pipermail/mkgmap-dev/2009q1/subject.html

afaik you don’t need POI for roads to be able to search for street addresses.
cgpsmapper can produce search index for streets (and i think mapcenter too).

Ok, I’ve posted it to the wiki. Personally I’m interested in the issue “Any additional options that will improve the result anyway? Any options that will improve it in some cases?”

In principle, it would be simple to write a GUI for all of this, for those users, who surrender upon mere talking of “.bat”.

I think generation of map with mkgmap could be improved with some options. This is the full command I usually use:
java -enableassertions -jar mkgmap.jar --route --utf8 --description=“OpenStreetMap-Cáceres” --gmapsupp --country-name=ESPAÑA --country-abbr=ESP --region-name=EXTREMADURA --region-abbr=EX --family-name=“Open Street Map” --net --road-name-pois
Why?
-enableassertions: mkgmap is less likely to create a buggy map if you run it with assertions (java -enableassertions -jar mkgmap.jar), it will crash instead.
–utf8: enables non ASCII characters for languages other than English
–description: any description for the map to identify it.
–gmapsupp: This creates also a combined map (GMAPSUPP.IMG) from supplied .osm file. Combined maps can be copied directly to GPS devices that support mass storage mode.
–country-name: your country name
–country-abbr: your country name abbreviation
–family-name: if you omit this your map will be named ‘family name’
–net: Enables the creation of the NET section. With this option enabled the garmin device is able to lock on roads. Some devices also display the current street in the status bar.
–road-name-pois: it creates a poi for each highway in the map, thus enabling searches of streets using Spell feature of garmin devices.
Additionally, -Xmx may be necessary if map is quite big to avoid memory problems. -Xmx256M will assign 256 MB of memory for the process.

cdavila ,
My map generated by mkgmap has a problem with abbreviated POI/street names on MobileXT. Any option that’ll correct this? No such problem when compiled with mapcenter2.

I’m not an expert on mkgmap. More details would be necessary about the problem. You can ask in mkgmap mailing list or the author of this feature (markb at ordern dot com)

Using v0.65 all but one restriction in my map is processed, but now no information about that one is in the output. How can I know which restriction is giving problems?

cdavila,
it’s strange…
there must be an ‘ERROR:’ message in somewhere in mp-file

Sry for my newbie problem:
I always get an empty (0 KB) file.mp.
I wrote the following code into start.bat

osm2mp.pl file.osm > file.mp

What am I doing wrong?

KaChing_Cacher,
do you have Perl installed?
did you installed required packages (Template-toolkit and Getopt::Long)?
have you prepared .osm file and named it ‘file.osm’?
what do you see on screen after running start.bat?

Oops, I didn’t install these packages. Shame on me… :smiley:
Do I have to install Getopt::Long? Because it also works without it.

I created a map now, but the German letters like “ä, ö, ü, ß” are all replaced by a “?”.
I used --utf8 like cdavila said but had no success.

/Edit: Also tried it with --latin2, no better results.

KaChing_Cacher,
use osm2mp with “–codepage 1252” option

“Could not open file: 1252” …
I also used --road-name-pois, but how can I remove these ugly green points on the displayed map now?
I use a Garmin Vista HCx.

You might be interested in Do-It-Yourself Up-To-Date Routable & Topographic Maps : http://wiki.openstreetmap.org/wiki/Talk:Topographic_maps_for_garmin_devices#Do-It-Yourself_Up-To-Date_Routable_.26_Topographic_Maps

Yeah, that looks quite interesting,
but isn’t there a different way to create a map with which
you can navigate directly to certain addresses with housenumbers,
and which supports these German letters?

I’m not sure, but I think house numbers are not part of the OSM data, so you cannot do this with anything derived from openstreetmap.org. There is an option to add all streets as POIs, which makes it possible to navigate street to street. You need to find the housenumber youself then.
Other option: Let yourself be routed by google maps or reiseplanung.de, if you prefer something originally German and transfer the route to your Garmin device, either submitting it directly in the device or defining a route using software from the Landesvermessungsamt and uploading it to the device.

Umlauts are processed with -codepage 850 resp. -utf8 options.

Yes, housnumbers are part of the OSM data!
But there’s still the problem with the “ä/ö/ü/ß” (Umaluts)!
-utf8 shows no effect and with -codepage 850 it says “File 850 could not be found.”
In which programs do I have to insert the -utf8/-codepage 850?
In osm2mp and in mkgmap? I did it!

osm2mp.pl --codepage 850
mkgmap --utf8