logo separator

[mkgmap-dev] multiple garmin elements from one osm element

From Torsten Leistikow de_muur at gmx.de on Sun Jul 19 12:53:25 BST 2009

Moin,

finally I got my eclipse environment running and was able to build
mkgmap from source. So the next step was my first extension of mkgmap.

Until now a single OSM element was converted into a single garmin
element, i.e. the first one in the style file with the matching expression.

I have extended the style definition by two commands (stop and
continue), to allow the
generation of multiple elements.

A classic conversion rule has a syntax like:

amenity=restaurant [0x2a00 resolution 20]

With my extension this is equal to

amenity=restaurant [0x2a00 resolution 20 stop]

and has the meaning: If this rule is used, no further rules will be
applied to the element.

If this line is changed now to

amenity=restaurant [0x2a00 resolution 20 continue]

mkgmap will convert a matching OSM element into a garmin Element type
0x2a00, but afterwards it will check, whether another rule is matching
for the same osm element. So this will allow, that for the same item
additionally a

tourism=hotel [0x2b01 resolution 20]

rule might be applied.

My modification is working on points as well as on lines or polygons,
i.e. it will also help with barrier=fence problem.

There are two problems with my modification:

1. The POI generation for an area will not work, with multiple
conversion rules.

2. I do not know, how to provide a proper patch for my modification, so
I just attached the modified java-files (based on mkgmap-r1087).

I hope you can incorporate the modification into your mkgmap and give it
a try. Without any change to the style, the modification should not
change anything. As a try, you could add the continue command to all
point rules and all barrier rules.

What do you think about it?

Gruss
Torsten
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ActionRule.java
Type: text/x-java
Size: 2151 bytes
Desc: not available
Url : http://lists.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20090719/b9540fa4/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ExpressionRule.java
Type: text/x-java
Size: 1348 bytes
Desc: not available
Url : http://lists.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20090719/b9540fa4/attachment-0001.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: FixedRule.java
Type: text/x-java
Size: 1085 bytes
Desc: not available
Url : http://lists.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20090719/b9540fa4/attachment-0002.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: GType.java
Type: text/x-java
Size: 5005 bytes
Desc: not available
Url : http://lists.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20090719/b9540fa4/attachment-0003.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Rule.java
Type: text/x-java
Size: 1149 bytes
Desc: not available
Url : http://lists.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20090719/b9540fa4/attachment-0004.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: RuleSet.java
Type: text/x-java
Size: 2837 bytes
Desc: not available
Url : http://lists.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20090719/b9540fa4/attachment-0005.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SequenceRule.java
Type: text/x-java
Size: 2127 bytes
Desc: not available
Url : http://lists.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20090719/b9540fa4/attachment-0006.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: StyledConverter.java
Type: text/x-java
Size: 28070 bytes
Desc: not available
Url : http://lists.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20090719/b9540fa4/attachment-0007.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TypeReader.java
Type: text/x-java
Size: 3552 bytes
Desc: not available
Url : http://lists.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20090719/b9540fa4/attachment-0008.bin 


More information about the mkgmap-dev mailing list