[R-sig-Geo] Transforming from WGS84 to NAD83 Stateplane Alaska zone 1

Roger Bivand Roger.Bivand at nhh.no
Thu Jul 19 15:50:49 CEST 2012


On Thu, 19 Jul 2012, Barry Rowlingson wrote:

> On Thu, Jul 19, 2012 at 3:11 AM, Gregovich, Dave P (DFG)
> <dave.gregovich at alaska.gov> wrote:
>> Hello,
>>
>> I apologize for reposting, but am still confounded after spending more time
>> with the following problem, despite some help from the group.
>>
>>
>>
>> I am attempting to learn GIS in R. I have worked with ArcGIS a lot, and know
>> that my data is projecting correctly in that environment relative to other
>> trusted data.  When I import a text file of animal locations into ArcGIS,
>> then define the projection as WGS84, then transform to NAD83, I can obtain
>> proj4strings from the resulting shapefiles to use as follows:
>>
>
> Yeah there's a constant shift between the R coordinates and the ESRI
> coordinates:
>
> > coordinates(bear_R_nad83)-coordinates(bear_ArcGIS_nad83)
>      coords.x1 coords.x2
> [1,]   4181322  -5575097
> [2,]   4181322  -5575097
> [3,]   4181322  -5575097
>
> - a workaround would just be to add this offset to your coordinates....
>
> I've tried to figure out where this is coming from but with no
> success. I've not had any problems with coordinates as long as I stick
> to EPSG-defined coordinate systems. I don't have a copy of ArcGis to
> hand, but I recall it has all sorts of other systems in it....

The EPSG codes 3468 and 26931 (Alaska I NAD83) are off by:

> coordinates(bear_nad83) - coordinates(spTransform(bear_wgs84, 
+ CRS("+init=epsg:26931")))
       coords.x1  coords.x2
  [1,]  1.191571 -0.4911515
  [2,]  1.191572 -0.4911513
  [3,]  1.191571 -0.4911517
....

with the main difference being:

> CRS("+init=epsg:26931")
CRS arguments:
  +init=epsg:26931 +proj=omerc +lat_0=57 +lonc=-133.6666666666667
+alpha=323.1301023611111 +k=0.9999 +x_0=5000000 +y_0=-5000000
+gamma=323.1301023611111 +datum=NAD83 +units=m +no_defs +ellps=GRS80
+towgs84=0,0,0

and

> CRS(proj4string(bear_nad83))
CRS arguments:
  +proj=omerc +lat_0=57 +lonc=-133.6666666666667
+alpha=-36.86989764583333 +k=0.9999 +x_0=5000000 +y_0=-5000000
+datum=NAD83 +units=m +no_defs +ellps=GRS80 +towgs84=0,0,0

+alpha being 360-alpha, and +gamma being declared. readOGR() is reading 
the contents of bear_ArcGIS_nad83.prj correctly, +alpha is given there as 
a negative number, and no +gamma is given, which appears to be why 
projection is failing. There are more details of the complications of the 
(Hotine) oblique mercator here:

http://www.remotesensing.org/geotiff/proj_list/epsg_om.html

Hope this helps,

Roger

>
> Barry
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

-- 
Roger Bivand
Department of Economics, NHH Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no



More information about the R-sig-Geo mailing list