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
Index: resources/styles/default/relations
===================================================================
--- resources/styles/default/relations	(revision 1451)
+++ resources/styles/default/relations	(working copy)
@@ -20,3 +20,9 @@
     set mkgmap:boundary_name='$(mkgmap:boundary_name)/${name}' | '${name}';
   }
 }
+type=route & route=bus { add name='${network|def:}${ref}' }
+type=route & route=bus { apply
+  {
+    set mkgmap:route_name='$(mkgmap:route_name)/${name}' | '${name}';
+  }
+}
Index: resources/styles/default/lines
===================================================================
--- resources/styles/default/lines	(revision 1451)
+++ resources/styles/default/lines	(working copy)
@@ -25,6 +25,7 @@ contour=elevation | contour_ext=elevatio
 	[0x21 resolution 20]
 
 # Set highway names to include the reference if there is one
+highway=* {set name='${name} (${mkgmap:route_name})'}
 highway=motorway {name '${ref|highway-symbol:hbox} ${name}' | '${ref|highway-symbol:hbox}' | '${name}' }
 highway=trunk {name '${ref|highway-symbol:hbox} ${name}' | '${ref|highway-symbol:hbox}' | '${name}' }
 highway=primary {name '${ref|highway-symbol:box} ${name}' | '${ref|highway-symbol:box}' | '${name}' }
_______________________________________________
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Reply via email to