OSM Tools
dutch german en francais spanish spanish polish russian
 

Tricks & Tips with mkgmap styles 4

Echotags Part1

Echotags can be used to

How to add echotags to your style sheets

Your style sheets may have been parsed without JAVA errors but the results may defy your expectations.

Echotags are like messages you can insert in your code to give you a list of all the variable values used by mkgmap.They are very useful for isolating the cause of a problem in your style sheets

Example:

highway=track { echotags "This is a track"}

highway=* {echotags "Give me all the highways"}

highway=* & foot!=yes {echotags "highways with no pedestrian access"}

There is a strange 'feature' (bug?) in that you cannot use != on its own ie
foot!=yes {echotags "Show any line with no pedestrian access"}
The above line causes mkgmap to error so you always have to think of another condition
highway=* & foot!=yes {echotags "highways with no pedestrian access"}

Now we can do some tricks

SHOW ME ALL THE HIGHWAYS NOT LISTED IN MY STYLE SHEET

Maps may contain different types of highways , ie lanes, which may not be found in your 'lines'.

highway=* {echotags "Give me any highway not found in my lines sheet"}

If you place this at the beginning of your lines then it will not work as it will show ALL the highways

So, place it at the end of your lines style sheet , but before the <finalize > bit.

However, this may work up to a point .

If you have added a CONTINUE it also captures any line with a continue and some highways with area=yes (pedestrian ,services etc) , ie

highway=secondary & ( network=e-road | int_ref=* ) [0x04 resolution 18-19 continue]

We need to add an extra condition ,something like this:

highway=secondary {set continue_=yes} # note: continue_ (continue is a command)

highway=primary {set continue_=yes} #etc

highway=* & area!=yes & continue_!=yes {echotags "Give me any highway not found in my lines sheet"}

SHOW ME ALL SHOPS NOT LISTED IN MY STYLE SHEET

Here we place

shop=* {echotags "Unknown "}

in the (Default) points file

1) before : <finalize>

2) before:

shop=* [0x2e0c resolution 24]

 

echotags
  mapuploader4 parsing echotags

We also added: sport=* {echotags "Unknown "} in the default polygons file: natural=* {echotags "Unknown "}

What do the large numbers refer to?

Relations Points Lines Polygons
relations nodes ways ways

You can view the nodes using : www.openstreetmap.org/node/ [number]

Notice both lines and polygons use ways: www.openstreetmap.org/way/ [number]

SHOW ME ALL THE HIKING/CYCLING ROUTES WITHOUT A REF

At the end of the relations file we place:

(route=hiking|route=walking|route=foot) & ref!=* {echotags "Hiking Routes with no REFs"}

route=bicycle & ref!=* {echotags "Cycle Routes with no REFs"}

SHOW ME ALL THE BERLIN/PARIS SUBWAY ROUTES

route=subway {echotags "Underground"}

One entry is:

* Berlin Underground *
2679016 -
ref=U9
operator=BVG
type=route
name=U-Bahnlinie U9: Osloer Stra├če => Rathaus Steglitz
route=subway
network=Verkehrsverbund Berlin-Brandenburg