[R-sig-Geo] function to convert 3D geographical coordinates to Cartesian?

Tom Roche Tom_Roche at pobox.com
Sun Dec 30 14:37:49 CET 2012


Tom Roche Sun, 30 Dec 2012 00:40:55 -0500
>> Is there packaged code to convert geographical coordinates (e.g.,
>> longitude, latitude, elevation) to [simple] Cartesian coordinates
>> in 3-space?

Edzer Pebesma Sun, 30 Dec 2012 11:11:19 +0100
> rgdal::spTransform?

I'm aware of that, but don't how to apply it to this case. I believe I
see how to create/specify the proj4string for the input: for input
coordinates of the form (longitude, latitude, elevation) one would use
CRS("+proj=longlat +ellps=WGS84") or similar. (Am I missing something?)

But I don't know how to specify the proj4string in order to get purely
Cartesian output, e.g., to get output coordinates like (x,y,z) relative
to (e.g.) the center of the ellipsoid. And my reading of the best PROJ
documentation of which I'm aware,

ftp://ftp.remotesensing.org/proj/OF90-284.pdf

, has not helped. Unless ... 

Is it the case that spTransform outputs Cartesian coordinates?
If so, relative to what origin?

TIA, Tom Roche <Tom_Roche at pobox.com>



More information about the R-sig-Geo mailing list