I am developing a little web app to transform coordinates between CRSs. To do that I am using proj4js, but I notice that proj4js can't work with geocentric CRSs.

Is there another tool similar to proj4 to work with geocentric CRSs, or I have to code the formulas between geocentric-geographic coordinates. Once I have geographic coordinates I use proj4js to obtain projected coordinates.

  • Where do you notice this? – Ian Turton Feb 23 '16 at 19:03
  • For example. If you define the CRS with code EPSG:4936 as a string and reference using the proj4.defs method: proj4.defs('EPSG:4936', +proj=geocent +ellps=GRS80 +units=m +no_defs); "Uncaught EPSG:4936" message is launched. – Jawensi Feb 24 '16 at 9:06
  • I've tried various systems but every time there is +proj=geocent it fails. On github page there is an issue github.com/proj4js/proj4js/issues/195 which suggests a workaround but I wasn't able to make it work :( – Dan Jun 1 '18 at 10:00

cartopy is a good tool for this. Look at the as_geodetic and as_geocentric functions and associated classes in their CRS docs. It uses proj4 under the hood but is better about dealing with Cartesian 3d.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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