Re: [Qgis-user] Polygon from 4 points

2020-11-28 Thread Grant Boxer
I am playing around with data entry options and wondered if I can use the graphical modeller to add data, e.g. x y coordinates as live input not from a file. Can the data entry be saved as variable which can then be used in the make polygon expression? Cheers Grant -- Sent from:

Re: [Qgis-user] Polygon from 4 points

2020-11-28 Thread Richard Duivenvoorde
As a variation on this... You can create 'virtual layers' in QGIS, see: https://docs.qgis.org/3.16/en/docs/user_manual/managing_data_source/create_layers.html?highlight=virtual#creating-virtual-layers In attached zip file (a csv+a project file), I created a csv with 4 records with (just) 2

Re: [Qgis-user] Polygon from 4 points

2020-11-27 Thread Raymond Nijssen
Hi Ryan, I think you could create a python QgsVectorDataProvider for your data and setup a QGIS server for hosting a wms. https://www.itopen.it/qgis-vector-data-provider-python/ But I would probably just go for a simple script that converts the csv file into a polygon dataset (gpkg, shp,

Re: [Qgis-user] Polygon from 4 points

2020-11-26 Thread Ryan Peel
Extending this thought a little. Is there a way to create a WMS service from this so that the WMS reads a csv file, automatically creates the polygons using the expression that Toto recommended, so that it (on the fly) creates the polygons from adding the WMS to a map so I can share with my

Re: [Qgis-user] Polygon from 4 points

2020-11-26 Thread Ujaval Gandhi
Totò - really great solution! Didn't know about Geometry by Expression and it will come in handy for sure. [image: Logo] Ujaval Gandhi Spatial Thoughts mobile: +91-8095684687 email: uja...@spatialthoughts.com [image: LinkedIn icon]

Re: [Qgis-user] Polygon from 4 points

2020-11-26 Thread qgis-user
Another common solution to this type of problem is to open the .csv file in a spreadsheet program (eg, Excel) and use string functions to write a new text field containing a WKT representation of your desired geometry. Save the edited file back as a .csv file, then open

Re: [Qgis-user] Polygon from 4 points

2020-11-26 Thread Nicolas Cadieux
Hi, I’m the field calculator, you could also update the 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,

Re: [Qgis-user] Polygon from 4 points

2020-11-26 Thread Ryan Peel
Thank you! Worked PERFECT! On Thu, Nov 26, 2020 at 10:02 AM Totò Fiandaca wrote: > 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"), >

Re: [Qgis-user] Polygon from 4 points

2020-11-26 Thread Totò Fiandaca
>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

[Qgis-user] Polygon from 4 points

2020-11-26 Thread Ryan Peel
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