code to convert 3D geographical coordinates to Cartesian?
On Dec 30, 2012, at 8:14 PM, Tom Roche wrote:
Is there packaged code to convert geographical coordinates (e.g., longitude, latitude, elevation) to Cartesian coordinates in 3-space?
...
Net: the task seems straightforward enough, but there's certainly scope for error, so I'd prefer to use tested, well-used code if available.
Have you checked the spatial stats task view on CRAN?
I have, and can't believe that functionality this fundamental is not API.
You have a very different notion of what would be considered core capabilities in a statistics program than I have.
But I have looked at several packages and am not seeing it. I
suspect that either it's so low-level that it's just not exposed as
API,
or just that there is API but I'm not seeing it in the package docs
("hidden in plain sight"). Hence I ask
Am I missing something?
How did you search?
install.packages("sos")
require(sos)
> findFn("latitude longitude cartesian")
Two different packages with functions that sound as though they might
be useful.
sphereplot::sph2car "Transforms 3D spherical coordinates to cartesian
coordinates"
GEOmap::Lll2xyz "List Lat-Lon to cartesian XYZ"
David. David Winsemius, MD Alameda, CA, USA