[Qgis-user] Polygon from 4 points
Nicolas Cadieux
njacadieux.gitlab at gmail.com
Thu Nov 26 08:16:20 PST 2020
Hi,
I’m the field calculator, you could also update the <geometry> field using wkt. If this was a line, you would use
>
> Geom_from_wkt('LINESTRING (' || "x1" || ' ' || "y1" || ',' || "x2" || ' ' || "y2" || ')')
>
Google wiki and WKT geometry and you will see how you could make a point, line, polygon... you could also use this same syntax in a csv and import the csv.
Nicolas Cadieux
https://gitlab.com/njacadieux
> Le 26 nov. 2020 à 10:03, Totò Fiandaca <pigrecoinfinito at gmail.com> a écrit :
>
> From Processing:
>
> search for Geometry by Expression:
> 1. as input layer put your file with the coordinates
> 2. and write this expression:
>
> make_polygon (
> make_line (
> make_point ("x1", "y1"),
> make_point ("x2", "y2"),
> make_point ("x3", "y3"),
> make_point ("x4", "y4")
> ))
>
> and launch the geoprocess.
>
> I used QGIS 3.16 Hannover
>
> Il giorno gio 26 nov 2020 alle ore 15:48 Ryan Peel <ryanpeel at gmail.com> ha scritto:
>> I have a csv/table that has a single row that contains some metadata as well as four SEPARATE columns, x1, y1, x2, y2, x3, y3, x4, y4 of decimal degree coordinates.
>>
>> I want to import all of this data into QGIS and create a polygon from the four points as a vector layer.
>>
>> What is the best way to do this? I'm not a programmer or scripter really and fairly new to QGIS.
>>
>> Thanks!
>>
>>
>> Ryan Peel
>>
>> _______________________________________________
>> Qgis-user mailing list
>> Qgis-user at lists.osgeo.org
>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>
>
> --
> Ing. Salvatore Fiandaca
> mobile.:+39 327.493.8955
> m: pigrecoinfinito at gmail.com
> C.F.: FNDSVT71E29Z103G
> P.IVA: 06597870820
> membro QGIS Italia - http://qgis.it/
> socio GFOSS.it - http://gfoss.it/
> blog: https://pigrecoinfinito.com/
> FB: Co-admin - https://www.facebook.com/qgis.it/
> TW: https://twitter.com/totofiandaca
>
> 43°51'0.54"N 10°34'27.62"E - EPSG:4326
>
> “Se la conoscenza deve essere aperta a tutti,
> perchè mai limitarne l’accesso?”
> R. Stallman
>
> Questo documento, allegati inclusi, contiene informazioni di proprietà di FIANDACA SALVATORE e deve essere utilizzato esclusivamente dal destinatario in relazione alle finalità per le quali è stato ricevuto. E' vietata qualsiasi forma di riproduzione o divulgazione senza l'esplicito consenso di FIANDACA SALVATORE. Qualora fosse stato ricevuto per errore si prega di informare tempestivamente il mittente e distruggere la copia in proprio possesso.
>
>
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20201126/9b5a471a/attachment.html>
More information about the Qgis-user
mailing list