You are not logged in.

Announcement

*** NOTICE: forum.openstreetmap.org is being retired. Please request a category for your community in the new ones as soon as possible using this process, which will allow you to propose your community moderators.
Please create new topics on the new site at community.openstreetmap.org. We expect the migration of data will take a few weeks, you can follow its progress here.***

#1 2015-01-10 13:22:21

AlaskaDave
Member
From: Homer, Alaska ; Chiang Mai
Registered: 2013-09-21
Posts: 470
Website

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.

Offline

#2 2015-01-14 20:22:27

wilpin
Member
Registered: 2009-11-22
Posts: 79
Website

Re: How to use {echo} in mkgmap

Have you tried:

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

Last edited by wilpin (2015-01-14 20:24:08)

Offline

#3 2015-01-15 01:49:45

AlaskaDave
Member
From: Homer, Alaska ; Chiang Mai
Registered: 2013-09-21
Posts: 470
Website

Re: How to use {echo} in mkgmap

wilpin wrote:

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.

Last edited by AlaskaDave (2015-01-15 02:02:07)

Offline

#4 2015-01-15 10:56:38

wilpin
Member
Registered: 2009-11-22
Posts: 79
Website

Re: How to use {echo} in mkgmap

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

Last edited by wilpin (2015-01-15 13:08:13)

Offline

#5 2015-01-16 01:54:58

AlaskaDave
Member
From: Homer, Alaska ; Chiang Mai
Registered: 2013-09-21
Posts: 470
Website

Re: How to use {echo} in mkgmap

wilpin wrote:

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.

Offline

#6 2015-01-16 10:51:08

popej
Member
Registered: 2008-09-20
Posts: 500
Website

Re: How to use {echo} in mkgmap

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


popej

Offline

#7 2015-01-16 21:57:26

WanMil
Member
Registered: 2009-04-09
Posts: 109

Re: How to use {echo} in 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.

Offline

#8 2015-01-17 01:15:59

AlaskaDave
Member
From: Homer, Alaska ; Chiang Mai
Registered: 2013-09-21
Posts: 470
Website

Re: How to use {echo} in mkgmap

WanMil wrote:

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 ?

Offline

#9 2015-01-19 14:01:28

AlaskaDave
Member
From: Homer, Alaska ; Chiang Mai
Registered: 2013-09-21
Posts: 470
Website

Re: How to use {echo} in mkgmap

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.

The attached patch improves the echo and echotags messages by including the
id of the original element when a fake id is generated by mkgmap, thus
enabling you to find it in OSM.

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

Offline

Board footer

Powered by FluxBB