Timeline for Calculate the distance between a single point and multiple polygons using PostGIS
Current License: CC BY-SA 4.0
9 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jan 8, 2023 at 16:17 | history | edited | Babel | CC BY-SA 4.0 |
added 149 characters in body
|
Jan 8, 2023 at 16:16 | comment | added | Babel | Use Field calculator on the polygon layer and the expression will create a new attribute field with the lengths. Define a field name and field type first, then insert the expression (you get a preview at the bottom) - see screenshot at the bottom of my updated answer. | |
Jan 8, 2023 at 16:11 | comment | added | Filipe Dias | No complaints on having more than one solution for the problem. I added length() to the expression, but where can I see the lengths of the lines? Is there a table? | |
Jan 8, 2023 at 16:07 | comment | added | Babel | Yes, that's why i added "If you are fine to try QGIS expressions" and OP states that they use QGIS - so they might feel free to try different ways to achieve the goal | |
Jan 8, 2023 at 16:03 | comment | added | Taras♦ | @Babel, it is about PostGIS ^_^ | |
Jan 8, 2023 at 15:53 | history | edited | Babel | CC BY-SA 4.0 |
added 225 characters in body
|
Jan 8, 2023 at 15:48 | comment | added | Babel |
No problem. Simply add a length() function to calculate the length of the red lines. Enclose the expression from above as argument in the function: length ( [expression_from_above] ) and you're done
|
|
Jan 8, 2023 at 15:45 | comment | added | Filipe Dias | Thanks. That's very useful for visual inspection, but in this case I need to measure the distances between the point and the polygons. | |
Jan 8, 2023 at 15:32 | history | answered | Babel | CC BY-SA 4.0 |