OSM Tools
dutch german en francais spanish spanish polish russian

Tricks & Tips : Contours

More Tricks

Elevation:Showing contours in different intervals,50,100,150,200 etc

If you are able to convert STRM .hgt files to .osm then you can use the ele tag to control your contours.

Multiples of numbers can be parsed using \d

example: ~ '\d*[013579]00' # this means ' if elevation = 100 or 300 or 500 or 700 etc

Using three contour type numbers, 0x20 , 0x21 and 0x22

Use 0x22 for multiple of 200

# start with resolution=18

contour=elevation & ele ~ '\d*[02468]00' # ie for 200 400 600 800
{ name '${ele|conv:m=>ft}'; } [0x22 resolution 18]

Use 0x21 for multiples of 50

#start with resolution=21

You may want to use one colour for multiples of 50 : 50 100 , 150, 200 etc

contour=elevation & ele ~ '\d+[05]0' # match 1 or more repetition digits 100 150 200 250
{ name '${ele|conv:m=>ft}'; } [0x21 resolution 21]

Use 0x20 for the rest

'# only show with resolution=24

contour=elevation { name '${ele|conv:m=>ft}'; } [0x20 resolution 23]

Next

How to create large town names

Problems with multiple tags

How to show islands in a lake

How to remove (often badly plotted) large polygons