forked from OSGeo/PROJ
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DerivedProjectedCRS WKT import: workaround lack of explicit CS in BAS…
…EPROJCRS Current WKT2 grammar doesn't allow an explicit CS (Coordinate System) in the BASEPROJCRS of a DERIVEDPROJCRS. This leads to ambiguities when instanciating the BASEPROJCRS. Cf OSGeo/gdal#9732 (comment) for a longer analysis When importing such a DerivedProjectedCRS, we apply the following strategy to try to reconstrut the CS of the baseProjCRS: - if the baseProjCRS has an ID[], do a datebase lookup for this object, and if found, use its CS - otherwise, do a database lookup from the name of the baseProjCRS, and if found, use its CS - otherwise, browse through the PARAMETERs of the CONVERSION of the BASEPROJCRS, and if there is at least one such PARAMETER that has a linear unit, and if all PARAMETERs with a linear unit have the same one, then use it to reconstruct a Easting/Northing CartesianCS. - otherwise, fallback to current behaviour, that is return a Easting/Northing CartesianCS with metre unit. Fixes OSGeo/gdal#9732
- Loading branch information
Showing
2 changed files
with
248 additions
and
2 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