i am relative new to the whole gis world. To display some statistics in Leaflet on my website i choosed to use some district zones provided by the regional government (Berlin / Germany) as Shapefile (ETRS89 / UTM zone 33N
) and converted them into GeoJson.
My Workflow was Qgis [Version 3.25] -> load Shapefile (ETRS89 / UTM zone 33N) -> reproject layer into Target: EPSG:4326 - WGS84 -> save as new file -> conversion to GeoJson -> save as new file
Problem
Leaflet is running and consumes the GeoJson data and displays the Districts as Polygons. The only Problem is - the districts are now not in Berlin / central europe but the middle east. I recognized that the coordinates values of the GeoJson polygons (lat,lon) are switched (lon,lat).
So i looked into Qgis once again and loaded the original shape file.
- Project Properties are
- Coordinates:
ETRS89 / UTM zone 33N
- Authority ID:
EPSG:25833
- Coordinates:
When i right click
into the the districts or more specific the Center of Berlin then Qgis provides Coordinates with copy coordinate
...
MAP CRS - EPSG:25833 (392365,5820314)
WGS84 CRS - EPSG:25833 (13.39865,52.51694)
<- Default?
Her recognized that the WGS84 conversion for that single coordinate is also wrong. Example Coordinate for Center of Berlin in the shape file:
- wrong:
WGS84 CRS - EPSG:25833 (13.39865,52.51694)
<- currently displayed in Qgis (somewhere in the middle east). - should be:
WGS84 CRS - EPSG:25833 (52.51694, 13.39865)
<- This looks more like the Center of Berlin!
Question
So my Question is how to correct that projection? I tried the Qgis processor swap X and Y coordinates
but it only turned my districts upside down and to another area in the world. I could write a python script to change every polygon point in the GeoJson File but that seems unnecessary.
Do i missed to change the right Projection in Qgis for the [ETRS89 / UTM zone 33N] -> [Target: EPSG:4326 - WGS84] reprojection layer
? Moreover the Re-projection processor determines sometimes my input file (layer) also as EPSG:32633
automatically. And is it possible to reproject and export as GeoJson at once?