
Hi all, The attached patch is a quick and dirty attempt at adding bus route information to the map, by appending to the street name. Some street names are not being appended to, but the patch is already generating impractically long street names near bus stations. In other words, the route information should instead be generated on layer(s) separate from the "base" map. It seems to me that the optimal translation rules for bus routes could be place-specific. For example in the Helsinki metropolitan area, ${ref} is really enough for identifying local bus routes. The attached patch displays ${network} too, but end users could infer that from ${ref}. Long-distance bus routes might need ${operator}, but they could already be identified by ${name} (a dash-separated list of place names). It would seem to make sense to have long-distance routes and local routes on separate layers. One common layer could be enough for all local routes, for ease of use too (need to disable/enable one "local bus" layer instead of selecting "local bus Helsinki", "local bus Turku" etc.) Then again, some control freaks could like to have one layer per ${network} or ${operator}. Then the labels on the lines could omit ${network} or ${operator}, only mention the ${ref}. Could someone give me a hand with map layers (families in Garmin speak, if I understand correctly)? Would I have to invoke mkgmap multiple times, once for each map layer (family) and finally to combine the families to a single gmapsupp.img? Or can I ask mkgmap to generate multiple map families from the set of map tiles? What would be the best way to package translation rules for bus routes? If the route=bus layer is to be compiled separately from the "base" layer, then it would need a different style altogether, right? And I guess it could be compiled with fewer and bigger map tiles as well? Currently, my "base" layer of Finland is 3 tiles. I believe that one tile of bus routes would easily cover the entire country, at least until all bus routes have been mapped. Best regards, Marko

On Jan 1, 2010, at 22:34, Marko Mäkelä wrote:
Could someone give me a hand with map layers (families in Garmin speak, if I understand correctly)? Would I have to invoke mkgmap multiple times, once for each map layer (family) and finally to combine the families to a single gmapsupp.img? Or can I ask mkgmap to generate multiple map families from the set of map tiles? What would be the best way to package translation rules for bus routes? If the route=bus layer is to be compiled separately from the "base" layer, then it would need a different style altogether, right? And I guess it could be compiled with fewer and bigger map tiles as well? Currently, my "base" layer of Finland is 3 tiles. I believe that one tile of bus routes would easily cover the entire country, at least until all bus routes have been mapped.
I created a public transit layer for Toronto, Canada. Most of your suppositions are correct, at least the way I did it: - I had to invoke mkgmap once for each layer. Each layer had a different draw priority, TYP file, and mkgmap options (the public transit layer was transparent and not routable). - I did not use mkgmap to create the final gmapsupp.img file though. Instead I used Garmin tools (Roadtrip, MapSource) for this. (Some of the more recent changes to mkgmap's gmapsupp code may better support this now.) - I also created a completely new set of style files for the public transit layer. The style files were very basic, containing only items relevant to the public transit items (bus, tram, and subway stops, and the transit lines). - Since the information in the transit layer was so sparse, I also did not need to split the map into sub-tiles (I generated the layer from an entire map of Ontario, which otherwise needs to be split for the normal layer.) This should also most likely be the case for Finland. Does this help you? Cheers.

Clinton, Thank you for confirming my thinking. I would like to see this functionality committed to mkgmap.
- I had to invoke mkgmap once for each layer. Each layer had a different draw priority, TYP file, and mkgmap options (the public transit layer was transparent and not routable).
Do you think that it could work without a TYP file? I suppose that you are defining custom symbols for bus/tram/rail stops and custom line styles for the routes, by operator or network or vehicle type. Could routing make sense? Not all way attributes are accessible in every unit, but a subset could be. The Edge 705 can be told to avoid unpaved, toll roads or highways. For example, we could define long distance routes as toll=yes, and subway routes as unpaved. But this might only be practical if the layer contained all walkable ways, which would blow up the size. Good routing would also have to know about schedules. This is something that could be implemented in a GPS-enabled smartphone or netbook within GpsMid or the like. (There are web-based solutions already, though.)
- I did not use mkgmap to create the final gmapsupp.img file though. Instead I used Garmin tools (Roadtrip, MapSource) for this. (Some of the more recent changes to mkgmap's gmapsupp code may better support this now.)
Could you please try out if it works with mkgmap now? Best regards, Marko

For what it is worth, here is what I tested so far. It results in a 1 MB gmapsupp.img in 1 tile, while the "normal" Finland is over 40MB in 3 tiles. Some local bus and train routes have been mapped, but no long-distance services. I did not test combining multiple map families (layers) to a single gmapsupp.img yet. Marko

On Sat, Jan 02, 2010 at 10:17:23PM +0200, Marko Mäkelä wrote:
For what it is worth, here is what I tested so far. It results in a 1 MB gmapsupp.img in 1 tile, while the "normal" Finland is over 40MB in 3 tiles. Some local bus and train routes have been mapped, but no long-distance services.
TO DO 1: filter duplicates. There can legitimately be duplicate way members in route relations, because routes are best drawn as round-trip loops, if you consider roundabouts (highway routes) or switch points (railways). For rail routes, if there are multiple departure and arrival tracks on the end stations, the most logical option would seem to include each set of tracks in one roundtrip, something like this: A1-...-B1-...-A2-...-B2-...-A3-...-B1-...A1 (notation: A,B=stations, A{1,2,3}, B{1,2} are tracks on the stations) This would of course mean a lot of duplicates (e.g., T,T,T,T,T on the railway line if the route=train carries ref=T). I think that this can best be solved with a filter in the name rule. TO DO 2: add a 'points' file that appends the route names to the names of bus/train/tram/subway stops, to translate role=*stop members. Best regards, Marko

On Sat, Jan 02, 2010 at 11:36:28PM +0200, Marko Mäkelä wrote:
TO DO 1: filter duplicates.
Done, with the apply_once keyword (see my previous message).
TO DO 2: add a 'points' file that appends the route names to the names of bus/train/tram/subway stops, to translate role=*stop members.
Done, revised patch attached. Next step: Combine the "mkgmap --style=routes" output with the "mkgmap --style=default" output to a gmapsupp.img. I would really appreciate help with that, in the form of a simple list of commands. Best regards, Marko
participants (2)
-
Clinton Gladstone
-
Marko Mäkelä