OpenStreetMap Forum

The Free Wiki World Map

You are not logged in.

#51 2009-02-05 19:06:01

liosha
Member
From: Moscow
Registered: 2008-03-04
Posts: 8,446
Website

Re: osm2mp.pl: OSM -> Polish format converter

cdavila,
it's a problem of osm2mp - this time it can't process restrictions on splitted roads.
hope i'll fix it soon  smile

Offline

#52 2009-02-05 19:38:10

cdavila
Member
Registered: 2009-02-05
Posts: 6

Re: osm2mp.pl: OSM -> Polish format converter

liosha wrote:

it's a problem of osm2mp - this time it can't process restrictions on splitted roads.
hope i'll fix it soon  smile

OK, let's wait
Thanks

Offline

#53 2009-02-06 15:36:16

weolvi
Member
Registered: 2008-12-17
Posts: 26

Re: osm2mp.pl: OSM -> Polish format converter

Some experiences
Ok, so I also tried to put up a chain to produce some maps for the first time. But it was neither easy nor successful -- most likely depending on the tools used. Here's what I experienced; maybe somebody has some good ideas for improvement:

* Using "osm2mp --bbox ..." didn't work for me on europe.osm as osm2mp first loads all nodes into memory and fails after about 8 million because I have only 1GB. Ok, so I have to first make tiles that are slightly larger and then let osm2mp do its job.

* Tried "osmosis --bb completeWays=yes" to include every polygon that has at least one node inside the bbox but this is so slow that it's just unusable.:( Then I tried just some ordinary but 0.1° larger bbox'es and that worked OK. But who knows what that 0.1° should really be?

