Comments (3)
Hi.
Can you please share a snippet about how you are using this proj4 to transform the coordinates?
I think the issue is with the always_xy
parameter of Proj. In newer versions the axis orientation can be flipped.
from epsg.io.
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
the default is always [x=longitude,y=latitude]
.
My code is only using this order in the code, and not setting the enforceAxis.
(Note that the presentation of RT90 coordinates is a bit confusing with X,Y where X=Northing and Y=Easting)
npm install proj4
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
from epsg.io.
Related Issues (20)
- epsg.io is misleading people in believing it is a reference
- Mention how to add to the database
- Broken reference
- Searching for text with diacritics gives an error
- GDA2020 CRS not displaying coordinates. HOT 1
- ESRI WKTs have wrong authority
- ESRI WKTs all seem to have wrong authority (EPSG listed, not ESRI)
- Adding Test Cases
- Code migration to Python 3.0+ HOT 1
- Get the source of coordinate system information HOT 6
- OGC GML download option HOT 4
- Returned proj4 strings have all had `+type=crs` added HOT 4
- CORS error HOT 1
- Page returns 200 HTTP code despite encountering an error HOT 2
- Wrong bounds in the map view
- adding IAU authority CRSs (for planets and moons)
- Retrieving All CRS
- Retrieve All CRS Records HOT 1
- proj4 +towgs84 property in EPSG:2039 gives offset in transformation HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from epsg.io.