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

convert projection works in 8.9.1 but not in 12.2.0 #446

Closed
basvanbemmel opened this issue Aug 16, 2023 · 10 comments
Closed

convert projection works in 8.9.1 but not in 12.2.0 #446

basvanbemmel opened this issue Aug 16, 2023 · 10 comments
Assignees

Comments

@basvanbemmel
Copy link
Collaborator

conversion from a geometry in EPSG 31300 (belgium) to EPSG 28992 (Netherlands) does work in geodms 8.9.1 but not in 12.2.0.
In 12.2.0 nothing appears in mapview, tableview is empty with only id's.

PD (incl SD) https://pbl.sliksvn.com/ruimtescanner/PBL/ProjDir/branches/Cursus_MartijnSpoon rev10130 (revision numbers matters!)
item: /Vlaanderen/Gemeente_pol/Geometry_rd

8.9.1
image
12.2.0
image

@basvanbemmel
Copy link
Collaborator Author

basvanbemmel commented Aug 16, 2023

opmerking ik zie toch iets verschijnen na 2 a 3 minuten in 12.2.0
in 8.9.1 na 1 seconde

Uploading image.png…

@eoudejans
Copy link
Collaborator

I hotfixed a very similar issue today. Which followed from the projection check I added monday to determine if the projection given as: provider:code ie. EPGS:4326 is actually a projection and not ie. a datum. Testing as we speak to confirm the issue is resolved or requires more investigation. To be continued..

@eoudejans
Copy link
Collaborator

Can confirm that the issue is still present. To be further investigated.

@eoudejans
Copy link
Collaborator

Issue seems resolved. The tricky part is that the table consists of 300 rows, but some geometries consisted of over 10000+ points, which take some time to convert individually. See:

coordinate_transform_issue_446

Closing issue as resolved, to be shipped in an upcoming release of GeoDMS.

@eoudejans eoudejans reopened this Aug 23, 2023
@eoudejans
Copy link
Collaborator

Reopened issue, performance regression needs further investigation.

@eoudejans
Copy link
Collaborator

From the gdal docs on OGRCreateCoordinateTransformation, which we use to create the transformation block, it states several available options.

The OGR_CT_OP_SELECTION appears to be the culprit and default set to PROJ, which means that for every point the best reprojection pipeline is determined, which may involve a Taylor expansion for every area around each point. Changing this option to BEST_ACCURACY makes the code run in a split second again.

@eoudejans
Copy link
Collaborator

Next to the above finding, we also rewritten the coordinate transformation logic to be more clear and efficient, passing in batches of points instead of points separately.

eoudejans added a commit that referenced this issue Aug 23, 2023
… issue #446. Made sure CPLSetConfigOption("OGR_CT_OP_SELECTION", "BEST_ACCURACY"); is set.
@eoudejans
Copy link
Collaborator

Latest version of GeoDMS will be similar in speed for coordinate transformations compared to version 8.9.1. Furthermore we will add multiple point coordinate transformations to our unit tests to test performance regression in the future.

@eoudejans
Copy link
Collaborator

Make regression test for coordinate transformation of multiple geometries. @mtbeek32

@mtbeek32
Copy link
Contributor

regression test added to full test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants