Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't add GeoPackage layer if gpkg_contents extents are invalid #24783

Closed
qgib opened this issue Jul 18, 2017 · 5 comments
Closed

Can't add GeoPackage layer if gpkg_contents extents are invalid #24783

qgib opened this issue Jul 18, 2017 · 5 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Vectors Related to general vector layer handling (not specific data formats)

Comments

@qgib
Copy link
Contributor

qgib commented Jul 18, 2017

Author Name: Jeff Yutzler (@jyutzler)
Original Redmine Issue: 16884
Affected QGIS version: 2.18.10
Redmine category:vectors


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.

@qgib
Copy link
Contributor Author

qgib commented Jul 18, 2017

Author Name: Giovanni Manghi (@gioman)


  • category_id was changed from Data Provider/SpatiaLite to Vectors

@qgib
Copy link
Contributor Author

qgib commented Jul 18, 2017

Author Name: Jeff Yutzler (@jyutzler)


Note: I first discovered the issue with a raster dataset, not vector.
Test data: https://portal.opengeospatial.org/files/?artifact_id=74866&version=1 (note: > 400MB file)

@qgib
Copy link
Contributor Author

qgib commented Jul 18, 2017

Author Name: Even Rouault (@rouault)


Jeff,

The ticket is purely a GDAL one so should be opened in the GDAL bug tracker ( https://trac.osgeo.org/gdal/newticket ). Interestingly I see there's actually no requirements for the gpkg_contents bbox to be even a valid one with min_x < max_x and min_y < max_y. So yes the driver is probably a bit too picky and should default to using the extent of gpkg_tile_matrix_set as it would do if there was no gpkg_contents bbox at all.

The link you provide to the dataset is not accessible without OGC credentials.

@qgib
Copy link
Contributor Author

qgib commented Jul 18, 2017

Author Name: Giovanni Manghi (@gioman)


  • resolution was changed from to up/downstream
  • status_id was changed from Open to Closed

@qgib qgib closed this as completed Jul 18, 2017
@qgib
Copy link
Contributor Author

qgib commented Jul 24, 2017

Author Name: Even Rouault (@rouault)


Fixed in GDAL per https://trac.osgeo.org/gdal/ticket/6976

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! Vectors Related to general vector layer handling (not specific data formats) labels May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Vectors Related to general vector layer handling (not specific data formats)
Projects
None yet
Development

No branches or pull requests

1 participant