[gdal-dev] Geopackage raster and COPY_SRC_OVERVIEWS

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[gdal-dev] Geopackage raster and COPY_SRC_OVERVIEWS

jratike80

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.

 

-Jukka Rahkonen-


_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: Geopackage raster and COPY_SRC_OVERVIEWS

Even Rouault-2

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.

 

Example:

 

- 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.

 

Even

 

--

Spatialys - Geospatial professional services

http://www.spatialys.com


_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: Geopackage raster and COPY_SRC_OVERVIEWS

jratike80
In reply to this post by jratike80

Hi Even,

 

Thank you for the advice. I thought a bit further and mixed-source overviews are also common in tile cache storages (MapCache, MapProxy) or when GeoPackage is used as an outputformat for WMS (GeoServer). There seems to be some need for having an easy general method for copying overviews. Let’s see if someone appears with funding or just implements it.

 

-Jukka-

 

Lähettäjä: Even Rouault [mailto:[hidden email]]
Lähetetty: 28. elokuuta 2017 15:03
Vastaanottaja: [hidden email]
Kopio: Rahkonen Jukka (MML) <[hidden email]>
Aihe: Re: [gdal-dev] Geopackage raster and COPY_SRC_OVERVIEWS

 

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.

 

Example:

 

- 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.

 

Even

 

--

Spatialys - Geospatial professional services

http://www.spatialys.com


_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev