How to use {echo} in mkgmap

I would like to use the debugging tools in mkgmap but can’t convince the program to send its output to a file. I can cause output to go to either STDOUT or STDERR or both but mkgmap complains when it encounters the {echo} or {echo tags} directive.

C:/>make.bat > output.msg 2> errors.msg

This works on my normal batch file. The usual screen output goes to the output.msg file and any error messages go to errors.msg

But when the echo or echo tags command is present in a style file it does not. mkgmap says “System cannot find the file specified”

(tunnel=* | culvert=*) & waterway=* [0x10004 resolution 24]  {echo tags "Tunnel encountered" }
(tunnel=* | culvert=*) & waterway=* [0x10004 resolution 24] { echo "hello"}

I’m running Windows 8 and cmd.exe with admin privileges.

Have you tried:

(tunnel=* | culvert=) & waterway= {echotags “Tunnel encountered” } # no space between echo & tags and no 0xetc

That works! The example in the style manual does indeed show it that way but did not explicitly mention removing the Garmin code assignment. And of course I had the extra space in that command as well. My bad.

Do you also know the meaning of the large number (example: 4611686018427414915) preceding each line in the resulting STDERR file?

Thanks again.

ie 4611686018427391882 - [mkgmap:area2poi=true,landuse=farmyard]

I have no idea but seems to be incremental

Smaller numbers are either nodes or ways

you can access this by
http://www.openstreetmap.org/node/ followed by number
http://www.openstreetmap.org/way/ followed by number

Tried both URLs, no results. Also tried using them as arguments in an Overpass query as id:4611686018427391882 but nothing came of that either. I would have expected either an id or a lat/lon coordinate pair, some way to search for them, but that appears not to be the case.

Big numbers could indicate object created by mkgmap. If it include tag mkgmap:area2poi=true then definitely it is a point created by mkgmap.

All ways with id >= 4611686018427387904 are ids for nodes/ways/polygons/relations artificially created by mkgmap.
mkgmap has to split, merge and create new OSM elements, e.g. to retrieve the correct areas for multipolygons, to create POIs from polygons, to merge small ways with identical attribute to reduce image size and to speed up processing on the GPS unit.

Unfortunately there is no common way to track the artificial id back to their original OSM id.

Okay, thanks WanMil and popej. I have more mkgmap questions but this is probably not the place to ask them, although there is obviously some good advice to be had from list members right here. Should I be asking these questions on the mkgmap dev list ?

I just read this from a Mike Baggaley on the mkgmap dev mailing list. It’s in the form of a patch, presumably for the mkgmap code base.

Sounds like a good idea and just when I needed it, almost. I wonder when it will make it into the released version?