Skip to content
This repository has been archived by the owner on Aug 14, 2022. It is now read-only.

Transform 3D data to lat lon. #68

Open
raphaeljolivet opened this issue Jul 28, 2021 · 0 comments
Open

Transform 3D data to lat lon. #68

raphaeljolivet opened this issue Jul 28, 2021 · 0 comments

Comments

@raphaeljolivet
Copy link

raphaeljolivet commented Jul 28, 2021

Hi, thanks for this work.
This is very useful.

If you happen to need to project back the 3D x,y,z coordinates to geographic (lat,lon) coordinates, be aware that Google seems to model the earth as a perfect sphere (rather than an ellipsoid).

Hence, you can get lat, lon from basic trigonometry (here in Python) :

lon = atan2(y, x) * 180 / pi
lat = atan2(z, sqrt(x*x + y*y)) * 180 / pi
height = sqrt(x * x + y * y + z * z)

Those coordinates are then compliant with WGS84 / EPSG:4326

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

No branches or pull requests

1 participant