[postgis-users] Error in transforming between NAD83 and NAD27 datums

Lee Hachadoorian Lee.Hachadoorian+L at gmail.com
Wed Feb 17 14:08:43 PST 2016


If you are trying to go from dd NAD83 to dd NAD27, you have gotten the
SRIDs backwards in your statement. You are using ST_SetSRID to tell
PostGIS that the original coordinates are NAD27 and then transforming
to NAD83.

When I switch the SRIDs in your statement, I get very close to the
answer you are looking for:

"POINT(-107.073884255496 42.9399531062308)"

Best,
--Lee

On Wed, Feb 17, 2016 at 4:24 PM, Mark D. Andersen <mda at uwyo.edu> wrote:
> I am experiencing errors when I try to use ST_Transform to convert points
> from projections using NAD27 to NAD83, and vice versa.  I don’t receive any
> errors back when I run ST_Transform, but the coordinates that are returned
> are incorrect.  The amount by which they are off (about 50 meters) is the
> amount of error I would expect with an incorrectly specified datum, so I am
> fairly certain that PostGIS is not transforming between NAD27 and NAD83, and
> vice versa.
>
>
>
> ----go from dd NAD83 to dd NAD27
>
> SELECT
> ST_X(ST_TRANSFORM(ST_SETSRID(ST_MAKEPOINT(-107.074497916,42.9399159501),4267),4152)),ST_Y((ST_TRANSFORM(ST_SETSRID(ST_MAKEPOINT(-107.074497916,42.9399159501),4267),4152)));
>
> --should return -107.073884255, 42.9399531071 (or so), but actually returns
> -107.074497916,42.939915951
>
>
>
> I get the same scale of error when trying to go between UTM Zone 13 NAD83
> and UTM Zone 13 NAD27 – it’s basically just giving me back the same
> coordinates that go in, without doing the datum transformation.
>
>
>
> SELECT Postgis_full_version() returns:
>
>
>
> postgis_full_version
>
> POSTGIS="2.2.1 r14555" GEOS="3.4.2-CAPI-1.8.2 r3921" PROJ="Rel. 4.8.0, 6
> March 2012" GDAL="GDAL 1.9.2, released 2012/10/08" LIBXML="2.9.1" RASTER
>
>
>
> What am I missing?
>
>
>
>
>
>
>
>
>
> Mark D. Andersen
>
> Spatial Ecologist // GIS Analyst
>
>
>
> Wyoming Natural Diversity Database
>
> University of Wyoming
>
> Department 3381 // 1000 E. University Ave.
>
> Laramie, Wyoming   82071
>
> PHONE: 307 766 3036
>
> FAX: 307 766 3026
>
> EMAIL: mda at uwyo.edu
>
>
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/postgis-users



-- 
Lee Hachadoorian
Asst Professor of Geography, Dartmouth College
http://freecity.commons.gc.cuny.edu/


More information about the postgis-users mailing list