On vendredi 24 mars 2017 10:20:42 CET Rahkonen Jukka (MML) wrote: > Hi, > > Recent GDAL 2.2-dev versions can't open geopackage that contains only raster > data. ogrinfo -ro -sql "PRAGMA journal_mode" raster.gpkg
Hi Jukka, I could only reproduce with a .gpkg that didn't have a gpkg_geometry_columns table. Which is valid, but not what GDAL creates, so I guess this comes from another software ? I've just pushed a commit with 3 changes : - accept opening a .gpkg without vector content and without gpkg_geometry_columns table in vector mode if we also open in update mode. ==> So that means in your above case you must remove the -ro flag - remove capability of opening a .gpkg without vector content but with gpkg_geometry_columns table in vector mode if we only open in read-only mode ==> this is for consistency with the above behaviour. Summary is : if you open in vector mode something that has no vector, it doesn't make sense in read-only mode for most use cases (think to a vector-only capable software that would face a raster-only .gpkg). For advanced use cases, you need to specify the update mode (ie remove the -ro flag). Or if you exclude the GPKG driver completely with --config OGR_SKIP GPKG, the SQLite driver will be used as a fallback. - fix creation of a vector layer in a database if it initially lacks a gpkg_geometry_columns table The very small core of the geopackage specification makes it quite tricky to support all potential combinations of valid GeoPackage. Even -- Spatialys - Geospatial professional services http://www.spatialys.com
_______________________________________________ gdal-dev mailing list [email protected] https://lists.osgeo.org/mailman/listinfo/gdal-dev