* Then I wanted to compile and test my new maps with mkgmap. Compilation worked and I can see all tiles on my Garmin. Routing works but not across tile borders.:( Is it possible that mkgmap is not yet able to use the links provided by osm2mp?

Offline

#54 2009-02-06 15:42:09

weolvi
Member
Registered: 2008-12-17
Posts: 26

Re: osm2mp.pl: OSM -> Polish format converter

Lambertus wrote:

/me is going to implement an automated chain this weekend smile

Just in case you succeed -- could you please make a complete set of maps of Europe? I am still using Radomir's, but they are getting outdated and France is broken (at least on my machine).

Offline

#55 2009-02-06 16:12:21

Lambertus
Administrator
From: Apeldoorn (NL)
Registered: 2007-03-17
Posts: 3,269
Website

Re: osm2mp.pl: OSM -> Polish format converter

weolvi wrote:

Some experiences* Using "osm2mp --bbox ..." didn't work for me on europe.osm as osm2mp first loads all nodes into memory and fails after about 8 million because I have only 1GB. Ok, so I have to first make tiles that are slightly larger and then let osm2mp do its job.

I planned to use the tilesplitter application.

* Tried "osmosis --bb completeWays=yes" to include every polygon that has at least one node inside the bbox but this is so slow that it's just unusable.:( Then I tried just some ordinary but 0.1° larger bbox'es and that worked OK. But who knows what that 0.1° should really be?

Osmosis' completeways function is borked smile

* Then I wanted to compile and test my new maps with mkgmap. Compilation worked and I can see all tiles on my Garmin. Routing works but not across tile borders.:( Is it possible that mkgmap is not yet able to use the links provided by osm2mp?

That is very possible. Perhaps the author of Mkgmap just needs to be informed of the mechanism osm2mp is using.


Mapping tools: Garmin GPSmap 60CSx, Giant Terrago 2002

Offline

#56 2009-02-06 16:30:06

liosha
Member
From: Moscow
Registered: 2008-03-04
Posts: 8,446
Website

Re: osm2mp.pl: OSM -> Polish format converter

Lambertus wrote:

Perhaps the author of Mkgmap just needs to be informed of the mechanism osm2mp is using.

osm2mp is using standard cgpsmapper's mechanism:

NodX=point_index,NodeID,bound

Point_index: Index of the point in line definition. Starting point has index 0
NodeID: Index of virtual routing point – NodeID
Bound:
0  normal NodeID definition
1  bound point NodeID definition – this point will be used as entry/exit point of the map – connection to other separate IMG files

Bound attribute defines Entry/Exit points of single IMG file – if no NodeID point with such
attribute is defined in the map – there is no way device can enter / exit the map. Typically
every road crossing borders of the map, at the border, shall have NodeID point with this
attribute set to ‘1’.

see manual for details: http://cgpsmapper.com/manual.htm

Offline

#57 2009-02-06 17:03:02

nyem
Member
Registered: 2007-08-02
Posts: 20

Re: osm2mp.pl: OSM -> Polish format converter

Great stuff, liosha. Routing across tiles really work, and POI indexing also work.

Just a minor error on line 279 of osm2mp.pl

          $poicountry = $country        if ($region);

maybe what you meant was

          $poicountry = $country        if ($country);

Offline

#58 2009-02-07 21:52:37

Unmapped
Member
Registered: 2009-02-07
Posts: 5

Re: osm2mp.pl: OSM -> Polish format converter

Ok, here is my way of a fully automatic process of downloading osm, creating a routable mp and then img and sending it to the Garmin device. And the osm, mp, and img file will be stored in a separate folder. Probably experts will find some problems in the maps created this way. So, I'm open for critics, as I want to learn of these. (I have just started dealing with this a few days ago.)

Part I: Required software:
download
- groundtruth
- mkgmap
- osm2mp
- sendmap
- activeperl
(14 MB for the first four plus 82 MB for Perl.)

activeperl needs to be installed, the other software can just be unzipped. To have the batch file at the end of this post running right away, create a folder with a name like "MapManager" (anywhere on your HD) In this folder create subfolders
- GroundTruth
- MKGMap
- OSM2MP
- Sendmap
- MAPS
and unzip the programs to their corresponding folder.

Part II: Completing Perl (description for Windows, on other systems this works differently)
- Go to C:\Perl\bin
- Start ppm.bat
- select template-toolkit for adding
- add template-toolkit to your perl installation

Part III: Choosing a part of the world map
- go to www.openstreetmap.org
- select a viewport you want to end up on your Garmin
- click Permalink on the lower right of the page
- select the URL and press Ctrl-C

Part IV: modifying the batch file.
In "MapManager" create a batch file "ManageMaps.bat" that looks like

-------------
set NAME=Chicago
md MAPS\%NAME%
GroundTruth\groundtruth getdata -bu="http://www.openstreetmap.org/?lat=41.785&lon=-87.766&zoom=9&layers=B000FTF"
copy output.osm MAPS\%NAME%\%NAME%.osm
del output.osm
cd OSM2MP
osm2mp.pl ..\MAPS\%NAME%\%NAME%.osm > ..\MAPS\%NAME%\%NAME%.mp
cd ..\MKGMap
java -jar mkgmap.jar --route ..\MAPS\%NAME%\%NAME%.mp
cd ..
copy MKGMap\63240001.img MAPS\%NAME%\%NAME%.img
del MKGMap\63240001.img
Sendmap\sendmap20 MAPS\%NAME%\%NAME%.img
echo DONE
pause
---------------

Modify the first line with a name describing your openstreetmap view and the third line via Ctrl-v with the corresponding URL. Save "ManageMaps.bat" and start it with a double click in the explorer. If you have your Garmin connected you can return after some time (that of course depends on the size of the map), and if there is "DONE" at the bottom of the cmd window, you can unplug your device and enjoy the map. ANyway, your map will be placed in MapManager\MAPS\NAME, where "NAME" is the value of the NAME variable in the first line of "ManageMaps.bat".

Offline

#59 2009-02-07 22:24:09

mtrax
Member
From: Canberra, Australia
Registered: 2008-05-20
Posts: 103

Re: osm2mp.pl: OSM -> Polish format converter

perhaps you can paste this into the wiki page?

Offline

#60 2009-02-07 22:32:19

Unmapped
Member
Registered: 2009-02-07
Posts: 5

Re: osm2mp.pl: OSM -> Polish format converter

It's fine, if someone does this, who knows better, where best to place it.

Offline

#61 2009-02-08 03:38:48

mtrax
Member
From: Canberra, Australia
Registered: 2008-05-20
Posts: 103

Re: osm2mp.pl: OSM -> Polish format converter

you could either create a new page and link to it from :  http://wiki.openstreetmap.org/wiki/Routable_garmin_maps
or just add to the current page.

Offline

#62 2009-02-08 08:03:07

liosha
Member
From: Moscow
Registered: 2008-03-04
Posts: 8,446
Website

Re: 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

Offline

#63 2009-02-08 10:05:54

nyem
Member
Registered: 2007-08-02
Posts: 20

Re: osm2mp.pl: OSM -> Polish format converter

Unmapped wrote:

Ok, here is my way of a fully automatic process of downloading osm, creating a routable mp and then img and sending it to the Garmin device.

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

liosha wrote:

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

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

Offline

#64 2009-02-08 18:52:44

cdavila
Member
Registered: 2009-02-05
Posts: 6

Re: osm2mp.pl: OSM -> Polish format converter

nyem wrote:

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/mkgm … bject.html

Offline

#65 2009-02-08 19:17:15

liosha
Member
From: Moscow
Registered: 2008-03-04
Posts: 8,446
Website

Re: osm2mp.pl: OSM -> Polish format converter

nyem wrote:

Maybe if you can create POI for roads we'll then be able to search for street addresses as well ;)

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).

Offline

#66 2009-02-08 20:45:02

Unmapped
Member
Registered: 2009-02-07
Posts: 5

Re: osm2mp.pl: OSM -> Polish format converter

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".

Offline

#67 2009-02-08 23:50:16

cdavila
Member
Registered: 2009-02-05
Posts: 6

Re: osm2mp.pl: OSM -> Polish format converter

Unmapped wrote:

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?"

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.

Offline

#68 2009-02-11 04:10:30

nyem
Member
Registered: 2007-08-02
Posts: 20

Re: osm2mp.pl: OSM -> Polish format converter

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.

Offline

#69 2009-02-11 21:28:05

cdavila
Member
Registered: 2009-02-05
Posts: 6

Re: osm2mp.pl: OSM -> Polish format converter

nyem wrote:

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)

Offline

#70 2009-02-12 17:35:45

cdavila
Member
Registered: 2009-02-05
Posts: 6

Re: osm2mp.pl: OSM -> Polish format converter

liosha wrote:

it's a problem of osm2mp - this time it can't process restrictions on splitted roads.
hope i'll fix it soon  smile

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?

Offline

#71 2009-02-13 07:57:07

liosha
Member
From: Moscow
Registered: 2008-03-04
Posts: 8,446
Website

Re: osm2mp.pl: OSM -> Polish format converter

cdavila,
it's strange...
there must be an 'ERROR:' message in somewhere in mp-file

Offline

#72 2009-02-13 22:10:14

KaChing_Cacher
Member
Registered: 2008-12-29
Posts: 744

Re: osm2mp.pl: OSM -> Polish format converter

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?

Last edited by KaChing_Cacher (2009-02-13 22:19:27)

Offline

#73 2009-02-14 06:12:50

liosha
Member
From: Moscow
Registered: 2008-03-04
Posts: 8,446
Website

Re: osm2mp.pl: OSM -> Polish format converter

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?

Last edited by liosha (2009-02-14 07:04:54)

Offline

#74 2009-02-14 14:08:36

KaChing_Cacher
Member
Registered: 2008-12-29
Posts: 744

Re: osm2mp.pl: OSM -> Polish format converter

Oops, I didn't install these packages. Shame on me... big_smile
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.

Last edited by KaChing_Cacher (2009-02-14 14:13:34)

Offline

#75 2009-02-14 14:12:43

liosha
Member
From: Moscow
Registered: 2008-03-04
Posts: 8,446
Website

Re: osm2mp.pl: OSM -> Polish format converter

KaChing_Cacher,
use osm2mp with "--codepage 1252" option

Offline

Board footer

Powered by FluxBB