Gosmore/srtm
< Gosmore
Jump to navigation
Jump to search
To include elevation contours in your rebuild, follow these steps :
- Convert the elevation data to osm contours. Srtm2osm works well for areas smaller than 40,000 km^2, provided you have a Windows machine with 256 MB RAM. The perl script there also works, but the areas can only be a few hundred km^2.
- You can use the merge utilities provided with these programs. Or you can use a bash script to do the merging on the fly and change the tags at the same time. For example :
( bzcat mycountry.osm.bz2 | grep -v '</osm>' sed -e 's/"ele"/"name"/' srtm.osm | egrep -v '<?xml|<osm' ) | ./gosmore rebuild
- Add appropriate rules to elemstyles.xml :
<rule> <condition k="contour" v="elevation"/> <line width="1" realwidth="1" colour="#a0a060"/> <scale_min>1</scale_min> <scale_max>30000</scale_max> </rule>
- If you use graduated contours, add these rules BEFORE the contour=elevation rule :
<rule> <condition k="contour_ext" v="elevation_major"/> <line width="1" realwidth="1" colour="#a0a060"/> <scale_min>1</scale_min> <scale_max>300000</scale_max> </rule> <rule> <condition k="contour_ext" v="elevation_minor"/> <line width="1" realwidth="1" colour="#a0a060"/> <scale_min>1</scale_min> <scale_max>150000</scale_max> </rule>