Our problem is that we need to convert a shapefile to raster. Then, we need to generate tiles from zoom 15 to zoom 17 (2millions tiles to 16millions tiles).
Before we were using this methodology:
- Step 1 : Import shape in QGIS, then generate a raster
- Step 2 : Then we change the color/opacity of the raster using QGIS as well.
- Step 3 : we generate a new raster (tif) of 1Tera Byte (~1TB).
- Step 4: we use gdal2tiles to generate tiles.
This works fine. But the image is so big in size that it takes a while to tile.
But, now, we use directly GDAL as follows:
- Step 1: gdal_rasterize to convert a shape to raster in the right color/opacity with compression. It generates a raster of 1GB.
gdal_rasterize -of GTiff -co BIGTIFF=IFNEEDED -co COMPRESS=DEFLATE -burn 102-burn 120 -burn 42 -burn 255 -co PREDICTOR=2 -co ZLEVEL=9 -ot Byte -a_nodata 255 -a class -ts 500000 500000 -l input C:/input.shp C:/output.tif
- Step 2: we want to generate tiles but gdal2tiles is hanging for a while just to generate a single tile. Maybe it does not support compressed file for tiling.
Any idea how to proceed?