[gdal-dev] GPKG footprint of ratser data shrinks as zoom level decreases
Philippe Ghesquiere
philippe.ghesquiere at airbus.com
Mon Apr 20 04:58:53 PDT 2026
Dear Jukka,
This is exactly the origin of my "missing pixels". The open option " -oo
USE_TILE_EXTENT=YES" yields the right pyramid
Thanks
Philippe
On Mon, Apr 20, 2026 at 1:42 PM Rahkonen Jukka <
jukka.rahkonen at maanmittauslaitos.fi> wrote:
> Hi,
>
> When it comes to extents at different zoom levels, it is expected that
> they change. Rasters are stored into GeoPackage as tiles and lower zoom
> level tiles cover larger area.
>
>
> https://learn.microsoft.com/en-us/azure/azure-maps/media/zoom-levels-and-tile-grid/quadkey-tile-pyramid.png
>
> The GDAL GPKG driver has some open options which affect how the extents
> are calculated
> https://gdal.org/en/stable/drivers/raster/gpkg.html#opening-options
>
> But the shrinking extent feels like option "USE_TILE_EXTENT=YES" gets used
> while the default should be "USE_TILE_EXTENT=NO". Try if using explicit NO
> helps, or specify the extent with MINX/MINY/MAXX/MAXY. Notice that using
> the extent of the lowest zoom level always may lead into high number of
> empty tiles at higher zoom levels.
>
> -Jukka Rahkonen-
> ________________________________________
> Lähettäjä: gdal-dev <gdal-dev-bounces at lists.osgeo.org> käyttäjän Philippe
> Ghesquiere via gdal-dev <gdal-dev at lists.osgeo.org> puolesta
> Lähetetty: Maanantai 20. huhtikuuta 2026 12.37
> Vastaanottaja: gdal-dev <gdal-dev at lists.osgeo.org>
> Aihe: [gdal-dev] GPKG footprint of ratser data shrinks as zoom level
> decreases
>
> HUOM! Ulkoinen lähettäjä. Älä avaa linkkejä tai liitteitä, ellet tunnista
> lähettäjää. OBS! Extern avsändare. Öppna inte länkar eller bilagor om du
> inte känner igen avsändaren. NOTE! External sender. Do not open links or
> attachments unless you recognize the sender. Hi all,I have problems with
> the footprint of GPKG raster data, as it varies with zoom level.1) Data
> creationI need a color-relied'ed DTED in GPKG format. I create it with the
> following commands:gdaldem color-relief E017N30.DT2 colormap.lut
> E017N30_lut.tifgdal_translate -of GPKG -co TILING_SCHEME=InspireCRS84Quad
> -co ZOOM_LEVEL_STRATEGY=UPPER -co RASTER_TABLE=tiles -r bilinear
> E017N30_lut.tif E017N30_lut.gpkggdaladdo E017N30_lut.gpkg2) ObservedUL and
> LR corners are given with (where zoom max is ZOOM_LEVEL=12):gdalinfo.exe
> E017N30_lut.gpkg | grep -E "Upper Left|Lower Right"Upper Left (
> 16.9998611, 31.0001389) ( 16d59'59.50"E, 31d 0' 0.50"N)Lower Right (
> 18.0001320, 29.9998680) ( 18d 0' 0.48"E, 29d59'59.52"N)I noticed that the
> GPKG footprint depends on zoom level:gdalinfo.exe E017N30.gpkg -oo
> ZOOM_LEVEL=7| grep -E "Upper Left|Lower Right"Upper Left ( 16.9998611,
> 31.0001389) ( 16d59'59.50"E, 31d 0' 0.50"N)Lower Right ( 17.9996170,
> 30.0003830) ( 17d59'58.62"E, 30d 0' 1.38"N)We observe:UL corner are
> identicalLR corner "moves" northward and westward from Z=12 to Z=8Is it as
> expected?3) Impact:When computing the pyramid (gdaladdo), one column (on
> the east side) and one line (on the south side) are not generated.In our
> system, we can see this artefact when when requesting tiles with WMTS
> requests.4) WorkaroundOur generation script is currently based on
> gdal_translate/gdaldem/gdaladdo (and not mapcache_seed). In order to get
> all the expected pixels, I implemented a workaround:* generate the highest
> zoom level layer with standard gdadem/gdal_translate commands (see above)*
> sqlite command: increase max_x and decrease min_y in table gpkg_contents*
> gdaladdo: pyramid computation* sqlite command: reset max_x and min_y to
> original valuesThank you for any help / explanationPhilippeThe information
> in this e-mail is confidential. The contents may not be disclosed or used
> by anyone other than the addressee. Access to this e-mail by anyone else is
> unauthorised.If you are not the intended recipient, please notify Airbus
> immediately and delete this e-mail.Airbus cannot accept any responsibility
> for the accuracy or completeness of this e-mail as it has been sent over
> public networks. If you have any concerns over the content of this message
> or its Accuracy or Integrity, please contact Airbus immediately.All
> outgoing e-mails from Airbus are checked using regularly updated virus
> scanning software but you should take whatever measures you deem to be
> appropriate to ensure that this message and any attachments are virus free.
The information in this e-mail is confidential. The contents may not be disclosed or used by anyone other than the addressee. Access to this e-mail by anyone else is unauthorised.
If you are not the intended recipient, please notify Airbus immediately and delete this e-mail.
Airbus cannot accept any responsibility for the accuracy or completeness of this e-mail as it has been sent over public networks. If you have any concerns over the content of this message or its Accuracy or Integrity, please contact Airbus immediately.
All outgoing e-mails from Airbus are checked using regularly updated virus scanning software but you should take whatever measures you deem to be appropriate to ensure that this message and any attachments are virus free.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20260420/7570d407/attachment-0001.htm>
More information about the gdal-dev
mailing list