forked from qgis/QGIS
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make root bounding volume accessible from tiled mesh data provider,
fix extent/crs handling for sphere/box bounding volume types There's a tricky consideration here -- the default crs for sphere/ box bounding volumes is EPSG:4978. But we CANNOT transform from EPSG:4978 without using valid z values (otherwise we get nonsense results). This raises an issue with all the various QgsMapLayer methods which use QgsMapLayer::crs to transform layer properties, eg the layer's extent. If we advertise the layer (correctly) as EPSG:4978, then the layer's extent will be incorrectly calculated in 1000s of places in QGIS (and we are violating the api design of these methods!) So we handle this by always advertising these sources as EPSG:4979 (ie a geographic degrees based CRS of WGS84+height), and transform the source's bounding volume to EPSG:4979 within the data provider, considering correctly the source's z values, and use THIS as the data provider's extent. Then we add a new method to the QgsTiledMeshDataProvider interface for meshCrs(), which returns the ACTUAL crs that the mesh geometries are in (ie. EPSG:4978). Care must be taken to use the correct choice of the advertised crs() vs meshCrs() in methods which interact with tiled mesh data.
- Loading branch information
1 parent
541e981
commit 7e35792
Showing
7 changed files
with
212 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.