[R-sig-Geo] converting from NAD83 datum to lat,lon

Migun Shakya microbeatic at gmail.com
Tue Feb 26 02:45:50 CET 2013


Hi Erin,
I tried that but ended up getting this error. Does the spTransform
function requires the data to be as data.frame?
Here is what i did to read the data

library(maptools)
library(rgdal)
nc.river<-readShapeSpatial("~/hydromaj/hydromaj_arc.shp") #reading the
shape file

nc1.wgs84 <- spTransform(nc.river,CRS("+proj=longlat +datum=WGS84"))
Error in spTransform(xSP, CRSobj, ...) :
  No transformation possible from NA reference system


Thanks again
Migee

On Mon, Feb 25, 2013 at 5:47 PM, Hodgess, Erin <HodgessE at uhd.edu> wrote:
> Hi!
>
> Suppose your data set is called nc1.df.
>
> Then you can do:
> library(rgdal)
> nc1.wgs84 <- spTransform(nc1.df,CRS("+proj=longlat +datum=WGS84"))
>
>
> ________________________________________
> From: r-sig-geo-bounces at r-project.org [r-sig-geo-bounces at r-project.org] on behalf of Migun Shakya [microbeatic at gmail.com]
> Sent: Monday, February 25, 2013 4:21 PM
> To: r-sig-geo at r-project.org
> Subject: [R-sig-Geo] converting from NAD83 datum to lat,lon
>
> Hi all,
>
> Is there a way/package/trick to convert the NAD83 formatted file to
> lat lon format?
>
> I downloaded the "Major Hydrography" dataset from NC,USA to plot
> rivers into a NC map. However, the dataset is in NAD83 or in state
> plane projection, but i need it to be in lat/lon.
>
>
> Any help would be great.
>
>
> Thanks
> Migee
>
>
> dataset can be found in:
> http://data.nconemap.com/geoportal/catalog/search/resource/details.page?uuid=%7B2515713B-2CA0-476F-863F-61441A9D6F70%7D
>
>
> The downloaded dataset consist of
> hydromaj_arc.dbf
> hydromaj_arc.prj
> hydromaj_arc.shp
> hydromaj_arc.shx
> hydromaj_arc.txt
> hydromaj_poly.dbf
> hydromaj_poly.prj
> hydromaj_poly.shp
> hydromaj_poly.shx
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo



More information about the R-sig-Geo mailing list