1

When I try to open a shape file from statistik.at (an offical authority in Austria) the projection is not recognized correctly in QGIS 3.20.2 Odense. QGIS shows an "Unknown CRS". I can set the mapscale to 1: 2 mio and draw a "numerical mapscale" , but I can not draw a scale-bar.

The file is here for download : https://data.statistik.gv.at/data/OGDEXT_GEM_1_STATISTIK_AUSTRIA_20210101.zip the proj-file is shown here:

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"]]

there was a similar problem some time ago: QGIS 3.10.2. Projection Problem.

As far as I remember, this was fixed and know this problem pops up again? Any hints?

update:

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"]]

manually setting the CRS to EPSG31287 as suggested by @user30184 and exporting as a new shapefile gives this new working prj-file:

PROJCS["MGI_Austria_Lambert",GEOGCS["GCS_MGI",DATUM["D_MGI",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Lambert_Conformal_Conic"],PARAMETER["False_Easting",400000.0],PARAMETER["False_Northing",400000.0],PARAMETER["Central_Meridian",13.3333333333333],PARAMETER["Standard_Parallel_1",49.0],PARAMETER["Standard_Parallel_2",46.0],PARAMETER["Latitude_Of_Origin",47.5],UNIT["m",1.0]]

Kurt
  • 7,087
  • 4
  • 33
  • 51
  • 2
    I have only a bit older QGIS 3.19.0 and that does recognize the CRS. Have you tried to set CRS manually into EPSG:31287? – user30184 Aug 23 '21 at 19:26
  • @user30184 strange, as you suggested I tried to manually set the CRS to EPSG:31287 and it worked. Dont know why, but it works. If you want to post your comment as answer (workaround) I can checkmark it. thanks. – Kurt Aug 23 '21 at 20:22
  • Just to mention that I use QGIS 3.20.0 and I had no problem importing the shapefile downloaded from your link: projection is correctly recognized. – Babel Aug 24 '21 at 08:38
  • @Babel, which OS are you using, I am using 3.20.2 on Windows 10 – Kurt Aug 24 '21 at 10:50
  • Me too : Win 10 – Babel Aug 24 '21 at 12:13

1 Answers1

2

For some unknown reason your QGIS cannot interpret that .prj file. As a workaround you can use the EPSG authority code that appears in the .prj AUTHORITY["EPSG","31287"].

Another option is to try if the gdalsrsinfo https://gdal.org/programs/gdalsrsinfo.html utility could convert the WKT definition into something that works better. Examples:

gdalsrsinfo austria.prj -o wkt_esri

PROJCS["MGI_Austria_Lambert", GEOGCS["GCS_MGI", DATUM["D_MGI", SPHEROID["Bessel_1841",6377397.155,299.1528128]], PRIMEM["Greenwich",0.0], UNIT["Degree",0.0174532925199433]], PROJECTION["Lambert_Conformal_Conic"], PARAMETER["False_Easting",400000.0], PARAMETER["False_Northing",400000.0], PARAMETER["Central_Meridian",13.3333333333333], PARAMETER["Standard_Parallel_1",49.0], PARAMETER["Standard_Parallel_2",46.0], PARAMETER["Latitude_Of_Origin",47.5], UNIT["m",1.0]]

gdalsrsinfo austria.prj -o proj4

+proj=lcc +lat_0=47.5 +lon_0=13.3333333333333 +lat_1=49 +lat_2=46 +x_0=400000 +y_0=400000 +ellps=bessel +towgs84=601.705,84.263,485.227,4.7354,-1.3145,-5.393,-2.3887 +units=m +no_defs

user30184
  • 65,331
  • 4
  • 65
  • 118