Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

rouault
Copy link
Member

@rouault rouault commented May 7, 2024

Backport #4124
Authored by: @rouault

rouault added 3 commits May 7, 2024 22:53
…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
Current WKT grammar (as of WKT2 18-010r11) does not allow a
BASEPROJCRS.CS node, but there are situations where this is
ambiguous and we want to allow one.
Cf OSGeo/gdal#9732 (comment)
@rouault rouault added this to the 9.4.1 milestone May 9, 2024
@rouault rouault merged commit 5e9c999 into 9.4 May 9, 2024
@rouault rouault deleted the backport-4124-to-9.4 branch May 9, 2024 19:08
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

Successfully merging this pull request may close these issues.

1 participant