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

Unexpected result converting lat,lon on sphere to lat,lon on WGS84 #2860

Closed
andypbarrett opened this issue Sep 17, 2021 · 1 comment
Closed

Comments

@andypbarrett
Copy link

I'm trying to convert lat,lon on a sphere to lat,lon on WGS84.

$ cs2cs +proj=lonlat +ellps=sphere +R=6367470 +to +proj=lonlat +ellps=WGS84 in.txt 
0dE	0dN 0.000
10dE	60dN 0.000
60dE	10dN 0.000
0dE	90dN 0.000
0dE	90dS 0.000
45dE	45dN 0.000

$ cat in.txt
0 0
10 60
60 10
0 90
0 -90
45 45

Expected Output

Latitude on a sphere should be different from latitude on an ellipsoid

Environment Information

Installation method

Installed via
conda install pyproj

@rouault
Copy link
Member

rouault commented Sep 17, 2021

Unexpected for you, but expected by design of PROJ. Your source and target CRS lack a datum description. They are just raw ellipsoids, so we don't know how to relate them which each other. If the 2 CRS have the same geocentric origin and axis alignment, then you could add a +towgs84=0,0,0 to each one, and you'd probably get the result you expect

$ echo 10 60 | cs2cs +proj=lonlat +ellps=sphere +R=6367470 +towgs84=0,0,0 +to +proj=lonlat +ellps=WGS84 +towgs84=0,0,0
10dE 60d9'58.406"N 0.000

@rouault rouault removed the bug label Sep 17, 2021
@rouault rouault closed this as completed Sep 17, 2021
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

No branches or pull requests

2 participants