[gdal-dev] Ogrinfo does not open any more raster-only geopackage
Even Rouault
even.rouault at spatialys.com
Fri Mar 24 06:41:16 PDT 2017
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20170324/2c2c72e3/attachment.html>
More information about the gdal-dev
mailing list