logo separator

[mkgmap-dev] [PATCH v2] - styling for the power user

From Mark Burton markb at ordern.com on Thu Aug 6 10:28:19 BST 2009


now supports ~[0x??] syntax within name to specify highway shields

to reduce the number of tags required, you can now specify all the
values in the mkgmap:gtype tag like this example:


type = 0x20
minres = 19
maxres not specified
roadclass = 1
roadspeed = 2

The one tag per value scheme is still supported (for the moment at


Are you a heavy duty styler? If so, read on:

I notice that quite a lot of postings on the list are from people who
are having problems with complex style files. This little patch won't
(directly) solve those problems but it does provide a useful capability
that could be part of a solution for those people who have complex
styling requirements and are willing to do some coding.

What the patch does is allow elements (nodes, ways) to specify their
garmin type (and a few other things) explicitly using these tags:

mkgmap:gtype  the element's type (integer constant)

mkgmap:kind   one of "node", "polyline", "polygon" (only polygon is used
at this time to differentiate polygons from lines).

mkgmap:minres the element's minimum resolution (needed to make element

mkgmap:maxres the element's maximum resolution (not required)

mkgmap:roadclass the element's road class (needed for roads)

mkgmap:roadspeed the element's road speed (needed for roads)

If the mkgmap:gtype tag is present, the element will not be passed
through the normal style file process at all.

So how do these tags get added to the OSM data? Well, you could just
add them with an editor but that would get boring pretty quickly so
what I would expect to see is some kind of external filter program that
reads the OSM file and outputs a new OSM file with the appropriate tags

That filter program could be written in any language that has some XML
processing support.

Current issues to be sorted out are handling of the highway shields
(not currently implemented) and also this feature is not compatible with
the cycleway faking code.

All feedback welcome.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: mb-zero-style-v2.patch
Type: text/x-patch
Size: 5066 bytes
Desc: not available
Url : http://lists.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20090806/a3216b70/attachment.bin 

More information about the mkgmap-dev mailing list