[R-sig-Geo] gps file->WGS84->NAD83 Alaska stateplane zone 1

Gregovich, Dave P (DFG) dave.gregovich at alaska.gov
Thu Jul 5 20:59:46 CEST 2012


Hello, 

 

I am new to R-sig-geo, thanks for your patience.

 

I am trying to bring GPS animal collar data into R and correctly project
it to NAD83 Alaska Stateplane zone 1 (epsg:26931 should be the correct
proj4 code). In leiu of any other way to verify if my projection is
working, I am comparing it to results in ArcGIS (this is the first time
I have tried to bring GIS data into R). The problem I am having is that
the ArcGIS and R (via RGDAL and sp) processes result in vastly different
projected coordinates. Below is the R code I am using:

 

#wgs 84 definition

wgs84<-"+init=epsg:4326"

#NAD 83 stateplane Alaska zone 1 definition

ak.sp.z1<-"+init=epsg:26931"

 

 

txt.loc<-"C:/bear414.txt"

bear414<-read.table(txt.loc,header=T,sep=",",stringsAsFactors=F)

coordinates(bear414)<-c("Long_","Latitude")

proj4string(bear414)<-CRS(wgs84)

bear414_nad83<-spTransform(bear414,CRS(ak.sp.z1))

writeOGR(obj=bear414_nad83,dsn="C:/dave/temp/rgis",layer="test414",

 
driver=as.character(ogrDrivers()[7,1]),overwrite_layer=TRUE)

 

I realize that this is not an ArcGIS-related list, but in case it helps,
the process I use in ArcGIS is essentially:

Display xy-coordinates, export to WGS84 shapefile, and project to new
NAD83 Alaska stateplane zone 1 shapefile. Also, when I use proj4string()
on NAD83 Alaska stateplane zone 1 shapefiles that are from a published
source (eg. the Southeast Alaska GIS library), the string is identical
to that referenced by epsg:26931.

 

The rough difference (clicking on eye-balled centroid) between the
ArcGIS and R results I am getting are: ArcGIS--    x: 726509 y: 801767,
R--   x: 4912400 y: -4784000

 

Thanks so much for your time. I have spent almost two entire days on
this problem and look forward to eventually overcoming this hurdle!

 

Dave

 

system: windows 7 x64

windows version: build 7601, Service Pack 1

R version: 2.15.1

 

 

__________________________________

Dave Gregovich

Research Analyst

Alaska Department of Fish and Game

Wildlife Conservation Division

Douglas, AK 99821

(907) 465-4291

dave.gregovich at alaska.gov

__________________________________

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20120705/7b76cff2/attachment.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: bear414.txt
URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20120705/7b76cff2/attachment.txt>


More information about the R-sig-Geo mailing list