Jukka,

> 
> gdal_rasterize -ot Byte  -burn 255 -burn 0 -burn 0 -ts 4950 4950
> -of MBTiles points_3857.json points_3857.mbtiles
> ERROR 6: Could not find an appropriate zoom level that matches raster pixel
> size

The error message says it all, doesn't it ? MBTiles only accepts a single 
tiling scheme, with a 
pre-defined set of zoom levels / resolutions. By default, when gdal_rasterize 
will initialize the 
output raster, the chance that it fits to those constraints is extremely 
unlikely.

Now you may wonder why you can gdal_translate an arbitrary raster as MBTiles. 
This is 
because MBTiles (similarly to GeoPackage with a predefined tiling scheme) sheat 
in its 
CreateCopy() implementation to invoke the warping engine to reproject/resample 
to one of 
the compatible zoom level.

But gdal_rasterize use the Create() interface, so this isn't possible.

Obvious workaround: rasterize to TIF and translate to MBTiles.

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com
_______________________________________________
gdal-dev mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to