qgis / QGIS

QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)
https://qgis.org
GNU General Public License v2.0
10.59k stars 3.01k forks source link

towgs84 parameters for DHDN mixed up #15830

Closed qgib closed 5 years ago

qgib commented 12 years ago

Author Name: Andre Joost (Andre Joost) Original Redmine Issue: 6652 Affected QGIS version: master Redmine category:projection_support


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.

qgib commented 12 years ago

Author Name: Jürgen Fischer (@jef-n)


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).


qgib commented 12 years ago

Author Name: Andre Joost (Andre Joost)


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...


qgib commented 12 years ago

Author Name: Jürgen Fischer (@jef-n)


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.

qgib commented 12 years ago

Author Name: Andre Joost (Andre Joost)


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?

qgib commented 12 years ago

Author Name: Jürgen Fischer (@jef-n)


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@

qgib commented 12 years ago

Author Name: Andre Joost (Andre Joost)


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.

qgib commented 12 years ago

Author Name: Jürgen Fischer (@jef-n)


Andre Joost wrote:

Indeed an error thrown:

[...]

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


qgib commented 12 years ago

Author Name: Jürgen Fischer (@jef-n)


um, I didn't mean to close this.


qgib commented 12 years ago

Author Name: Andre Joost (Andre Joost)


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