How can I convert a point in a given CRS I know, to ECEF, using Proj4?

Is there an EPSG code for ECEF coordinates? Or is there a way to create a proj4 transform object to convert from and to ECEF coordinates?

  • Possibly try the +geoc option. I don't know if it will accept EPSG:4978.
    – mkennedy
    Jun 20, 2017 at 22:53

1 Answer 1


Using the C API: Create your Proj4 objects with pj_init_plus(), which takes a proj4 string as an argument. You must know the proj4 strings that correspond to your origin and destiny CRS. Then use pj_transform to transform the points from one CRS to the other.

Alternatively you can use the cs2cs tool, which also takes the proj4 strings as arguments. Link: http://proj4.org/apps/cs2cs.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.