[gdal-dev] Geopackage raster and COPY_SRC_OVERVIEWS

Even Rouault even.rouault at spatialys.com
Mon Aug 28 05:02:34 PDT 2017

On lundi 28 août 2017 11:30:00 CEST Rahkonen Jukka (MML) wrote:
> Hi,
> I wonder if it could be feasible to support similar COPY_SRC_OVERVIEWS
> option than GeoTIFF driver does for existing overview levels which match
> with the power of two series. Some people have constructed GeoTIFFs or
> virtual VRT rasters which have overviews from different raster sources
> (raster maps with different rendering according to the scale) and gdaladdo
> can't generate such overviews from the best resolution level.

That's certainly doable (pending someone actually implementing it) and probably something 
that could be generalized at the gdal_translate level

In the meantime, you can achieve a similar result with for example gdalwarp (in update 
mode) and using the GPKG ZOOM_LEVEL open option.


- gdal_translate small_world.tif small_world.gpkg -of gpkg
(the full resolution data is at zoom level 1)

- gdal_translate small_world.tif ovr.tif -outsize 50% 50% -scale 0 255 127 255
(create a brighter overview)

- gdalwarp ovr.tif small_world.gpkg -doo ZOOM_LEVEL=0
(populate zoom_level=0, ie first overview level, with the content of this file)

The above can be generalized too as many overviews as needed. You may need to use the -
ovr switch of gdalwarp to select the appropriate source overview.


Spatialys - Geospatial professional services
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20170828/6984bed3/attachment.html>

More information about the gdal-dev mailing list