4

Updating QGIS to the new version I have serious projection problems: I am loading a shape-file from STATISTIK AUSTRIA (an offical authority in Austria) with the following projection:

PROJCS["MGI / Austria Lambert", GEOGCS["MGI", DATUM["Militar-Geographische Institut", SPHEROID["Bessel 1841", 6377397.155, 299.1528128, AUTHORITY["EPSG","7004"]], TOWGS84[601.705, 84.263, 485.227, 4.7354, -1.3145, -5.393, -2.3887], AUTHORITY["EPSG","6312"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH], AUTHORITY["EPSG","4312"]], PROJECTION["Lambert_Conformal_Conic_2SP", AUTHORITY["EPSG","9802"]], PARAMETER["central_meridian", 13.333333333333336], PARAMETER["latitude_of_origin", 47.5], PARAMETER["standard_parallel_1", 48.99999999999999], PARAMETER["false_easting", 400000.0], PARAMETER["false_northing", 400000.0], PARAMETER["scale_factor", 1.0], PARAMETER["standard_parallel_2", 46.0], UNIT["m", 1.0], AXIS["Easting", EAST], AXIS["Northing", NORTH], AUTHORITY["EPSG","31287"]]

Loading the shape-file seems to work fine: enter image description here But when you make a pagelayout for a DIN A4 page you get this strange scale: enter image description here

Setting the scale 1: 3 Million you get this: enter image description here

I think QGIS uses weird/wrong Cartesian coordinates as my last screenshot suggests: enter image description here

I installed QGIS with the standalone-installer on Windows 10.

Update: You can download the test-files (shp, prj) from this url: https://data.statistik.gv.at/data/OGDEXT_NUTS_1_STATISTIK_AUSTRIA_NUTS3_20190101.zip

Update #2: screenshot "about": enter image description here Update #3: @gabriel-de-luca your workaround does not work for me: Cartesian coordinates seem to look okay now, but ellipsoid coordinates are completly wrong, and adding a scale-bar in the page-layout is completly wrong too: enter image description here enter image description here

Update #4: Screenshot Project Properties General: enter image description here

Update #5: This weird behaviour does not occur under Ubuntu : enter image description here

Update #6: A small screenshor recording of GQIS under Windows shows the strange behaviour. Look like the number of the kilometers becomes bigger, then smaller, than bigger again, .... enter image description here Update #7: Pan and Zoom does not help, a basemap (NE 1: 50 Mio) is show as a basemap: enter image description here

2
  • 3
    Can you share your QGIS -> Help -> About dialog with all versions, to know GDAL and Proj versions. Did you download 3.10.2 recently?
    – etrimaille
    Feb 1, 2020 at 18:47
  • 1
    I posted a screenshot "about". Yes, I did download recently (end of january 2020)
    – Kurt
    Feb 1, 2020 at 20:28

1 Answer 1

3

The definition of the CRS provided in the .prj file is a WKT1 string.

It seems that you have specified in the Settings that the project must have the CRS of the first layer added. And it seems that the project is not being defined with the EPSG:31287 CRS.

The Measurement tool takes the coordinates from the canvas.

For the ellipsoidal measurement, QGIS is required to project the canvas coordinates to the ellipsoid, that work is done by PROJ and it works well.

But for the Cartesian distance, QGIS only read the coordinates and compute the distance. QGIS is doing it, but doesn't know the units of measurement that is computing. (All units are returning the same distance.)


A workaround is explicitly define the canvas CRS, trough Project ~> Properties ~> CRS menu or from the CRS icon, to EPSG:31287.
Note that you must define the Settings to Ask for datum transformation if several are available, because the default transformation between EPSG:31287 and EPSG:4326 is not the same as defined in the WKT1 string (MGI to WGS 84 (8) - EPSG:1194).

Another workaround is saving the layer to a GeoPackage. You will be asked to define the CRS and you can do it with the same WKT1 string (and make sure that QGIS will ask you about the preferred datum transformation).
GDAL will assign EPSG:31287 to the layer.
Start a new project. When the GeoPackage layer is loaded, QGIS will recognize its CRS and assign it to the canvas. In the project properties will be added the preferred datum transformation for that CRS.


This issue was reported: https://github.com/qgis/QGIS/issues/34196.

This issue was fixed on February 3rd, 2020.

13
  • 1
    @Kurt, I can't reproduce your update #3. Changing the project CRS makes the measurement tool work well in Cartesian and ellipsoidal mode here. Can you include a Project ~> Properties ~> General screenshot? Feb 2, 2020 at 7:46
  • 1
    @Kurt, I have the same General Setting for the Project. I am using QGIS with Windows. You are welcome. The update #3 behavior seems to me very strange and I can't find a way to reproduce it. Did you try refreshing the canvas with one zoom or pan? If you load a basemap, the shapefile layer is shown in its right geographical place? Feb 2, 2020 at 16:07
  • 1
    Gabriel, thank you for your help. I will tried to check your suggestions. I also found out, that this bug does not occur with QGIS under Ubuntu. (Update #5)
    – Kurt
    Feb 2, 2020 at 16:47
  • 1
    Gabriel: According to the bug-report you open the workaround-fix is: change m to Meter in the prj file and reproject to EPSG:31287 CRS and save as new file. If you post and this answer , I can accept it
    – Kurt
    Feb 4, 2020 at 10:02
  • 1
    @Kurk I'm not sure. I tried it but the scale seems broken also with "Meter" or "Metre" units in the .prj file. I will wait the fixed release to see. The manual definition of the EPSG:31287 CRS is one of the current workarounds. A reprojection is not needed, the coordinates are in that projection, but the WKT1 string is "too custom" for PROJ6. Feb 4, 2020 at 11:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.