logo separator

[mkgmap-dev] [PATCH v1] - clone ways that contain some tag pairs

From Torsten Leistikow de_muur at gmx.de on Mon Jul 6 17:05:42 BST 2009

Thilo Hannemann schrieb:
> I think it would be advantageous to generalize this kind of
> behaviour. What about a "continue" flag in the Garmin type definition
> in the style files? This continue flag would indicate that a match
> with that rule generates a copy of the way, but that the processing
> continues with the next match. For example:
> 
> boundary=administrative [0x1e resolution 12 continue]
> highway=primary [0x06 level 12]

I thought about this topic before, and I would prefer a little different
syntax extension, where your example would look like:

boundary=administrative <0x1e resolution 12>
highway=primary [0x06 level 12]

I.e., the [] brackets would mean like now: use this conversion only, and
the <> brackets would mean: use this conversion and search for
additional conversions for the same OSM element.

I have no development environment for mkgmap, I have only browsed the
source code. But I think for such a change the following modifications
are required:

1. The classes storing the conversions need to get an extra method
Is_Final, which signals whether the conversion of an Element has to
stop, when this conversion is used.

2. The parsing of the style files must be extended, so that the new
syntax is recognised.

3. The function searching for a matching conversion must get an input
parameter, specifying the last used conversion. (If this parameter is
omitted, the search must start at the first element.)

4. Right now for each element the first matching conversion is
determined and aplied. This must be changed into a loop, where the
search and the aplication is repeated, until the used conversion is
marked as final (Is_Final method from above), or no matching conversion
is found any more.

I'd like to help implementing such an extension, but realistically there
is no chance, that I can contribute something until the cycling season
is over.

Gruss
Torsten



More information about the mkgmap-dev mailing list