Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust createBoundCRSToWGS84IfPossible() and operation filtering (for POSGAR 2007 to WGS84 issues) (fixes #2356) #2357

Merged
merged 2 commits into from Sep 18, 2020

Conversation

rouault
Copy link
Member

@rouault rouault commented Sep 17, 2020

  • We make createBoundCRSToWGS84IfPossible() more restrictive. If there are more
    than one Helmert transformation from the CRS to WGS 84 covering the area of
    use of the CRS, we do not create a BoundCRS / +towgs84
  • In createOperations() filtering, we are less aggressive in discarding operations
    that have the same area of use but worse accuracy. We do it only if they involve
    more transformation steps.

We now get:

$ projinfo EPSG:5340 -o PROJ
PROJ.4 string:
+proj=longlat +ellps=GRS80 +no_defs +type=crs

$ projinfo -s EPSG:5340 -t EPSG:4326 --spatial-test intersects --summary
Candidate operations found: 2
EPSG:9264, POSGAR 2007 to WGS 84 (2), 0.5 m, Argentina
EPSG:5351, POSGAR 2007 to WGS 84 (1), 1.0 m, Argentina

… POSGAR 2007 to WGS84 issues) (fixes OSGeo#2356)

- We make createBoundCRSToWGS84IfPossible() more restrictive. If there are more
  than one Helmert transformation from the CRS to WGS 84 covering the area of
  use of the CRS, we do not create a BoundCRS / +towgs84
- In createOperations() filtering, we are less aggressive in discarding operations
  that have the same area of use but worse accuracy. We do it only if they involve
  more transformation steps.

We now get:
```
$ projinfo EPSG:5340 -o PROJ
PROJ.4 string:
+proj=longlat +ellps=GRS80 +no_defs +type=crs

$ projinfo -s EPSG:5340 -t EPSG:4326 --spatial-test intersects --summary
Candidate operations found: 2
EPSG:9264, POSGAR 2007 to WGS 84 (2), 0.5 m, Argentina
EPSG:5351, POSGAR 2007 to WGS 84 (1), 1.0 m, Argentina
```
…with greater 'version numbers' are prefered over other ones, when all other comparison criteria are equal. Helps with Amersfoort RD New to EPSG:4326
@rouault rouault merged commit 81aaa47 into OSGeo:master Sep 18, 2020
2 checks passed
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.

None yet

1 participant