Skip to content
Prev 17085 / 29559 Next

function to convert 3D geographical coordinates to Cartesian?

On Sun, 30 Dec 2012, Tom Roche wrote:

            
Have you searched the PROJ.4 list archives? My guess is that the problem 
is intractable, because your apparent elevation at the geographical 
coordinate point is crucially dependent on the datum. If the datum is 
unknown, then no geodetic transformation will be well-defined. If you do 
have the datum, that would help. This looks rather like backwards GPS, so 
maybe a GPS text would point to appropriate algorithms?

If you look at the C code underlying spTransform(), you'll see that the 
call to pj_transform() sets z to zero, that is to the datum surface, and 
the returned values are discarded. The most robust route forward might be 
to permit 3D SpatialPoints to be transformed directly, and choose a 
geo-centric target projection. If you have a data set case with both the 
input and matching output data, I could take a look.

Best wishes,

Roger