Skip to content

ecef to wgs84 #2488

Discussion options

You must be logged in to vote

The canonical way to convert between WG84 and ECEF is like so:

auto wgs84 = SpatialReference::get("wgs84");
auto ecef = wgs84->getGeocentricSRS();

GeoPoint ecef_point(ecef_srs, src);
GeoPoint wgs84_point = ecef_point.transform(wgs84);

Also, your test ECEF coordinates look out of range to me.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by luohuiiqng
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants