Opened 6 years ago

Closed 6 years ago

#6485 closed enhancement (fixed)

Shapefile driver doesn't retrieve missing TOWGS84 even when the .prj has a EPSG code (e.g CRS 2056/21781)

Reported by: Sfkeller Owned by: warmerdam
Priority: normal Milestone: 2.2.0
Component: default Version: unspecified
Severity: normal Keywords: OGR
Cc:

Description

Given a Shapefile "swiss_admin_boundaries.shp" in EPSG:2056 (or 21781) I have problems transforming it to any other SRS/CRS.

When doing this:

ogr2ogr -f "GPKG" swiss_admin_boundaries1.gpkg swiss_admin_boundaries.shp -t_srs EPSG:3857

... swiss_admin_boundaries1.gpkg have a shift of about 150m.

But when I convert Shapefile first e.g. to GeoPackage, and transform then:

ogr2ogr -f "GPKG" tmp.gpkg swiss_admin_boundaries.shp ogr2ogr -f "GPKG" swiss_admin_boundaries2.gpkg tmp.gpkg -t_srs EPSG:3857 del tmp.gpkg

... swiss_admin_boundaries2.gpkg is correct!

2016-04-24 17:58 GMT+02:00 Even Rouault <even.rouault@…> answered

I guess we would want to improve the shapefile importer to get the WKT definition from the GDAL EPSG DB when a AUTHORITY EPSG node is found.

See also: http://osgeo-org.1560.x6.nabble.com/gdal-dev-Problem-with-Shapefile-and-CRS-2056-21781-td5262662.html

Attachments (2)

swissBOUNDARIES3D_LV03_21781.prj (491 bytes ) - added by Sfkeller 6 years ago.
swissBOUNDARIES3D_LV95_2056.prj (495 bytes ) - added by Sfkeller 6 years ago.

Download all attachments as: .zip

Change History (4)

by Sfkeller, 6 years ago

by Sfkeller, 6 years ago

comment:1 by Even Rouault, 6 years ago

Summary: Problem with OGR transformation (e.g. Shapefile and CRS 2056/21781)Shapefile driver doesn't retrieve missing TOWGS84 even when the .prj has a EPSG code (e.g CRS 2056/21781)

comment:2 by Even Rouault, 6 years ago

Milestone: 2.2.0
Resolution: fixed
Status: newclosed

trunk r34100 "Shape: when reading a .prj with a EPSG code, retrieve from the EPSG database the TOWGS84 node when it exists (#6485)"

Note: See TracTickets for help on using tickets.