2

The last weeks I ran into many problems with CRS in QGIS. The behaviour seems completely weird to me and it is hard to reproduce the problems / bugs. There is a chance of getting completely different results even if I follow the exact same steps. I use QGIS 3.14.0 but had similiar problems with QGIS 3.10.6 or 3.10.7 with PROJ 6.3.2 GDAL and OGR 3.0.4

But anyway, I give it a try:

I downloaded osm-data from quickosm plugin into my QGIS Project, which is a virtual layer in EPSG 4326. It is projected correctly in East Germany. The project CRS is 25832. I export the layer (save features as) into a geopackage layer and choose EPSG 25833 (not 25832) as coordinate system (zone 33 instead of zone 32). When I add the exported 25833 layer to my 25832 qgis project (or another project) the data is shown near the equator and not in East Germany where it should be. But when I export the virtual 4326 layer to EPSG 4326 or EPSG 25832 it is shown in the right place.

virtual 4326 layer 4326 in 25832 QGIS project, correctly projected in east germany

exported 25832 layer in 25832 QGIS project, correctly projected in east germany

exported 25833 layer in 25832 QGIS project, incorrectly projected at equator

This is already strange, but when I change the project coordinate system from 25832 to 25833, the 4326 and 25833 layers are incorrectly projected near the equator. This time, the 25832 layer is correctly projected.

the same exported 4326 layer as above now in a 25833 QGIS project, this time incorrectly projected near equator

the same exported 25832 layer as above now in a 25832 QGIS project, this time correctly projected in east germany

4

I could reproduce your problem. You did not reproject your layer, you just assigned a new CRS to it. When you saved the temporary layer in EPSG 4326 from Quick-OSM to a geopackage, you did not set the CRS there, in the epxort dialogue. You thus saved (exported) the layer in 4326 and afterwards, you imported the layer and than set the CRS to 25833 - din't you?

This can not work, the points will be located near Libreville, Gabon (Africa). You have to set the CRS-definition in the export-dialogue, than QGIS reprojects your layer. Setting the layer-CRS manually does not reproject the layer, it just defines the saved coordiantes referring to an other CRS. 4326 is a geographic (unprojected) CRS definition with values in degrees - thus covering a range of just -180 to +180 E/W and -90 to +90 N/S. If QGIS interprets these coordinates in a CRS that is in meters (as EPSG 25833) it will put the points on the map accordingly.

A place like 51° N, 13° E (between Dresden, Leipzig and Chemnitz) thus will be interpreted as 51 meters north and 13 meters east of the point zero (origin) of the coordinate system - and for EPSG 25833, this point zero is east of Libreville in Gabon - that's why your points appear there.

Setting layer CRS by hand normally should not be necessary - only in the case that a correct CRS definition is missing or is incorrectly set. In any other case, changing the CRS manually will lead to miss-projections as in your case. What you are always free to do is changing your project-(NOT: layer-)CRS on the bottom right of your QGIS window. QGIS will then automatically take care in the background that every layer is shown correctly on the canvas, indiffferently in what CRS it is defined (on-the-fly reprojection).

Here are the steps I did:

  1. Create a new project in EPSG 25832 and load an OSM basemap
  2. Quick-OSM query: generator:source=wind in Sachsen: generates layers in EPSG 4326
  3. Export this temporary layer from Quick-OSM to a Geopackage; in the export-dialogue, set EPSG to 25833 (see screenshot)
  4. Add the saved gpkg to your project (which can be set to EPSG 25832 or any other EPSG suitable for your region of interest)

I saved my gpkg (in 25833), if you want to try it: https://drive.switch.ch/index.php/s/u8po4UL8ICpJK1h

enter image description here

2
  • Thanks for your answer. But I reprojected the layer as you show in your screenshot. I did NOT just assign a new coordinate system. But you are right, what QGIS did in the background was assigning INSTEAD of reprojecting. As I said, it is hard to reproduce, because QGIS is only doing it SOMETIMES. I am sure there is a bug somewhere... – Enzo Baldini Jul 11 '20 at 7:32
  • See also my post on the QGIS issue tracker on github: github.com/qgis/QGIS/issues/37809 – Enzo Baldini Jul 14 '20 at 18:15

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.