Opened 10 years ago

Closed 10 years ago

#5620 closed defect (invalid)

Reprojection of shapefile with ogr2ogr not accurate.

Reported by: berni86 Owned by: warmerdam
Priority: normal Milestone:
Component: OGR_SRS Version: unspecified
Severity: normal Keywords: reprojection
Cc:

Description

I am using gdal/ogr 1.11.0 via sub-processes called in python on ubuntu 14.04.

I did the projection of a shapefile in wgs84 to a user-defined projection based on the azimuthal equidistant, defined by a WKT-file (command 1). The re-projection with ogr2ogr of the new shapefile back to wgs84 (command 2) does not match with the initial shapefile - it is a bit enlarged and fails to meet the corresponding points by up to 500m.

The simplified command 1:

ogr2ogr -f "ESRI Shapefile" -t_srs "PROJCS["Azimuthal_Equidistant",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Azimuthal_Equidistant"],PARAMETER["false_easting",5837226.19628],PARAMETER["false_northing",2121404.9812],PARAMETER["central_meridian",24.0],PARAMETER["latitude_of_origin",53.0],UNIT["Meter",1.0]]" outfile infile

The simplified command 2:

ogr2ogr -f "ESRI Shapefile" -t_srs EPSG:4326 outfile infile

When I do the same operations with ArcMap 10.2, the initial and re-projected shapefile match perfectly, using the same WKT-file for the first projection.

I am doing something wrong or is there some inaccuracy during the projection?

Thanks in advance!

Attachments (1)

ogr2ogr_reprojection_issue.zip (80.4 KB ) - added by berni86 10 years ago.
the shapefiles mentioned in the text

Download all attachments as: .zip

Change History (2)

by berni86, 10 years ago

the shapefiles mentioned in the text

comment:1 by Even Rouault, 10 years ago

Resolution: invalid
Status: newclosed

The issue is likely in proj.4 where the forward/reverse transform of Azimuthal Equidistant must have some inaccuracy when going far from the origin of the A.E. projection. So you might want to check in Proj Trac (http://trac.osgeo.org/proj) if there isn't an issue about that and open a ticket there

$ gdaltransform -s_srs EPSG:4326 -t_srs ae.wkt 
-42.519197 30.133013
-11268.0905021997 2328643.04783278 0

$ gdaltransform -s_srs EPSG:4326 -t_srs ae.wkt -i
-11268.0905021997 2328643.04783278 0
-42.5159423622074 30.1360204336638 0

$ gdaltransform -s_srs EPSG:4326 -t_srs ae.wkt 
-42.5159423622074 30.1360204336638 0
-10810.4655586509 2328634.84640081 0

Closing as not a GDAL bug.

Note: See TracTickets for help on using tickets.