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

DataStoreDataSource does not read extent of gpkg table #47

Open
jratike80 opened this issue Feb 21, 2022 · 2 comments
Open

DataStoreDataSource does not read extent of gpkg table #47

jratike80 opened this issue Feb 21, 2022 · 2 comments

Comments

@jratike80
Copy link
Member

If a table from a geopackage is added into the map so that no features in the gpkg table intersect with the map view, it is impossible to zoom to the layer and find the data with Zoom to layer. The only workaroud that I have invented so far is to run a database query from the same layer as "select * from layer limit 1" for getting something to zoom to.

Extent is usually available in the table "gpkg_contents", in the fields "min_x", "min_y", "max_x", "max_y". Also field "srs_id" could be useful.

@mukoki
Copy link
Contributor

mukoki commented May 21, 2022

Nice workaround Jukka.
It is probably possible to use min_x, min_y, max_x, max_y as suggested, once we know we are reading a gpkg database and not a pure spatialite one.
One small drawback I can see is that if the data table is very big, the first thing OpenJUMP will do is to try to load everything and throw an OOME.
I think this problem is not specific to spatialite and that postgis driver behaviour has currently the same limitation.

@edeso
Copy link
Member

edeso commented May 22, 2022

One small drawback I can see is that if the data table is very big, the first thing OpenJUMP will do is to try to load everything and throw an OOME.

we could do a COUNT first and have the user limit request manually if a configurable number of features (to prevent RAM outage) is exceeded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants