Opened 12 years ago

Closed 9 years ago

Last modified 9 years ago

#1851 closed defect (fixed)

Wrong parameters for EPSG:3844 in spatial_ref_sys

Reported by: gix Owned by: pramsey
Priority: medium Milestone: PostGIS 2.0.1
Component: postgis Version: 2.0.x
Keywords: Cc:

Description

The transformation parameters between S42 and WGS84 datums wihch are listed inside the EPSG:3844 definition (TOWGS84[33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84]) are valid for Poland, not for Romania. You can see this in the EPSG database: Coordinate Transformation with code 1645: Area of use = Poland - onshore.

The correct parameters for datum transformation in the case of EPSG:3844 are listed in the EPSG database with coordinate transformation code = 15995. These are: 2.329,-147.042,-92.08,0.309,-0.325,-0.497,5.69

Change History (5)

comment:1 by pramsey, 12 years ago

Resolution: fixed
Status: newclosed

Fixed at r9853, thanks.

comment:2 by rouault, 12 years ago

I've created http://trac.osgeo.org/geotiff/ticket/52 , since those kind of issues originate from libgeotiff, and then cascade to GDAL and PostGIS. At the next EPSG refresh, there's a risk of that change to be lost if not fixed in libgeotiff.

comment:3 by tudorbarascu, 9 years ago

Resolution: fixed
Status: closedreopened

Actually, r9853 introduced bigger errors because the coordinate transformation parameters given by the Romanian National Agency for Cadastre and Land Registration ( http://www.ancpi.ro ) are given for the Coordinate Frame Rotation method (https://epsg.io/9607-method) and as proj4 uses the https://epsg.io/9606-method (Position Vector transformation) the sign of the rotation parameters needs to change so that it works in proj4 as referenced at http://proj.maptools.org/gen_parms.html

This is clear from the EPSG database.

SELECT c.coord_op_name, c.coord_op_method_code, a.parameter_value, b.parameter_name
 FROM epsg_coordoperationparamvalue a LEFT JOIN epsg_coordoperationparam b ON a.parameter_code = b.parameter_code
 LEFT JOIN epsg_coordoperation c on a.coord_op_code = c.coord_op_code
 WHERE a.coord_op_code = 15994;
         coord_op_name          | coord_op_method_code | parameter_value |   parameter_name   
--------------------------------+----------------------+-----------------+--------------------
 Pulkovo 1942(58) to ETRS89 (4) |                 9607 |          2.3287 | X-axis translation
 Pulkovo 1942(58) to ETRS89 (4) |                 9607 |       -147.0425 | Y-axis translation
 Pulkovo 1942(58) to ETRS89 (4) |                 9607 |        -92.0802 | Z-axis translation
 Pulkovo 1942(58) to ETRS89 (4) |                 9607 |       0.3092483 | X-axis rotation
 Pulkovo 1942(58) to ETRS89 (4) |                 9607 |     -0.32482185 | Y-axis rotation
 Pulkovo 1942(58) to ETRS89 (4) |                 9607 |     -0.49729934 | Z-axis rotation
 Pulkovo 1942(58) to ETRS89 (4) |                 9607 |      5.68906266 | 

So, the correct parameters should be:

+towgs84=2.3287,-147.0425,-92.0802,-0.3092483,0.32482185,0.49729934,5.68906266

and not as it's now in Postgis - with incorrect rotation parameters

+towgs84=2.329,-147.042,-92.08,0.309,-0.325,-0.497,5.69

As I am not at all familiar with SVN, can someone with commit rights can make the appropriate changes. If you think it would be better for me to do this I will study how to do it and make a.. pull request Thanks a lot! Tudor

Version 0, edited 9 years ago by tudorbarascu (next)

comment:4 by pramsey, 9 years ago

Resolution: fixed
Status: reopenedclosed

Changes made directly to spatial_ref_sys in 2.0, 2.1, 2.2, svntrunk at r14827, r14828, r14829, r14830 respectively. Still need fixes in upstream libgeotiff scripts to correctly differentiate positional vector rotation from frame rotation when generating the spatial_ref_sys file from raw epsg database.

Note: See TracTickets for help on using tickets.