Bug report #6652

towgs84 parameters for DHDN mixed up

Added by Andre Joost over 11 years ago. Updated over 11 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Projection Support
Affected QGIS version:master Regression?:No
Operating System:Windows Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed
Crashes QGIS or corrupts data:No Copied to github as #:15830

Description

Under Settings/Project Settings/Options, I get this proj string for EPSG:31466:

+proj=tmerc +lat_0=0 +lon_0=6 +k=1 +x_0=2500000 +y_0=0 +ellps=bessel +towgs84=582,105,414,1.04,0.35,-3.08,8.3 +units=m +no_defs

When saving a Shapefile with that EPSG, the .qpj file reads:

PROJCS["DHDN / 3-degree Gauss-Kruger zone 2",GEOGCS["DHDN",DATUM["Deutsches_Hauptdreiecksnetz",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[598.1,73.7,418.2,0.202,0.045,-2.455,6.7],AUTHORITY["EPSG","6314"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4314"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",6],PARAMETER["scale_factor",1],PARAMETER["false_easting",2500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["X",NORTH],AXIS["Y",EAST],AUTHORITY["EPSG","31466"]]

The +towgs84 parameters of the second are from 2001 (see http://crs.bkg.bund.de/crseu/crs/descrtrans/eu-descrtrans.php?crs_id=REVfREhETiAvIEdLXzM=&op_id=REVfREhETiAod2hvbGUgY291bnRyeSwgMjAwMSkgdG8gRVRSUzg5&tr_one=0)
and is also used in Postgis, proj and gdal, see https://svn.osgeo.org/metacrs/proj/trunk/proj/src/pj_datums.c for potsdam datum.

The first one is a deprecated version from 1995 (see http://crs.bkg.bund.de/crseu/crs/descrtrans/eu-descrtrans.php?crs_id=REVfREhETiAvIEdLXzM=&op_id=REVfREhETiAod2hvbGUgY291bnRyeSwgMTk5NSkgdG8gRVRSUzg5&tr_one=0)

I*m not sure where those parameters come in.
The difference is about 70cm in my region. EPSG:31467 to 31469 are also affected.
Would be nice to have this sorted out.

History

#1 Updated by Jürgen Fischer over 11 years ago

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

I suppose you're either using the standalone installer without changing install directory to something without blanks or the OSGeo4W installer and changing the install directory to something with blanks.

Apparently crssync isn't run correctly, when installed into a directory with blanks (see etc\\postinstall\\qgis-common.bat(.done) in the install directory). Should be fixed with 78d5ff50b20.

If crssync was run, you'd already see the correct CRS (as QGIS' database is synced with the installed GDAL).

#2 Updated by Andre Joost over 11 years ago

  • Status changed from Closed to Reopened

I got the error both for standalone (1.8.0) and master (C:\\OSGeo4w). For the second, crssync.exe in apps\\qgis-dev is present, but can not start due to missing qgis_core.dll. Maybe it only works correct with qgis stable installed as well in C:\\OsGeo4w? After starting qgis-dev, I could run crssync.exe with success. But within installation process it fails.

EDIT: On Windows XP it installed without error on D:\\OSGe4W. Rather strange, investigating...

#3 Updated by Jürgen Fischer over 11 years ago

Andre Joost wrote:

I got the error both for standalone (1.8.0) and master (C:\\OSGeo4w). For the second, crssync.exe in apps\\qgis-dev is present, but can not start due to missing qgis_core.dll.

When run from an environment like etc\\postinstall\\qgis-common.bat(.done)? You can't start it directly.

#4 Updated by Andre Joost over 11 years ago

Jürgen Fischer wrote:

Andre Joost wrote:

I got the error both for standalone (1.8.0) and master (C:\\OSGeo4w). For the second, crssync.exe in apps\\qgis-dev is present, but can not start due to missing qgis_core.dll.

When run from an environment like etc\\postinstall\\qgis-common.bat(.done)? You can't start it directly.

Eventually, it ran after starting qgis-dev.bat (I updated my previous post). On XP it ran with first install. So still not sure why not on my Windows7 machine. Is there an error log somewhere?

#5 Updated by Jürgen Fischer over 11 years ago

Andre Joost wrote:

Eventually,

"Perhaps"?

So still not sure why not on my Windows7 machine. Is there an error log somewhere?

%OSGEO4W_ROOT%\\var\\log\\setup.log.full

#6 Updated by Andre Joost over 11 years ago

Jürgen Fischer wrote:

Andre Joost wrote:
Is there an error log somewhere?

%OSGEO4W_ROOT%\\var\\log\\setup.log.full

Indeed an error thrown:

C:\\OSGeo4W>textreplace -std -t bin\\qgis-dev.bat 
C:\\OSGeo4W>textreplace -std -t bin\\qgis-dev-browser.bat 
"mkdir" kann syntaktisch an dieser Stelle nicht verarbeitet werden.
C:\\OSGeo4W>if not ==0 mkdir "C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs/OSGeo4W" 

2012/11/08 16:47:54 abnormal exit: exit code=255

The Start Menu Entry was present from a former installation. So killed that and C:\\Osgeo4W, and made a fresh install with your latest patch, but same result.
At least not a CRS issue, but an installer crash before crssync is called.

On Windows XP, I got the log entry:

D:\\OSGeo4W>if not 1 == 0 mkdir "C:\\Dokumente und Einstellungen\\All Users\\Startmen\\Programme/OSGeo4W" 
Ein Unterverzeichnis oder eine Datei mit dem Namen "C:\\Dokumente und Einstellungen\\All Users\\Startmen\\Programme/OSGeo4W" existiert bereits.

and the installation continues without error.

#7 Updated by Jürgen Fischer over 11 years ago

  • Status changed from Reopened to Closed

Andre Joost wrote:

Indeed an error thrown:

[...]

Are you using the latest version of osgeo4w-setup.exe?

#8 Updated by Jürgen Fischer over 11 years ago

  • Status changed from Closed to Reopened

um, I didn't mean to close this.

#9 Updated by Andre Joost over 11 years ago

  • % Done changed from 0 to 100
  • Status changed from Reopened to Closed
  • Target version deleted (Version 2.0.0)

Jürgen Fischer wrote:

Andre Joost wrote:

Indeed an error thrown:

[...]

Are you using the latest version of osgeo4w-setup.exe?

Argh, did not think of that. Only the XP installation was with current setup.exe. It now works on both platforms. THX

Also available in: Atom PDF