#1889 closed bug (worksforme)
wrong/missing crs parameters for CH1903 / LV03 (epsg:21781) in prj-file
Reported by: | zicke | Owned by: | nobody |
---|---|---|---|
Priority: | major: does not work as expected | Milestone: | Version 1.3.0 |
Component: | Projection Support | Version: | Trunk |
Keywords: | Cc: | ||
Must Fix for Release: | No | Platform: | Linux |
Platform Version: | Awaiting user input: | no |
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:
PROJCS["Hotine_Oblique_Mercator_Azimuth_Center",GEOGCS["Bessel 1841",DATUM["D_unknown",SPHEROID["bessel",6377397.155,299.1528128]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTIONHotine_Oblique_Mercator_Azimuth_Center,PARAMETER["latitude_of_center",46.95240555555556],PARAMETER["longitude_of_center",7.439583333333333],PARAMETER["azimuth",90],PARAMETER["scale_factor",1],PARAMETER["false_easting",600000],PARAMETER["false_northing",200000],UNIT["Meter",1]]
According to www.spatialreference.org it should be:
RPOJCS["CH1903 / LV03",GEOGCS["CH1903",DATUM["CH1903",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[674.374,15.056,405.346,0,0,0,0],AUTHORITY["EPSG","6149"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4149"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTIONHotine_Oblique_Mercator,PARAMETER["latitude_of_center",46.95240555555556],PARAMETER["longitude_of_center",7.439583333333333],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",NORTH]]
Especially the TOWGS84 parameter is important and can confuse qgis if 'on-the-fly' transformation is enabled.
Change History (3)
comment:1 by , 15 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
comment:2 by , 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.
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",6377397.155,299.1528128],TOWGS84[674.374,15.056,405.346,0,0,0,0]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]],PROJECTIONHotine_Oblique_Mercator,PARAMETER["latitude_of_center",46.95240555555556],PARAMETER["longitude_of_center",7.439583333333333],PARAMETER["azimuth",90],PARAMETER["rectified_grid_angle",90],PARAMETER["scale_factor",1],PARAMETER["false_easting",600000],PARAMETER["false_northing",200000],UNIT["Meter",1]]
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.