[gdal-dev] GPKG and antimeridian

Even Rouault even.rouault at spatialys.com
Wed Nov 25 02:31:49 PST 2020


> I turned the debug mode on.
> There are calls to GDALWarpKernel().

You'll always get calls to GDALWarpKernel() with gdal_translate
-of GPKG -co TILING_SCHEME

> Furthermore, I don't understand the line :
> WARP: SetAlphaMax: AlphaMax not set

You can ignore it. AlphaMax is set when the number of bits of the bands
is not 8, 16, etc. but an intermediate value like 12.

> Is there anything to add to the gdal_translate command, so that the
> "transparent information" is not ignored?

>From a quick test, this works as expected for me:

gdalbuildvrt -addalpha tmp.vrt ../autotest/gdrivers/data/small_world.tif
# set everything to transparent
gdal_translate tmp.vrt tmp2.vrt -scale_4 0 255 0 0 
gdal_translate tmp2.vrt out.gpkg -co TILING_SCHEME=InspireCRS84Quad 
ogrinfo out.gpkg -sql "select count(*) from out" -al -q
==> returns 0

But the generation might be slow on a large VRT, since the warping will be 
less smart then gdal_translate in the non TILING_SCHEME mode which skips 
quickly zones of the VRT without sources, whereas the warping will process 
them but at the end the GPKG driver will not write those transparent tiles.

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the gdal-dev mailing list