[R-sig-Geo] convert NAD83 to latitude/longitude

Barry Rowlingson b.rowlingson at lancaster.ac.uk
Fri Oct 29 18:21:09 CEST 2010


On Fri, Oct 29, 2010 at 3:57 PM, Dazhi Jiao <dazhi.jiao at gmail.com> wrote:
> Hi, Barry,
>
> Thank you for the reply. Here are a few examples.
>
> They are registered to NAD 83 California Zone V in feet. What I want to map
> to should be the most common longitude latitude system. For example,
> 6638699, 1924377 should be projected to -117.745, 34.28
>
>
> 6425591 1894450
> 6425843 1893769
> 6425828 1893347

 Ah ha, that's more like it. I look up California in my handle table
of EPSG codes and find:

+proj=lcc +lat_1=35.46666666666667 +lat_2=34.03333333333333
+lat_0=33.5 +lon_0=-118 +x_0=2000000.0001016 +y_0=500000.0001016001
+ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs

 or epsg:2229 for short is NAD83/California Zone 5 (ftUS)

So I can do:

library(sp);library(rgdal)
pts = data.frame(x=c(6425591,6425843,6425828,6638699),y=c(1894450,1893769,1893347,1924377))
coordinates(pts)=~x+y
proj4string(pts)=CRS("+init=epsg:2229")
ptsLL = spTransform(pts,CRS("+proj=longlat +datum=WGS84"))

giving:

ptsLL:

SpatialPoints:
             x        y
[1,] -118.4500 34.19720
[2,] -118.4492 34.19533
[3,] -118.4492 34.19417
[4,] -117.7450 34.28000
Coordinate Reference System (CRS) arguments: +proj=longlat +datum=WGS84
+ellps=WGS84 +towgs84=0,0,0


How's that?

Barry



More information about the R-sig-Geo mailing list