Hi all!
Iāve updated osm2mp in svn.
Now it supports maxspeed and access=private
Hi all!
Iāve updated osm2mp in svn.
Now it supports maxspeed and access=private
Do you mean you add new nodes to the way where it crosses the edge and tag those as āgarmin:is_external_node=trueā, or do you tag the nearest existing nodes to the edge that way? If it is the 2nd option, how does the Garmin know which route nodes connect to each other?
Iām looking at osmcut currently to do the job. Osmcut already knows which ways cross a tile edge so adding some more functions to enable routing shouldnāt be very difficult.
Yes, the new nodes should be right at the edge of the tile.
Ok, should the node have the same id in both tiles?
Ok, should the node have the same id in both tiles?
Doesnāt have to be the same id. Hereās an example (in polish format) of a way that extends to another tile. The most important thing is that the coordinates should match up, and it is exactly at the edge of the tile.
Tile 1
[POLYLINE]
Type=0x01
EndLevel=4
Label=~[0x04]E2 NSE
DirIndicator=1
Data0=(3.0391936,101.7062182), ā¦ (2.6274582,102)
RoadID=1299
RouteParams=6,4,1,0,0,0,0,0,0,0,0,0
Nod0=0,1046,0
Nod1=
ā¦
Nod16=224,2649,1
[END]
Tile 2
[POLYLINE]
Type=0x01
EndLevel=4
Label=~[0x04]E2 NSE
DirIndicator=1
Data0=(2.6274582,102), ā¦ (2.1308003,102.7412188)
RoadID=285
RouteParams=6,4,1,0,0,0,0,0,0,0,0,0
Nod0=0,1143,1
Nod1=56,462,0
Nod2=97,754,0
Nod3=215,375,0
Nod4=223,769,0
[END]
Some info from Rottweiller Auto-Routing guide (via http://cgpsmapper.com/route.htm))
**Routing across tiles. **If you are connecting several maps, or have split a larger map into smaller pieces (tiles), make sure that the nodes where the connections are to take place ACTUALLY will connect (by right clicking each connecting node, select Node Properties, and ensure that ĆāThis node is routing graph nodeĆā is checked. ThatĆās all (except if you intent to provide turn restrictions at a certain intersection, in which case you can add those to each connecting node as well). The rest will be completed automatically.
The current (most recent versions of GPSMapEdit and cGPSMapper do a splendid job of linking maps Ćā BUTĆā¦ there is one very important caution Ćā irregular-shaped map tiles (individual maps) MAY not link correctly. While I am not certain of the reason, this may be a function of the ĆābackgroundsĆā that cGPSMapper automatically adds to each tile during processing.
All of the above are if we are using the gpsmapedit method. It seems that maproute can detect and join the matching nodes automatically, which I think is the best way to work with irregular-shaped maps.
Saved by the bell for me
http://www.mkgmap.org.uk/page/tile-splitter
Now only Mkgmap needs to be adapted to set the correct edge routing information.
The following is a copy from the IRC talk about this, contains some additional info:
[12:44] Lambertus: ping
[13:31] stever: pong
[13:31] hi
[13:31] i saw your low-key splitter announcement great!
[13:32] ha!
[13:32] have you tried it
[13:32] i was just started to work on adapting osmcut to do something similar, but iām glad youāve made something like this
[13:32] it seems like a difficult job
[13:34] anyway, i was wondering if the edge node that you add to the ways that crosses tiles is added to both ways at the same coordinates?
[13:34] no, i did not try it yet, but I certainly will try to do so this weekend
[13:35] i have split the world in half using osmosis and will try to use your splitter to divde that further into small tiles
[13:35] its probably in the same place, but the splitter doesnāt actually do that. It down to mkgmap to cut the line according to the bounding box
[13:36] ah, ok, i misunderstood that apparently
[13:36] half the planet might be a bit ambitious
[13:37] second question: does mkgmap set the special ārouteā bit on those nodes?
[13:37] well I have a machine with 3 or 4gb ram and 64bit linux to try it on
[13:37] no, but that is my plan.
[13:37] cool!
[13:37] oh cool, well Iād be interested to know if it works
[13:38] do you have any idea how splitter will work when it tries to write to thousands of files ?
[13:38] i.e. do you open a file handle to all those files and keep them open all the time?
[13:39] i mean, usually there is a limit on the number of files a process may have open at any given time
[13:39] yes it keeps a file open. I wouldnāt expect thousands of files though
[13:40] the europe file I was working with is about 1/4 of the planet and its only about 70 files
[13:40] well, currently I create tiles measuring 0.25 x 0.25 degrees, if i continue to do that, then it will be certainly thousands
[13:41] ah, but those tiles will fill up a garmin unit without sd card very quickly
[13:41] is the topology kept between slices?
[13:41] I was looking for a .osm cutter the other day myself
[13:42] i guess youāve solved the problem of the 3.5 mb tile size at one point? Because in the early days of mkgmap I could not put the whole of rotterdam in a single tile
[13:42] osmcut could only handle 1 degree tile sizes for my area
[13:42] yes that 3.5mb was a bug
[13:43] the splitter creates variable sized tiles so you donāt get very many
[13:43] yes i read that, thatās amazing
[13:44] smart little piece of software already
[13:44] chippy: what do you mean by āis the topology keptā
[13:45] so, huge shapefile ā osm. split the .osm file so we can upload in chunks, and it keeps things connected
[13:45] or many .osm files ā routing, and the routing is unbroken over tile edges
[13:46] chippy: right. Nothing is lost that is required for Garmin maps, but if you want to use the OSM files for other purposes then there could be problems. Iāve not thought about that
[13:46] hmm, actually with creation, and negative ids, I donāt think the first would be possible
[13:47] stever, yep
[13:48] chippy: Iām hoping that routing will work across tiles in garmin maps, but again for routing in other apps, it may or may not be be ok
[13:49] stever, ok cool stuff
[13:57] stever: the input osm file, can it be a gz file as well?
[13:57] yes
[13:57] k
[15:15] Lambertus: it just puts its files in the directory where it was started. Youāve probably noticed that by now though
[16:00] stever: yes, it took a while, but i see the files now
[16:00] <ted_> Lambertus: my machine has 4gb ram and osm2mp choked trying to convert all of Pennsylvania
[16:00] * ted_ goes looking for steverās announcment
[16:00] how long? it is pretty slow
[16:01] <ted_> well, i shouldnāt say choked, it finished
[16:01] itās still running, but so it the gosmore update, so theyāre fighting for resources
[16:01] <ted_> it just ate up all my ram and swapped like crazy first
[16:01] ted_: iām seeing that too
[16:02] heh, they will probably both fail thenā¦
[16:03] <ted_> stever: whereās this announcement of yours?
[16:04] http://www.mkgmap.org.uk/page/17
[16:04] and http://www.mkgmap.org.uk/page/tile-splitter
[16:05] <ted_> stever: awesome!
[16:05] <ted_> i was just bemoaning this the other day when i tried to create a routable map of pennsylvania
[16:05] <ted_> and realized that it was too big
[16:06] ok, but note that we donāt have routing between tiles just yet
[16:06] <ted_> ah, bummer
[16:06] <ted_> but you think it should be possible?
[16:09] yes, it should be possible
[16:09] <ted_> cool
[16:14] <ted_> stever: glad to hear youāve run this on all of europe, so PA should be no problem
[16:16] how big is the PA osm file?
[16:16] <ted_> 2.7Gb uncompressed
[16:23] <ted_> Total time 250s
[16:23] <ted_> not bad at all
[16:23] heh, how many files did it split it into
[16:24] <ted_> 8
[16:24] <ted_> clearly i need to convert areas.list into something i can view graphically
[16:24] that would be cool
[16:25] * ted_ ponders what format would work best
[17:06] ted_: Iām thinking about reading it into OpenLayers and show the tiles as features, something like this: http://wiki.openstreetmap.org/wiki/Image:Garminmaps.jpg
[17:09] <ted_> i just wrote a really quick script to generate a .kml file from it
[17:09] <ted_> can OL handle KML?
[17:09] Yes
[17:10] (Wow, I have good timing)
[17:10] <ted_> hah
[17:10] But the same liitations apply as with all vectors
[17:10] <ted_> these are just rectangles
[17:11] But how many of them?
[17:11] <ted_> http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=http:%2F%2Fmavra.perilith.com%2F~luser%2Fareas.kml&g=2365+Dewey+Ave,+Northampton,+PA+18067&ie=UTF8&z=7
[17:11] <ted_> depends on how big the input data is
[17:12] <ted_> stever: ^^
[17:12] ted_: Iām just saying, more than 500 is asking for trouble.
[17:12] <ted_> i think stever said all of europe split down into ~70
[17:12] <ted_> Lambertus, stever: http://mavra.perilith.com/~luser/convertarealist.txt
[17:12] <ted_> is the script
[17:13] <ted_> pretty simple
[17:13] ted_: cool
[17:16] <ted_> also, thanks to google maps, you got my home address for free in that first link
[17:20] ted_: Did you see my comments last night re: browser data editor?
[17:21] <ted_> yeah, why do you say that?
[17:22] I think that even the data browser goes too far, really; I think that the OSM website is really designed to be about getting the data out, not in.
[17:22] Also, I think that a real data editor is a full fledged application in its own right ā the same way potlatch is
[17:22] (I also think that Potlatch belongs outside of the OSM homepage)
[17:23] <ted_> ok
[17:23] <ted_> makes sense
[17:23] <ted_> but would be nice to have an openstreetbugs type of interface on the map, at least
[17:23] * ted_ wanders off
[17:23] Also, I think that tying an editor into the website is just limiting
[17:23] * crschmidt guesses this is really more appropriate for #osm-dev
[17:24] +1 for browser based editor also
[17:24] does JOSM have a way to view the history of an object?
[17:32] europe tiles shown using tedās script: http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=http:%2F%2Fwww.mkgmap.org.uk%2Ftmp%2Fareas.kml&ie=UTF8&z=3
[18:09] <ted_> stever: man, germany really gets tiled
[18:11] yes its interesting seeing the best mapped places
Saved by the bell for me
http://www.mkgmap.org.uk/page/tile-splitter
Now only Mkgmap needs to be adapted to set the correct edge routing information.
Great stuff indeed
Could someone point me to wiki article or similar describing the tiles you are referring to?
What defines the tile edges? I create map from southern half of finland. Looking at the link http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=http:%2F%2Fwww.mkgmap.org.uk%2Ftmp%2Fareas.kml&ie=UTF8&z=3
seems that my map contains 3 tiles. Is that the case?
The tilesplitter has some kind of tile optimisation algorithm which aparently produces these tile bboxes. Luckily you can define your own bboxes as well, placing the while of Finland in a single tile and have the algorithm determine the other bboxes.
This is my result when working with half the planet (Europe, Asia, Africa and Oceania)
This is my result when working with half the planet (Europe, Asia, Africa and Oceania)
Thatās nice, prolly a picture of the monthā¦ And also fun seeing Google maps being slow.
Hi all!
Iāve added basic cropping functionality to osm2mp. It also creates boundary road nodes.
This time available in svn only.
Use --bbox <minlon,minlat,maxlon,maxlat> to specify boundary box.
Does this mean that I can take one large file (say country.osm), split it into smaller tiles via multiple runs of osm2mp with several matching --bboxāes and routing will work across tile borders?
weolvi,
yes, you can. And routing will work
You can also use tile splitter first, and then osm2mp with bboxes from areas.list
Iāve successfully built map of Russia such way: http://gpsmapsearch.com/osm/mp/
Note that turn restrictions disabled this time
Awesome! It looks like we now have a full chain of software capable of generating routable Garmin maps without human intervention for the first time.
Very cool and good work liosha!
/me is going to implement an automated chain this weekend
great work , Iām sure we are all waiting for this
thanks
Always a convert a map from an osm file to mp with osm2mp I get some messages saying: Warning! Turn restriction RelID=XXX is not properly processed, but I check relations and seem to be correct (at least I donāt find the error). Could someone check relations in this area [1] and tell me if thereās something wrong or if itās a problem of osm2mp?
[1] http://www.openstreetmap.org/?lat=39.481821&lon=-6.363901&zoom=18&layers=B000FTF
cdavila,
itās a problem of osm2mp - this time it canāt process restrictions on splitted roads.
hope iāll fix it soon
itās a problem of osm2mp - this time it canāt process restrictions on splitted roads.
hope iāll fix it soon
OK, letās wait
Thanks
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?