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

proj4 +towgs84 property in EPSG:2039 gives offset in transformation #194

Open
shmueldarchi opened this issue Jan 24, 2023 · 5 comments
Open

Comments

@shmueldarchi
Copy link

I used your proj4 value for transforming coordinates from WGS84 to EPSG:2039 with OL Transform and Proj4js. The transformation had an offset of about 100 meters.
After researching, I found that the value had a transformation from:
+proj=tmerc +lat_0=31.7343936111111 +lon_0=35.2045169444444 +k=1.0000067 +x_0=219529.584 +y_0=626907.39 +ellps=GRS80 +towgs84=23.772,17.49,17.859,0.3132,1.85274,-1.67299,-5.4262 +units=m +no_defs +type=crs
to:
+proj=tmerc +lat_0=31.7343936111111 +lon_0=35.2045169444444 +k=1.0000067 +x_0=219529.584 +y_0=626907.39 +ellps=GRS80 +towgs84=-24.0024,-17.1032,-17.8444,-0.33009,-1.85269,1.66969,5.4248 +units=m +no_defs +type=crs.
After the change, the transform worked correctly.

NOTE
I didn't see any open source that gives this value by default, so if it's not correct, I would like to know.

BR,

@rouault
Copy link

rouault commented Jun 14, 2024

The same issue has just been reported to PROJ at OSGeo/PROJ#4170 regarding EPSG:31370 "Belgian lambert 72". It would be nice to have this corrected, as exporting wrong transformation parameters is causing downstream issues.

@rouault
Copy link

rouault commented Jun 14, 2024

@shmueldarchi inverting the sign of the 4th, 5th and 6th parameters of towgs84 also do it:

+proj=tmerc +lat_0=31.7343936111111 +lon_0=35.2045169444444 +k=1.0000067 +x_0=219529.584 +y_0=626907.39 +ellps=GRS80 +towgs84=23.772,17.49,17.859,-0.3132,-1.85274,1.67299,-5.4262 +units=m +no_defs +type=crs

@rouault
Copy link

rouault commented Jun 24, 2024

Cf OSGeo/PROJ#4170 (comment) for the analysis of the root cause: the parameters of Helmert transformation using the Coordinate Frame rotation convention are used unmodified in a TOWGS84 clause. But a TOWGS84 clause requires them to use the Position Vector convention, which differs from the Coordinate Frame one by the sign of the rotation terms (4th, 5th and 6th terms)

@klokan
Copy link
Member

klokan commented Jun 24, 2024

Thanks for spotting the bug! Thank you, @rouault, for your comments here...

This should be fixed together with OSGeo/PROJ#4170 in the upcoming update of the webpage by @TomPohys

Perhaps we could schedule a call to discuss the defined problems during FOSS4GE?
I was just talking to @hobu on LinkedIn... we are keen to help and reduce pains, and make this project better

@rouault
Copy link

rouault commented Oct 17, 2024

This issue (and #190 as well) seems to have been fixed, but looking at https://github.com/maptiler/epsg.io/commits/master/ , I don't see any relevant commit but a README update (does https://github.com/maptiler/epsg.io reflect what runs on the epsg.io website... ?) . @jachym ?

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

No branches or pull requests

3 participants