[Tile-serving] DEM scaling
yohanboniface at free.fr
Fri Jun 28 09:51:09 UTC 2013
Hi tiles rendering masters :)
I'm preparing a worldwide service of the new born (and still burgeoning)
"HOT style". You can have a preview here:
It's a TileMill/Carto project, the repository is on Github .
We have decided to include terrain data in this rendering. Specifically:
- one hillshade layer (light source altitude 80°, default azimuth)
- one 25m contour lines layer
I'm now working with a 90m, 5x5° tile from CGIAR , as the HOT style
preview is only on Hispaniola island. So everything is easy and fast.
But now I need to scale it.
After some investigation and discussion, here is the process I have in
mind for this:
* for the hillshade:
- get the 90m 5x5 tiles from CGIAR (820 zip files, so to do step by step
not to overload the download service...)
- reproject them with gdalwarp
- merge them by group of four, with gdal_merge.py (according to MapBox
 experience, tiles from 4096x4096 to 16384x16384 are optimal, and
each one of the tiles is 6000x6000), taking care of -a_nodata
- create hillshade with gdaldem
- create overviews with gdaladdo
- create a vrt file with all those tif, using dgalbuildvrt (and with
absolute paths ;))
* for the contour lines:
- use the same 90m 5x5 tiles
- create contour with gdal_contour, taking care of -snodata (output a shp)
- import the shp in PostGIS with shp2pgsql
Does this make sense?
If you have some advice, different experience, I would be glad to hear it :)
Thanks in advance!
More information about the Tile-serving