I have some six polygons recieved as a WKT comma separated file from a company. When I import them to QGIS the Polygons end up in the ocean south of Sudan, and I’m pretty sure that I live in the north of Sweden. At least that’s the language spoken on the radio…
The first two lines in the CSV look like this:
WKT,Name,description,id_2
POLYGON ((20.7821821402714 67.1745210694852,20.785150685553 67.1745408268809,20.7850051686274 67.1761044322888,20.7821894161176 67.1760959653845,20.7821821402714 67.1745210694852)),1 (Three commas not visible here…)
… and the rest of the lines look pretty much the same as above.
I’ve tried to swap the Lat-Long in the file without success. I have the same Coord system (WGS 84 / Pseudo Mercator EPSG 3857) in the base map as well as in the layer.
But still South of Sudan.
Everything is going to end up in a capture and a volume measurement.
WGS84 and Pseudo Mercator are two different CRS’s with different EPSG’s. Have you tried importing the CSV into Google Earth? The coordinates are definitely backwards.
I pulled the coords for the perimeter of the polygon out as points and it took me to the incorrect location you said in this form. Reversing lat/lon took me to Sweden although I don’t know if it is exactly where you need to be.
I get where that could be confusing. Pseudo Mercator derived from WGS84, but is not the same.
EPSG: 4326 uses a coordinate system on the surface of a sphere or ellipsoid of reference.
EPSG: 3857 uses a coordinate system PROJECTED from the surface of the sphere or ellipsoid to a flat surface.
Think of it as this way:
EPSG 4326 uses a coordinate system the same as a GLOBE (curved surface). EPSG 3857 uses a coordinate system the same as a MAP (flat surface).
Either way it doesn’t have anything to do with what you’re experiencing.
Does this look correct? The WKT data is definitely WGS84. I am using 3857 for the project and the XYZ tiles layer for Google Earth is also 3857. Basically what was happening is that the program was using the values for lat/lon as x/y flat coordinates. Looking further to find a base map that will run WGS84.
I’m getting them as points, and haven’t managed to tie the points together to get a Polygon. If I try to pull them from the (“POLYGON”) (WKT) - string (which is the only format I’m getting QGIS to accept)
I set my project to CRS 3857. I pulled in my Google Earth XYZ Tiles as a layer which is also 3857. I then imported the CSV file and set its CRS to WGS84. This transformed the lat/lon coordinates to the flat plane x/y coordinates used by Pseudo-Mercator.
Is this someone’s sadistic way of giving you locations to fly? Lol.
Project 3857. Check
Installed your XML. Check
Added Google Sat as base layer. Check
Imported the CSV (“Sarkas”). Check
The new layer set to WGS84 (or rather: WGS84 / Pseudo-Mercator EPSG:3857) Check
The Shapefile CSV needs to be strictly WGS84 EPSG 4326 since that is what the coordinates in the file are. Otherwise is turns them into X/Y values which is why they come into the origin point under Ghana and are distorted.
Everything checked. No Polygons where they should be.
Deleted the layer and re-read it. Relized that I have to enter the correct WGS84 EPSG 4326 in the import dialogue. Checked and done.
Now working.
I can -sort of- understand the discussion about EPSG 4326 using coords on the surface of a sphere (a globe)and 3857 on a flat surface ( a map)
But why do I have to mix projections to get this to work? Can’t get this into my head. Why is coords in 3857 are X/Y - values when the same coord in 4326 are “real” coordinates…
But geee, this in nothing for the faint-hearted… So lucky to have someone to ask stupid questions.
when you are in pseudo Mercator look at your coordinates on the bottom toolbar. They will be in XY linear units. The coordinates that are in the CSV look like decimal units, but they are actually decimal degrees latitude and longitude.
I have a lot of digging ahead of me. This is difficult, but I reccon I have to grasp this if I pretend to be “in mapping”.
I took an University degree in Mapping some ten years ago, but everything is gone, I’m afraid to say…
I used to know basics, for example the difference between WGS84 with/without “Pseudo-Mercator”. Used to know…
Do you have a link I can dig in to and finally learn this?
There’s a whole different discussion to be had about vertical datum, but we can get there later. Honestly it’s probably the biggest pain in the arse across the board that people are struggling with in drone mapping, but also GIS savvy people trying to understand land surveying and construction. The whole ellipsoid, geoid, orthometric and surface elevations thing… I’ll try to pull together some links.
And most land surveyors (that I’ve been around) don’t want anything to do with GIS workers, and consider them almost as much of a pariah as drone mappers. And, as far as they are concerned, general confusion is their ally.
…and it’s not a joke. Get paid $125/hr to drive for an hour, spend 2 hours “figuring out” why monuments aren’t where they are supposed to be, 2 hours writing field notes, take lunch, do some actual surveying for 2 or 3 hours and then an hour back home.