[gdal-dev] gpkg tests and gdalinfo

Even Rouault even.rouault at spatialys.com
Thu Sep 7 13:08:12 PDT 2017


On jeudi 7 septembre 2017 14:59:37 CEST Norman Barker wrote:
> Hi,
> 
> I am building the current trunk (the osgeo master from the github mirror of
> svn), I am running on centos.
> 
> Running `python gpkg.py` from the autotest suite gives (with CPL_DEBUG ON)
> 
> GNM: GNMRegisterAllInternal
> GNM: RegisterGNMFile
> GNM: RegisterGNMdatabase
>   TEST: gpkg_init ... success
>   TEST: gpkg_1 ... GTiff: Reopen with strip chop enabled
> GDAL: GDALOpen(data/byte.tif, this=0x1ef29a0) succeeds as GTiff.
> GDAL: GDAL_CACHEMAX = 99 MB
> GDAL: GDALDriver::Create(MEM,,256,256,1,Byte,(nil))
> GDAL: GDALClose(, this=0x2522260)
> GDAL: GDALClose(/vsimem/tmp.PNG, this=0x25843c0)
> GDAL: Using default GDALDriver::CreateCopy implementation.
> GDAL: GDALDriver::Create(GPKG,/vsimem/tmp.gpkg,20,20,1,Byte,0x25f9e50)
> GDAL: GDALDatasetCopyWholeRaster(): 20*20 swaths, bInterleave=1
> GDAL: GDALClose(/vsimem/tmp.gpkg, this=0x2585ec0)
> GDAL: GDALClose(data/byte.tif, this=0x1ef29a0)
> Segmentation fault
> 
> I can and will dig into it some more but is it is a known error with a
> workaround?

No, I'm not aware of such issue. Autotest suite passes fine on our tested Travis-CI + AppVeyor 
configurations.

Perhaps you can just test
gdal_translate autotest/gcore/data/byte.tif byte.gpkg -of GPKG
and see if that crashes too. And if that doesn't, then
gdalinfo -checksum byte.gpkg
And if that still doesn't cras, then investigate in the context of the actual autotest steps.

> 
> ogrinfo works to list the tables, but how do I use gdalinfo to list a
> tileset?

If there's just one raster tileset, this will the regular dataset. If there are several, they will be 
listed as subdatasets


$ gdal_translate autotest/gcore/data/byte.tif test.gpkg -of GPKG -co 
APPEND_SUBDATASET=YES -co RASTER_TABLE=foo
Input file size is 20, 20
0...10...20...30...40...50...60...70...80...90...100 - done.

$ gdal_translate autotest/gcore/data/byte.tif test.gpkg -of GPKG -co 
APPEND_SUBDATASET=YES -co RASTER_TABLE=bar
Input file size is 20, 20
0...10...20...30...40...50...60...70...80...90...100 - done.

$ gdalinfo test.gpkg
Driver: GPKG/GeoPackage
Files: test.gpkg
Size is 512, 512
Coordinate System is `'
Subdatasets:
  SUBDATASET_1_NAME=GPKG:test.gpkg:foo
  SUBDATASET_1_DESC=foo - foo
  SUBDATASET_2_NAME=GPKG:test.gpkg:bar
  SUBDATASET_2_DESC=bar - bar
Corner Coordinates:
Upper Left  (    0.0,    0.0)
Lower Left  (    0.0,  512.0)
Upper Right (  512.0,    0.0)
Lower Right (  512.0,  512.0)
Center      (  256.0,  256.0)

$ gdalinfo GPKG:test.gpkg:foo
Driver: GPKG/GeoPackage
Files: test.gpkg
Size is 20, 20
Coordinate System is:
PROJCS["NAD27 / UTM zone 11N",
    GEOGCS["NAD27",
        DATUM["North_American_Datum_1927",
            SPHEROID["Clarke 1866",6378206.4,294.9786982138982,
                AUTHORITY["EPSG","7008"]],
            AUTHORITY["EPSG","6267"]],
        PRIMEM["Greenwich",0,
            AUTHORITY["EPSG","8901"]],
        UNIT["degree",0.0174532925199433,
            AUTHORITY["EPSG","9122"]],
        AUTHORITY["EPSG","4267"]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",-117],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",500000],
    PARAMETER["false_northing",0],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]],
    AXIS["Easting",EAST],
    AXIS["Northing",NORTH],
    AUTHORITY["EPSG","26711"]]
Origin = (440720.000000000000000,3751320.000000000000000)
Pixel Size = (60.000000000000000,-60.000000000000000)
Metadata:
  AREA_OR_POINT=Area
  IDENTIFIER=foo
  ZOOM_LEVEL=0
Image Structure Metadata:
  INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left  (  440720.000, 3751320.000) (117d38'28.21"W, 33d54' 8.47"N)
Lower Left  (  440720.000, 3750120.000) (117d38'27.92"W, 33d53'29.51"N)
Upper Right (  441920.000, 3751320.000) (117d37'41.48"W, 33d54' 8.71"N)
Lower Right (  441920.000, 3750120.000) (117d37'41.20"W, 33d53'29.75"N)
Center      (  441320.000, 3750720.000) (117d38' 4.70"W, 33d53'49.11"N)
Band 1 Block=256x256 Type=Byte, ColorInterp=Red
  Mask Flags: PER_DATASET ALPHA 
Band 2 Block=256x256 Type=Byte, ColorInterp=Green
  Mask Flags: PER_DATASET ALPHA 
Band 3 Block=256x256 Type=Byte, ColorInterp=Blue
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20170907/0fed1a30/attachment-0001.html>


More information about the gdal-dev mailing list