Rawbit
December 5, 2015, 9:53am
#1
Dear All,
I like to create a map for my Etrex10 as described
http://forum.openstreetmap.org/viewtopic.php?id=52837
I like to add the names of the hiking pathes in this map such us
X9, X12, A10 etc. like shown in paper maps.
Further I red the style manual and try really hard to archiev this but without success
In my style file I used in “lines”:
highway=track | highway=footway | highway=path [0x0a resolution 22]
highway=service [0x07 resolution 16]
highway=tertiary [0x07 resolution 16]
highway=secondary [0x07 resolution 16]
I habe no idea where to start.
Could you help me ?
Kind regards
Rawbit
wilpin
December 5, 2015, 4:33pm
#2
Your hiking routes must be defined in relations as they are parsed first.
check out the default relation file ie
type=route
& (route=bus|route=trolleybus|route=ferry|route=subway|route=train|route=tram)
& (ref=* | name=*)
{
add ref=‘${name}’; # if ref is missing, use name
etc etc
Now,replace say ‘bus’ with ‘hiking’ , ‘trolleybus’ with ‘foot’ and drop the other routes
then in lines
ref=* & highway=* {name ‘${ref|highway-symbol:oval}’
this adds a shield
The key point is :
when its parsing the lines file it checks to see if refs are set
if it is set then give the highway a shield with the ref
You may want to add a different symbol (POi) for a different route
The following gives routes with ref DHW a different symbol
in relations add
type=route & (route=hiking | route=foot) & ref = ‘DHW’ {apply { add dhw=yes}set listed=yes}
then in pois
mkgmap:line2poi=true & mkgmap:line2poitype=start & dhw=yes
[0x331E level 0 ]
This is just the beginning : ie
a) you can give different routes different colours
b) when a red route and blue route are shared you can can create a red/blue line etc
c) You can change the shield color in your TYP file
d) You can devise a routine which automatically applies different refs to different routes
e) You can even add a color for unknown routes, or routes without refs
There is some info on http://pinns.co.uk/osm/styleideas.html - see styles 3 pdf
Rawbit
December 6, 2015, 12:18am
#3
Hello,
thanks for your posting.
I copied the relations file into my folder and changed the related arguments.
Now it look like this:
(type=boundary | type=multipolygon) & boundary=administrative & name=*
{ apply
{
set mkgmap:boundary_name=‘$(mkgmap:boundary_name)/${name}’ | ‘${name}’;
}
}
European E-Road network
route=road & network=e-road { apply { add ref=‘${ref}’; add int_ref=‘${int_ref}’; add network=‘e-road’ } }
Public transportation routes.
We could want to sort the matching relations by ref first.
type=route
& (route=hiking|route=foot)
& (ref=* | name=*)
{
add ref=‘${name}’; # if ref is missing, use name
Append the ref of the route relation to the route_ref attribute of
#…
apply { # node role ~ ‘(start_|end_)stop’
set route_ref=‘$(route_ref);${ref|not-contained:;:route_ref}’ | ‘$(route_ref)’ | '${ref}
# …
set mkgmap:relref='${ref}';
apply role=passengers {
set route_ref='$(route_ref),${mkgmap:relref}' | '${mkgmap:relref}';
}
delete mkgmap:relref;
}
We could want to copy the route relation name to unnamed route=ferry ways.
apply way { add name=‘${name}’ }
}
My lines:
highway=track |highway=footway|highway=path [0x0a resolution 22]
highway=service [0x07 resolution 16]
highway=tertiary [0x07 resolution 16]
highway=secondary [0x07 resolution 16]
ref=* & highway=* {name ‘${ref|highway-symbol:oval}’
I rendered with:
mkgmap --latin1 --route --name-tag-list=name:de --style-file=hikestyle10.zip --description=“OSM Karte” --family-id=9999 --gmapsupp 6*.osm.pbf e10.TXT
But I don’t see a hiking sign …
Kind regards
Rawbit
wilpin
December 6, 2015, 8:46am
#4
Try
ref=* & highway=* {name ‘${ref|highway-symbol:oval}’ # this must appear before the rest !
highway=track |highway=footway|highway=path [0x0a resolution 22]
highway=service [0x07 resolution 16]
highway=tertiary [0x07 resolution 16]
highway=secondary [0x07 resolution 16]