osm2mp.pl: OSM -> Polish format converter

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?

http://wiki.openstreetmap.org/wiki/Osm2mp

10x very much. it worked.

Hi all!

I’ve updated osm2mp, current version is 0.7 :sunglasses:
http://garminmapsearch.com/osm/osm2mp_v070.zip

  • added address search capability
  • updated turn restriction processing
  • basic coastline processing
  • many improvements and fixes

Address search works only for streets this time (not for house numbers).
Cities should have bound ways tagged “place=city/town” and “place_name=…”, like these:
http://openstreetmap.org/browse/way/30350510
http://openstreetmap.org/browse/way/25706594

Some screenshots:

Hello

I am having issue with always getting empty .mp file.

I run osm2mp.pl file.osm > file.mp

This is what I get:

Processing file file.osm

Loading nodes… 103746 loaded, 419 POIs dumped
Loading relations… 7 multipolygons, 0 turn restrictions
Loading cities… 20 loaded
Processing ways… 13462 roads and 0 coastlines loaded
145 lines and 33 polygons dumped
Merging roads… 386 merged
Detecting road nodes… 26070 found
Detecting duplicates… 72 segments, 11 roads
Splitting roads… 245 self-intersections, 3 long roads
Fixing close nodes… 41 pairs fixed
Writing roads… 13324 written
Writing restrictions… 0 written
All done!!

I creates file.mp but it has 0 size. What could be the issue?

thanks

Hi Liosha,

I have a little issue with roads and railroads, when they use the same nodes. Only the railways are generated.
Do you have an idea how to solve it?

Thanks and best regards,
Sockeye

Sockeye,
Do you have one way tagged highway=…, railway=… or two different ways?

liosha

I do not map myself. I just create the maps for Magellan users.

This issue uccurs when one Way is tagged with multiple values. The road on the image above is tagged in the following way:

  <way id="9584322" visible="true" timestamp="2009-03-16T21:59:04Z" version="6" changeset="819593" user="BiIbo" uid="3516">
    <nd ref="25681709"/>
    <nd ref="25682189"/>
    <nd ref="308532399"/>
    <nd ref="361218579"/>
    <nd ref="308532398"/>
    <nd ref="21262900"/>
    <nd ref="25664661"/>
    <tag k="name" v="Delnická"/>
    <tag k="highway" v="residential"/>
    <tag k="railway" v="tram"/>
  </way>

There are many roads with a centerline Tram, which are tagged this way.

Best regards,
Sockeye

this time only one object in .mp can be created for one way. in your case: road OR rails.
type is selected according to “type priority” in poly.cfg

highway         residential             r       0x06,2          0       1       2,0,0,0,0,0,0,0,0,0,0,0
                                                    ^^^
railway         tram                    l       0x14            0       1

many thanks liosha,

I now know how I can influence it. I prefer the roads…:slight_smile:

BR
Sockeye