Bug report #1889

wrong/missing crs parameters for CH1903 / LV03 (epsg:21781) in prj-file

Added by zicke - over 15 years ago. Updated about 15 years ago.

Status:Closed
Priority:Low
Assignee:nobody -
Category:Projection Support
Affected QGIS version: Regression?:No
Operating System:Linux Easy fix?:No
Pull Request or Patch supplied: Resolution:worksforme
Crashes QGIS or corrupts data: Copied to github as #:11949

Description

While the crs parameters in the project properties dialog are correct, QGIS generates a wrong prj-file when saving a vector layer to a shapefile:

PROJCSHotine_Oblique_Mercator_Azimuth_Center"GEOGCS["Bessel 1841"DATUM["D_unknown"SPHEROID["bessel"63773971552991528128PRIMEM["Greenwich"0]UNIT["Degree"0017453292519943295]]PROJECTION["Hotine_Oblique_Mercator_Azimuth_Center"]PARAMETER["latitude_of_center"4695240555555556]PARAMETER["longitude_of_center"7439583333333333]PARAMETER["azimuth"90]PARAMETER["scale_factor"1]PARAMETER["false_easting"600000]PARAMETER["false_northing"200000]UNIT["Meter]]

According to www.spatialreference.org it should be:

RPOJCSCH1903 LV03"GEOGCS["CH1903"DATUM["CH1903"SPHEROID["Bessel 1841"63773971552991528128AUTHORITY["EPSG""7004"TOWGS84r674374150564053460000AUTHORITY["EPSG""6149"]]PRIMEM["Greenwich"0AUTHORITY["EPSG""8901"]]UNIT["degree"001745329251994328AUTHORITY["EPSG""9122"]]AUTHORITY["EPSG""4149"]]UNIT["metre"1AUTHORITY["EPSG""9001"]]PROJECTION["Hotine_Oblique_Mercator"]PARAMETER["latitude_of_center"4695240555555556]PARAMETER["longitude_of_center"7439583333333333]PARAMETER["azimuth"90]PARAMETER["rectified_grid_angle"90]PARAMETER["scale_factor"1]PARAMETER["false_easting"600000]PARAMETER["false_northing"200000]AUTHORITY["EPSG""21781"]AXIS["Y"EAST]AXIS["X]]

Especially the TOWGS84 parameter is important and can confuse qgis if 'on-the-fly' transformation is enabled.

History

#1 Updated by Magnus Homann over 15 years ago

  • Resolution set to worksforme
  • Status changed from Open to Closed

What version of QGIS did you use? This was hopefully fixed two weeks ago, and now the result is:

PROJCS[[unnamed"GEOGCS["Bessel 1841"DATUM["unknown"SPHEROID["bessel"63773971552991528128]TOWGS84r674374150564053460000]PRIMEM["Greenwich"0]UNIT["degree"00174532925199433]]PROJECTION["Hotine_Oblique_Mercator"]PARAMETER["latitude_of_center"4695240555555556]PARAMETER["longitude_of_center"7439583333333333]PARAMETER["azimuth"90]PARAMETER["rectified_grid_angle"90]PARAMETER["scale_factor"1]PARAMETER["false_easting"600000]PARAMETER["false_northing"200000]UNIT["Meter]]

The library we use (GDAL/OGR) does not know about many datums, so it cannot write in clear text the datum name. The TOWGS84 parameters are there, though.

#2 Updated by zicke - over 15 years ago

Yes, I was told just after reporting the bug, that it could be an GDAL/OGR issue. Now we are using 1.3.0 (code revision 11505) and the TOWGS84 parameters are there.

#3 Updated by cmoe - about 15 years ago

It looks really like an ogr issue, but an intentional. Ogr is stripping down the towgs84 parameter when writing a shapefile (morphToEsri method).

see also #1943 and #2123

cheers
Cédric

Also available in: Atom PDF