logo separator

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

From Mark Burton markb at ordern.com on Sun Aug 9 16:42:28 BST 2009

v3

Now only has 1 tag (mkgmap:gtype) to specify everything.

tag has the format 'kind,code,minres,maxres,roadclass,roadspeed'

Where kind is 1 for node, 2 for polyline and 3 for polygon.

kind, code and minres are all required to be present, the other values
can be ommitted.

Note, this format has changed since v2.

------------------------

v2

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:

mkgmap:gtype="0x20,19,,1,2"

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

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

--------------

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
visible)

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
added.

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.

Cheers,

Mark

-------------- next part --------------
A non-text attachment was scrubbed...
Name: mb-zero-style-v3.patch
Type: text/x-patch
Size: 5626 bytes
Desc: not available
Url : http://lists.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20090809/7fa24641/attachment.bin 


More information about the mkgmap-dev mailing list