See at the bottom for a workflow how to load the points correctly, correcting "wrong" coordinate values and using a virtual layer.
The problem: older "false easting" values
The problem with the points that appear in the Caspian see is a known problem. In Brandenburg, there are two (similar) CRS in use and your coordinate values are a mix of both. The (older) official (state/authority) CRS is/was EPSG:325833
- a non-standard deviation of EPSG:25833
(ETRS89/ UTM zone 33N, used nowadays) with an additional "False Easting" of 3000 km: an additional 3
(7 digit values) put in front of the correspoinding x-coordinates value of the 6 digit values of EPSG:25833
.
So your points appear 3.000.000 m to the east (points shifted 3000 km eastwards) when interpreted in the newer definition with only 6 digit values.
See here for a description and another one in german as well as this explanation:
They use an inofficial EPSG-Code 325833 which is EPSG:25833 with an
additional false easting of 3000 km (which is the official CRS for
Brandenburg, ETRS89 with 7 digit rightings).
https://udig.github.io/data/brandenburg.html
A more detailed description can be found in a contribution by Michael Neid, Gunthard Reinkensmeier, Thomas Rothe: "Die verflixte 3 – die UTM-Abbildung in Brandenburgim Wandel der Zeiten", in: Vermessung Brandenburg, 15/2010, no. 2, p. 106-109 (ISSN 1430-7650), downloadable here as pdf document.
Solution
To solve the problem, select the points appearing in Kazakhstan/the Caspian Sea on the map and create a new field using field calculator only for the selected features with the expression "X-Koordinate" -3000000
. Then export/save the selected features to a CSV. Load this CSV, this time using the newly created field for x coordinates.
Then the points will appear in the right place.
Other cases
There are two other points in your dataset where instead of that you should divide the x coordinate by 10 (skipping the last 0). This is the case of Waldgebiet 362 (Templin, but appears in western Uzbekistan) and Waldgebiet 9 (Guteborn, appears in Northern Afghanistan).
Complete workflow to get all points in the right place
To proceed to get all points in the correct place, there are different workflows. You could e.g. correct the coordinate values in the CSV before loading them to QGIS. In what follows, I propose a workflow where you load the csv to QGIS and get a layer with the points in the right place.
By the way, I recommend to change fieldames from X-Koordinaten
/Y-Koordinaten
to a name without hyphen -
as this can generate headaches when using in an expression or query. I used your initial fieldnames, thought, in what follows to show how to deal with it.
Load your CSV file to QGIS as data only layer (no geometries). In the import/Data source manager dialog window, check the box No geometry (attribute table only)
- or even easier: drag and drop your CSV to the QGIS window.
Run Field Calculator on the loaded CSV, creating a new field called X
with the corrected coordinate values, using this expression (by the way: after creating the field, you can't exit editing mode or save the changes here, we'll do that afterwards):
case
when "X-Koordinate" > 5000000 then "X-Koordinate"-5000000
when "X-Koordinate"=3949330 then "X-Koordinate"/10
when "X-Koordinate"=3300000 then "X-Koordinate"-3000000
when "X-Koordinate">3000000 then "X-Koordinate"-3000000
when "X-Koordinate" > 0 then "X-Koordinate"
end
Use select by expression to only select features with valid coordinate values, exluding those with values NULL
or 0
or empty. Use this expression:
"X-Koordinate" > 0 and "Y-Koordinate" > 0
Save the selected features only (thus skipping the empty ones and saving the new field X
created in step 2) by right clicking on the layer > Export
> Save selected features as...
> and save it as CSV (Encoding: UTF-8; CRS: invalid projection). Be sure you have checked the box Add saved file to map
.
Create a new Virtual layer: Menu Layer
> Create Layer
> New Virtual layer
. Add this query, where you should replace coordinates
with the name of the layer created in step 4:
select *, make_point (X,"Y-Koordinate",25833) as geometry from coordinates
The virtual layer is created as a point layer, but with no CRS definition yet: right click the virtual layer > Layer CRS
> Set Layer CRS...
> select EPSG:25833
.
Points might not be visible yet. Save the layer (e.g. to a Geopackage; Shapefile would truncate your fieldnames) by right-clicking on the virtual layer > Export
> Save features as
.
The saved layer is loaded to QGIS and now your points should appear in the right place: