[postgis-tickets] [PostGIS] #5207: ST_Transform NAD27 --> WGS84 Inconsistencies

PostGIS trac at osgeo.org
Wed Aug 10 06:14:32 PDT 2022


#5207: ST_Transform NAD27 --> WGS84 Inconsistencies
--------------------------+---------------------------
 Reporter:  judsoncrouch  |      Owner:  pramsey
     Type:  defect        |     Status:  new
 Priority:  high          |  Milestone:  PostGIS 3.2.3
Component:  postgis       |    Version:  3.2.x
 Keywords:                |
--------------------------+---------------------------
 Hello PostGIS Team,

 I've encountered an issue when transforming NAD27 coordinates to WGS84.
 The resulting WGS84 coordinates are off by quite a bit (10-12 feet in most
 cases) and it lead me to digging into why that is so. As a control, I
 converted the same point from NAD27 to WGS84 in ArcMap and hold that to be
 the truth.

 {{{
 select st_transform(st_setsrid(ST_POINT(-99.723991251, 35.954241741),
 4267), 4326)

 -99.7243815258533 35.95428699761289 -- ESRI Transformed (Control)
 -99.7243847871355 35.954284680650595 -- Result of ST_TRANSFORM on CentOS7
 }}}




 Thinking it may be a difference in configuration or PROJ grids, I
 compared/contrasted a fresh install of Postgresql 13 and Postgis 3.2.2 on
 CentOS 7 with the official
 [https://registry.hub.docker.com/layers/postgis/postgis/postgis/13-3.2/images/sha256-74a3b055a07c1c88e5fa6fceb3e824e29e50df3b2aea270c3fa9515419f90f48?context=explore/
 Postgis Docker image] for the same versions.


 **CentOS 7**
 {{{
 select postgis_full_version()

 POSTGIS="3.2.2 628da50" [EXTENSION] PGSQL="130" GEOS="3.10.3-CAPI-1.16.1"
 SFCGAL="1.3.7" PROJ="8.2.1" GDAL="GDAL 3.4.3, released 2022/04/22"
 LIBXML="2.9.7" LIBJSON="0.13.1" LIBPROTOBUF="1.3.0" WAGYU="0.5.0
 (Internal)" TOPOLOGY RASTER
 }}}

 **Docker**
 {{{
 select postgis_full_version()

 POSTGIS="3.2.2 628da50" [EXTENSION] PGSQL="130" GEOS="3.9.0-CAPI-1.16.2"
 PROJ="7.2.1" LIBXML="2.9.10" LIBJSON="0.15" LIBPROTOBUF="1.3.3"
 WAGYU="0.5.0 (Internal)" TOPOLOGY
 }}}


 Now here is where I get confused. When I run the same ST_TRANSFORM as
 above on the Docker image, I get exactly what I need.

 {{{
 select st_transform(st_setsrid(ST_POINT(-99.723991251, 35.954241741),
 4267), 4326)

 -99.7243815258533 35.95428699761289 -- ESRI Transformed (Control)
 -99.7243815258398 35.95428699761243 -- Official PostGIS Docker Image
 Transformed - proj 7.2.1

 -99.7243847871355 35.954284680650595 -- Result of ST_TRANSFORM on CentOS7
 }}}

 I have done the following:
 * Ensured proj-data grids are installed. Didn't help.
 * Removed proj-data grids and copied grids from Docker to CentOS7 proj
 location. Still no luck.
 * Altered spatial_ref_sys entries for 4267 and 4326 (NAD27 and WGS84,
 respectively) with no luck either.

 Can someone on the PostGIS team please help me understand the differences?
 My company relies on ST_TRANSFORM from NAD27 to WGS84 and right now we are
 stuck. Unfortunately, we cannot deploy the Docker container for production
 use, we must use CentOS7 install.

 Thanks for your time and your help!
 Judson Crouch
-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5207>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-tickets mailing list