Open jratike80 opened 2 years ago
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.
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.
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.