Skip to content

convert (lat -lon) coordinates to cartesian coordinates

2 messages · Rolf Turner, Michael Sumner

#
On 01/08/11 10:25, Angelo Moreno wrote:
It's really not that simple.  Latitude and longitude are coordinates on
the surface of a sphere.  Cartesian coordinates are coordinates on a
flat surface.  They are fundamentally incompatible. There are various
***projections*** of regions of a spherical surface onto a plain that 
provide
approximate relationships.  How good these approximations are depends on
the size and shape of the region on the spherical surface.

There may be tools in the "sp" package which could be of use to you.

     cheers,

         Rolf Turner
#
As Rolf suggests, there is spTransform in rgdal (supported by sp
package) for general coordinate transformation using the PROJ.4
library.

What  projection is appropriate for *completely* depends on what you
need to do and where your data are from (and their extent), though
there are some pretty general guidelines that can be used to make a
safe decision.

If you just want distance on the WGS84 ellipsoid there is spDistsN1 in
the sp package, but if you want to input projected coordinates into
spatstat functions you'll need to find out what projection is
appropriate from the beginning.

Let us know more about the requirements and it will be easier to make
suggestions.

Cheers, Mike.
On Mon, Aug 1, 2011 at 8:45 AM, Rolf Turner <r.turner at auckland.ac.nz> wrote: