Thursday, 6 April 2017

arcgis desktop - PROJ4 / PostGIS transformations between WGS84 and NAD83 transformations in Alaska



I'm trying to implement the recommended WGS84 - NAD83 transformation for Alaska using PostGIS. This post: Geographic Transformations in Alaska Between NAD83 and WGS84 indicates the proper transformation in ArcGIS to be WGS_1984_(ITRF00)_To_NAD_1983. I haven't been successful at finding this in spatial_ref_sys. I tried adding my own transformation into spatial_ref_sys using the following proj4text:


+proj=longlat +ellps=GRS80 +datum=NAD83
+towgs84=-0.9956,1.9013,0.5215,-0.025915,-0.009246,-0.011599,-0.00062
+no_defs

The towgs84 values were copied from the listed settings that ArcMap shows when you choose this transformation (reversing the sign because it's to WGS84 in PROJ4 and from WGS84 in ArcMap). In PostGIS, I use it like this, transforming WGS84 to NAD83 using my custom projection, then transforming it again into 4269 (or whatever NAD83 projection I really want, like 3338).


ST_Transform(ST_Transform(geom_wgs84, 900999), 4269)

The problem is that the transformed values don't seem to match the transformations that ArcGIS are using, so if I have a mix of WGS84 data and custom-transformed into NAD83 data, ArcGIS's WGS84 -> NAD83 transformation is different from PostGIS and the data doesn't line up. The errors are small (1-2 meters), but large enough to see.


Can anyone suggest an appropriate PROJ4 string to replicate the results of the ArcMap transformation, or something better for the state of Alaska such as using a NAD grid? Or tell me what I'm doing wrong with my custom projection?




Answer



PROJ.4 uses the position vector method for its 7 parameter transformations. The ArcGIS transformation that you're referring to uses the coordinate frame method. They use different conventions for the rotation values, so switch the signs on the rotation values and retry.


General information:


To change the direction of a 7-parameter transformation (coordinate frame, position vector, Bursa-Wolf), change the signs of all parameters. This is not quite equivalent to calculating a full inversion of the rotation matrix, but usually fine within the accuracy of the transformation.


To convert between the coordinate frame and position vector methods, switch the signs on the rotation parameters only. The two methods use different conventions (one rotates the axes, the other the coordinates/vector).


So Esri's transformation is:


WGS84/ITRF00 to NAD 1983 (approx. CORS96 version)
method: coordinate frame
dx = 0.9956
dy = -1.9013

dz = -0.5215
rx = 0.025915
ry = 0.009426
rz = 0.0011599
ds = 0.00062

Change direction:


NAD 1983 to WGS84/ITRF00  
method: coordinate frame
dx = -0.9956

dy = 1.9013
dz = 0.5215
rx = -0.025915
ry = -0.009426
rz = -0.0011599
ds = -0.00062

Change method:


NAD 1983 to WGS84/ITRF00  
method: position vector

dx = -0.9956
dy = 1.9013
dz = 0.5215
rx = 0.025915
ry = 0.009426
rz = 0.0011599
ds = -0.00062

Note: I haven't tried it, but I think that's the issue.


Disclosure: I work for Esri.



No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...