29
votes
Drawing lines from points in QGIS
To create polygons from points, you can also use
"Points to path", then
"Lines to polygons" tools without need to install any plugin
29
votes
Accepted
Nearest distance between point and line layers in QGIS
As an alternative, you could:
Use the Convert Lines to Points tool from:
Processing Toolbox > SAGA > Shapes - Points > Convert Lines to Points
(Add points over small distances. E.g. add a point ...
29
votes
Converting polyline to polygon in QGIS
The "Polygonize" tool from the Processing Toolbox (Ctrl+Alt+T) still works fine for me on simple lines:
It is however necessary that the lines intersect, or share common vertices. And lines ...
19
votes
Accepted
Creating all possible line segments between all points using QGIS
You can achieve your goal using the Field Calculator.
Using the Geometry Generator, with Linestring geometry type, use this expression:
collect_geometries(
array_foreach(
aggregate('...
14
votes
Accepted
Creating line segments at point coordinates in QGIS
One possible tool is "Geometry by expression" in the Processing Toolbox > Vector geometry (search in the Processing Toolbox Ctrl+Alt+T).
A Geometry expression to create lines (length= ...
14
votes
Calculating line with the longest distance inside polygon in QGIS
You can use PyQGIS to measure the distances between all vertices of each polygon and find max:
import itertools
layer = iface.activeLayer() #Click layer in tree
for feat in layer.getFeatures():
...
12
votes
How to create a multipart polygon in QGIS?
For anyone coming to this with newer versions of QGIS, the function to do it is now called "Collect Geometries" rather than "Single parts to Multipart" so it's now Vector > Geometry Tools > Collect ...
12
votes
Creating Isochrones in QGIS
Just recently, a new QGIS plugin, called OSM Tools, has been published.
This plugin utilizes OpenRouteService API to compute routes and isochrones for various travel modes such as car, heavy vehicle, ...
12
votes
Drawing lines from points in QGIS
In QGIS 3 instead of the plugin mentioned above, you can find the "Points to path" tool in your Processing Toolbox (Ctrl+Shift+T). Works exactly the same.
12
votes
Creating all possible line segments between all points using QGIS
You can make use of the virtual layers.
Go to Layer/ Add layer/ add-edit virtual layer and enter the following query. Feel free to add as many field as you want. The trick is to do a cross-join on the ...
11
votes
Creating Isochrones in QGIS
The plugin QNEAT3 offers a great tool for this creating isochrones or service areas offline based on your own network.
You can run Iso-Areas as polygons or another algorithm:
To get isochrones, ...
11
votes
Nearest distance between point and line layers in QGIS
In QGIS I can suggest using a "Virtual Layer" through Layer > Add Layer > Add/Edit Virtual Layer....
Let's assume we have two layers 'points' and 'river' with their corresponding ...
11
votes
Calculating line with the longest distance inside polygon in QGIS
Bear in mind that someone correctly pointed out very soon in comments that I had misread the question. My answer gives the diameter of the minimal circle but this does not always correspond to the ...
11
votes
Building the shortest route through all points in QGIS
What you're looking for is called "Travelling salesman problem".
Let's assume there are a point layer and a polyline layer, see the image below.
There are several approaches available:
...
11
votes
Accepted
Generating lines at the end of each measurement with plugin in QGIS
Coming close to what you want, simply using geometry generator, you can use this expression to create the lines from each point to the cursor position where you click:
make_line (
$geometry,
@...
10
votes
Accepted
Split polyline by point using 'sf' package in R
If you snap the point to the line then you can split the line and then extract the parts from the resulting collection. Use a really small tolerance, I don't know how small it needs to be...
> ...
10
votes
Drawing lines to nearest points in QGIS
This should be possible without any plugin using the default Processing tools, particularly Distance to nearest hub:
https://docs.qgis.org/testing/en/docs/user_manual/processing_algs/qgis/...
10
votes
Accepted
Creating lines between points within distance in QGIS
Using the distance, you could create a "Virtual Layer" that connects nearby points.
Go to the menu Layer > Add Layer > Add/Edit Virtual Layer... and enter the following query.
Note ...
10
votes
Accepted
Creating polygons with fixed extent based on point which represents S/W corner using QGIS
In QGIS, use "Geometry by Expression" tool (in a projected CRS). It will also add points information/attributes to polygons.
Select "Polygon" as "Output geometry type" ...
10
votes
Accepted
Getting Polyline (Linestring) coordinates from line layer in QGIS
First, add a field (name: geometry, type: string, length: 1000 keep it long). Then use the following script:
lyr = iface.activeLayer()
with edit(lyr):
for f in lyr.getFeatures():
f["...
10
votes
Creating lines between points with certain attributes using QGIS
Points to path has a 'group' expression optional setting
Use this as your unique Id
Order expression being the timestamp.
Using this, you should get one line for each Id with the Id as an attribute
9
votes
Accepted
Drawing rows in field at the same distance from each other
You can use the Create Grid tool for this task.
Also the Clip tool can be useful for removing lines outside the polygon boundaries.
8
votes
Accepted
Converting polygon to lines without duplicate edges?
If you are not forced to use QGIS, another Open Source GIS software OpenJUMP http://openjump.org/ has a Planer Graph tool that may be exactly what you need.
Here you can find the tool.
If you need ...
8
votes
Accepted
Finding longest straight line within polygon in QGIS
When holes of the polygons have to be avoided
So, this is an extension to my previous answer Calculating the longest distance within polygon in QGIS but with some changes in the Step 3, particularly ...
8
votes
Finding longest straight line within polygon in QGIS
This is also an approximation. It finds the longest line between existing polygon vertices within each polygon. So the more vertices you have the better the results should be (but the executing time ...
8
votes
Creating polygons with fixed extent based on point which represents S/W corner using QGIS
Using a Virtual layer, you can create a polygon of the desired dimension and move it to each location of the point layer. You can then save as the output if you want to persist the data.
Go to the ...
7
votes
Converting polyline to polygon in QGIS
Just a hint if you can't find the Polygonize tool. In my QGIS 2.18.3 installation (Windows) I could not find the Polygonize tool at Vector geometry tools within the Toolbox. It took me some time to ...
7
votes
Creating line segments at point coordinates in QGIS
I put an example of solving the same task with a PyQGIS (3.2) standalone application.
Below is the Python code:
import sys
import math
from qgis.core import (QgsPointXY,
...
7
votes
Accepted
Creating lines connecting each possible pair of points in PostGIS
In PostGIS, this can be done quite easily with a Cartesian product or CROSS JOIN in SQL, ie, joining a table on itself and using the 2nd form of ST_MakeLine. So, assuming a table called points with an ...
7
votes
Accepted
How can I switch line direction from the Linux commandline?
Use the ogr2ogr utility with the ST_REVERSE function in a SQL statement and OGR SQLite dialect:
For example:
ogr2ogr -dialect SQLITE -sql "select st_reverse(GEOMETRY), * from input" output.shp input....
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
polyline-creation × 313qgis × 113
arcgis-desktop × 64
line × 52
point × 41
polygon × 31
qgis-3 × 17
arcgis-10.0 × 17
arcmap × 16
points-to-line × 16
python × 15
arcpy × 15
geometry-conversion × 15
csv × 14
distance × 13
linestring × 13
pyqgis × 11
shapefile × 11
geometry × 11
postgis × 10
editing × 9
raster × 8
coordinates × 8
splitting × 8
r × 7