osm2mp.pl: OSM -> Polish format converter

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

Alright, thank you very very much!
Just one question left:
How can I remove these ugly green spots on every street
when using --road-name-pois?
I use a Garmin Vista HCx.

Someone just pointed out that mkgmap accepts --code-page=1252 and this also solves my abbreviated text problem in MobileXT :stuck_out_tongue:

Still doesn’t work. Sorry, can’t help it.
With this it’s even worse than without any --utf8 or --codepage,
because I don’t get “Teststraße” like it should be, I get “Test.?.straße”
without any --utf8 or --codepage I get “Teststra?e”.
Argh, dammit.

My problem was solved with the following options in mkgmap, you should try them too

--code-page=1252 --utf8 --lower-case

There’s also a new --translit switch in osm2mp.pl that you can try

If I use --lower-case I only get the capital letters,
if I use the other additional things you wrote, I get
“Teststra?e” again.

I was now able to create the correct file.mp,
when I open it I finally see the German letters.
But how can I convert it now with mkgmap?
What command do I have to insert?
Tried:
–code-page=1252
–codepage=1252
–codepage1252
–code-page=850
–codepage=850
–codepage850
–utf8
–latin2

With all of these additional commands a “Ã?Ÿ” becomes a “I??” now! :frowning:

Also I noticed now, that the output file is bigger, when I put --utf8
behind the --route.

Hum, I think the best would be, if someone being able to show German letters on his GPS device
would post the ceontent of the .bat files of osm2mp and mkgmap here.
I hope the problem will be solved then and I won’t have to bother anyone here anymore.

Can anyone explain how to make this program work?
I made a bat file containing:
osm2mp.pl G:\GPS\osm2mp_v065\map.osm > file31.mp

The output (file31.mp) is empty (0 kB).
The source file path is correct (and 5MB).

Is there any place where one could actually see all the ?

Hi, I am having trouble using osm2mp_v065. When I try to convert the the osm file to mp I am having the following error:

Code In Terminal:
perl osm2mp.pl default.osm > file.mp

Error:

Can’t locate Template.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.0 /usr/local/share/perl/5.10.0 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at osm2mp.pl line 88.
BEGIN failed–compilation aborted at osm2mp.pl line 88.

I am using Ubuntu 9.04. Any one has an idea what to do?