Comments (4)
You are correct. The demo page zooms to the extent that is declared in the feature table. It is shown on a web Mercator map and that is why it appears to zoom to the entire world plus some because web Mercator only extends to ~85 and ~-85 degrees latitude.
from geopackage-js.
Hi @bradh ,
The Contents (gpkg_contents) table is the only place a feature table identifies the overall bounds of the data. Evaluating each feature row for it's envelope or bounds does not make sense for a zoom operation. There could be thousands of geometries in each feature table saved with or without individual envelopes specified.
Although the bounds in the Contents are optional, we recommend specifying the minimum data encompassing bounds. For your example, the entire world is specified as the feature table data bounds. If you update the gpkg_contents min_x, min_y, max_x, max_y values, zoom should work correctly for you.
from geopackage-js.
I'm fairly familiar with GeoPackage, it was more just user surprise.
I realise that its just a demo app, but keeping a bounding box during rendering wouldn't be that onerous.
from geopackage-js.
I would argue that the bounding box specified by the contents table is the one that should be used because what if the application does not actually load all of the data into the map and only queries for what is visible. Then there would be no way of knowing how many other features there are that fall outside of the current viewport. Additionally, some applications will query for a count of features in the current viewport and not display them if there are too many. This would also cause the application to not actually know the actual bounding box of the data. Since a contents table is required for all feature tables, and that table has a bounding box, I feel that the only reliable way of zooming, regardless of the implementation of how the features are loaded, is to use the bounding box provided. Otherwise why even bother having that in the contents table if everyone is going to just set it to the world extents?
from geopackage-js.
Related Issues (20)
- Remove console.log of geoPackageConnection HOT 1
- Incompatible with Node.js >= 14.0.0 HOT 2
- TypeError: GeoPackageAPI.open is not a function HOT 3
- node js code not working
- Running out of reserved function pointers
- Set GeoJson id from id property HOT 1
- geopackage.min.js not found HOT 1
- Install @ngageoint/geopackage on Docker node:17 HOT 4
- firefox issue, geopackage image not loading. HOT 1
- Convert GeoPackage to geojson HOT 3
- Create fails in browser HOT 1
- Example: Create a new GeoPackage HOT 2
- Unable to detect CRS, GeoJSON has no "crs" property
- implement SQL over HTTP HOT 1
- Getting tiles from a bounding box HOT 1
- Add data to existing GeoPackage HOT 3
- Column data type detection should be case insensitive
- Support for new OGC GPKG Extensions to support Vector Tiles PBF HOT 1
- unable to initialize canvas HOT 2
- How can i convert MBTile to Geopackage in the command line? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from geopackage-js.