-
Notifications
You must be signed in to change notification settings - Fork 67
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
Wrong parameters in towgs84 for EPSG:3021 (RT90, Sweden) #190
Comments
Hi. Can you please share a snippet about how you are using this proj4 to transform the coordinates? |
Thanks for looking into ths. I'm using proj4js and the proj4js-definition from https://epsg.io/3021.js. According to http://proj4js.org/#:~:text=4326%27))%3B-,Axis%20order,-By%20default%2C%20proj4 (Note that the presentation of RT90 coordinates is a bit confusing with X,Y where X=Northing and Y=Easting)
import proj4 from "proj4";
// Defs from https://epsg.io/3021.js
proj4.defs("EPSG:3021","+proj=tmerc +lat_0=0 +lon_0=15.8082777777778 +k=1 +x_0=1500000 +y_0=0 +ellps=bessel +towgs84=414.1,41.3,603.1,0.855,-2.141,7.023,0 +units=m +no_defs +type=crs");
const [ew, ns] = [1654936, 6404561]; //Lummelunda Cave, Gotland in EPSG:3021 (RT90)
const [lon, lat] = proj4("EPSG:3021", "EPSG:4326", [ew, ns]);
console.log([lon,lat]); // prints: [ 18.41059513866261, 57.74033121915699 ] 265 meters off
// Should be: [ 18.40681206572018, 57.73905641421247 ] Using proj4js version 2.8.0 |
Can confirm that we also have trouble with the EPSG:3021 and using the corrected parameters gives us the correct result. |
Thanks for a great site!
There seems to be a problem with EPSG:3021.
https://epsg.io/3021 gives:
+towgs84=414.1,41.3,603.1,0.855,-2.141,7.023,0
When using this definition (With Proj4JS), the transformed coordinates is about 100m off.
The correct parameters seems to be:
+towgs84=414.1,41.3,603.1,-0.855,2.141,-7.023,0
Note the reverted signs for the last three parameters.
Also see this forum-post: https://gis.stackexchange.com/questions/444703/is-proj4js-definition-for-epsg3021-rt90-wrong-on-https-epsg-io-3021
The text was updated successfully, but these errors were encountered: