logo separator

[mkgmap-dev] Styling for the power user: filtering contour lines

From Christian Gawron christian.gawron at googlemail.com on Fri Aug 7 09:36:08 BST 2009

Hi Daniel,

you can use regular expressions to filter contour lines by elevation - 
here is what I do in my style file:

# Contours take their name from the elevation setting.
# multiples of 200m
contour=elevation & ele ~ '\d*[02468]00'
    { name '${ele|conv:m=>ft}'; }
    [0x22 resolution 18]
# multiples of 50m
contour=elevation & ele ~ '\d+[05]0'
    { name '${ele|conv:m=>ft}'; }
    [0x21 resolution 21]
contour=elevation
    { name '${ele|conv:m=>ft}'; }
    [0x20 resolution 23]

You could use '\d+[27]5' for your purpose.

Best wishes
Christian

David schrieb:
> To Mark Burton,
>
> The new features you added for styling is a great step for my map. The  
> last step is how to filter each contour line which height finishes by  
> 25 or 75 (I don't know how to do it with style rules). These contours  
> are only used for low level of details. At higher LOD, contours with a  
> step of 10m are displayed (to build such a layer I need cgpsmapper).
>
> Thank you for your work,
>
> David
>
>
>
> _______________________________________________
> mkgmap-dev mailing list
> mkgmap-dev at lists.mkgmap.org.uk
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
>   




More information about the mkgmap-dev mailing list