logo separator

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

From Torsten Leistikow de_muur at gmx.de on Fri Aug 7 16:04:59 BST 2009

Moin,

Steve Ratcliffe schrieb:
> I would like to know what people want to do that is not possible.
> Is anyone other than Felix doing something that is difficult with
> the current system?

I haven't tried your latest modification, which allows to change the
items from the condition match, but with previous versions I tried the
following processing:

1. I wanted to to set all surface values to either paved or unpaved. So
on top of my lines-file I entered rules like

surface=sand {set surface=unpaved}
surface=concrete {set surface=paved}
...

Later I changed the rules to

highway=* & surface=sand {set surface=unpaved}
highway=* & surface=concrete {set surface=paved}

Right now I do not know, whether the later change was necessary at all,
and whether the rules are working as expected. But I haven't noticed any
errors.

2. I wanted to evaluate the access-tags, replace them with my own flags,
and delete the access-tags:
highway=* & bicycle=yes {set mkgmap_routing=yes; set bicycle=''}
highway=* & bicycle=designated {set mkgmap_routing=yes; set bicycle=''}
highway=* & bicycle=* {set mkgmap_routing=false; set bicycle=''}
highway=footway & mkgmap_routing!=* {set mkgmap_routing=false}
highway=track & mkgmap_routing!=* {set mkgmap_routing=false}
...

I did not manage to get such a scheme working. As a workaround I create
a single rule for each access condition and each highway type, so that
the action part was done together with the conversion. Although it does
work in the end, it needs much larger style files and is much harder to
maintain.


And since you are asking, what I would like to do with styles:
For lines and polygons I would like to have the following action rules:
- create_start_point -> creates an additional point at the position of
the first point of the OSM way with the same tags as the OSM way. This
point shall afterwards be processed like all the other OSM points.
- create_centre_point -> the same as above but at the position of the
geometric centre of the OSM way
- create_last_point -> the same as above but at the position of the last
point of the OSM way

With such rules, you could control via the style file, which areas get
an additional POI/icon and which not.
Or you could mark some highways with additional icons, e.g.
speed_limits, or graphic symbols for special hiking routes.

Regarding mkgmap and styles: I would like to see as many features as
possible controlled via the style and not hardcoded in mkgmap. For my
taste most of the latest additions to the mkgmap parameters would be
better realised as action rules in the style rather than general program
parameters (e.g. make_cycleways, road-name-pois, add-pois-to-areas), so
that the user has more control, when the action shall be applied and
when not.

Gruss
Torsten



More information about the mkgmap-dev mailing list