Geographic Information Systems Asked by mrakoplas on December 5, 2020
I have my polygon spatial data in a format of CSV with the column of lat/long delimited by comma. Is there any way to upload this csv and got polygon shapefiles (or any other visualisable format)? My primary GIS tool is QGIS.
There are several ways how to do it just for one WKT at the same time but I cannot find a way how to do it with data with several rows in data.
I have tried to Add delimited text layer with geometry definition of WKT but it does not work (as can be seen in the screenshot. Data are not in the readable WKT format.
I am up to some solution even outside QGIS environment
Let's assume there is a .csv
-file with your data, where lat/long delimited by comma, see image below
Drag&Drop your CSV into QGIS
Deploy Virtual Layers through Layer > Add Layer > Add/Edit Virtual Layer...
.
In the Query window just simply paste the following expression:
SELECT *, ST_GeomFromText('POLYGON((' || "coord_values" || '))', #putyourSRIDcodehere) AS geom
FROM "polygons"
P.S. Mind the SRID code
And get the output
References:
Correct answer by Taras on December 5, 2020
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP