Opened 3 months ago

Closed 3 months ago

Last modified 3 months ago

#6976 closed defect (fixed)

Can't add GeoPackage layer if gpkg_contents extents are invalid

Reported by: fhoubie Owned by: warmerdam
Priority: normal Milestone: 2.1.5
Component: GDAL_Raster Version: unspecified
Severity: normal Keywords: gpkg
Cc:

Description

GeoPackages? provide an informative set of extents for each layer in gpkg_contents. In theory those extents represent a logical view that can be applied after the layer is added. However, if those extents are invalid for any reason (for example, minY and maxX swapped), the layer can't be added at all.

Actual behavior: Invalid Layer: GDAL provider Cannot open GDAL dataset /Users/JeffYutzler/Data?/ek7demo/ek7demo.gpkg: Illegal min_x/min_y/max_x/max_y values for osm_tiles (file: src/providers/gdal/qgsgdalprovider.cpp row: 174function QgsGdalProvider? Raster layer Provider is not valid (provider: gdal, URI: /Users/JeffYutzler/Data?/ek7demo/ek7demo.gpkg (file: src/core/raster/qgsrasterlayer.cpp row: 668function setDataProvider

Expected behavior: Add the layer, just ignore the invalid extents (don't zoom in or anything) and maybe give an informative message.

Linked to http://issues.qgis.org/issues/16884#change-80979

Change History (7)

comment:1 Changed 3 months ago by Even Rouault

Resolution: fixed
Status: newclosed

In 39645:

GPKG: do not error out if extent in gpkg_contents is present but invalid (fixes #6976)

comment:2 Changed 3 months ago by Even Rouault

In 39646:

GPKG: do not error out if extent in gpkg_contents is present but invalid (fixes #6976)

comment:3 Changed 3 months ago by Even Rouault

In 39647:

GPKG: do not error out if extent in gpkg_contents is present but invalid (fixes #6976)

comment:4 Changed 3 months ago by Even Rouault

Component: defaultGDAL_Raster
Keywords: gpkg added
Milestone: 2.1.5

comment:5 Changed 3 months ago by Even Rouault

In 39648:

GPKG: do not take into account gpkg_contents for the extent of vector layers when it is present but invalid (fixes #6976)

comment:6 Changed 3 months ago by Even Rouault

In 39649:

GPKG: do not take into account gpkg_contents for the extent of vector layers when it is present but invalid (fixes #6976)

comment:7 Changed 3 months ago by Even Rouault

In 39650:

GPKG: do not take into account gpkg_contents for the extent of vector layers when it is present but invalid (fixes #6976)

Note: See TracTickets for help on using tickets.