New answers tagged line
0
votes
Connecting two nodes with line to close segment in QGIS
In newer QGIS versions, you can automatically close a line using Geometry by Expression with this expression:
close_line ($geometry)
Expression (here with Geometry Generator for visalization): red=...
0
votes
Moving (snap) lines to nearest features in QGIS
The idea is to snap all the vertices of Layer_A to Layer_B and then create the line_substring() of Layer_B from one to the next of these snapped points. To do so, use the expression below on Layer_A ...
1
vote
Uploading transit data to QGIS
I suppose inside of the layer, each route is a separate line (feature). So you can apply categorized layer Styling with $id as source. Like this, you get a separate color for each line.
See this ...
6
votes
Determining on which side of line points are located using QGIS
You can also use QGIS expressions for this, using this expression to get a 0 or 1 output for each point, depending on which side of the line it is (see below for curved lines). The solution is based ...
7
votes
Determining on which side of line points are located using QGIS
In PyQGIS 3 there is a handy method available, namely segmentSide() from the QgsGeometryUtils class.
Let's assume there are two layers: a line layer with a single feature, and a point layer with nine ...
5
votes
Accepted
Difference of two polyline layers in QGIS
where layer B basically has the same geometry in exactly the same positions
The problem is that it is not true.
LineString geometries are defined by their vertices. But since this vector data model (...
2
votes
Accepted
Create alternatingly colored line segment in QGIS
Solution: the idea and requirenments
You can use geometry generator for this. This solution requires that you have a point layer named points with points on (or near) the line where you want a color ...
1
vote
Accepted
Determine area enclosed by multiple segments
Solution for PostgreSQL/PostGIS.
Input geodata table named "linetoarea" shown in Figure 1 below.
Figure 1
Run Geo-SQL script:
WITH
noded AS (SELECT ST_Node(ST_Union(geom)) geom FROM ...
1
vote
Want to curve lines that are already connected (not drawing)
Curved lines can be achieved using line type arrow (if you set arrow head/length to 0, you in fact get a pure line style). To work, however, you need a third point that is not on the connecting line ...
1
vote
Accepted
Smoothing corners in polyline using PyQGIS
After a research I didn't found a good implementation of what I needed. Bezier curves and QGIS smooth algorithm cannot make the rounding as if its a circle segment. Using these methods you get ...
3
votes
Accepted
Using label placement via PyQGIS
The QgsVectorLayer class has no method like placement. However, the QgsPalLayerSettings does.
I suppose you are trying to apply this LabelPlacement mode.
Just add this settings.placement = Qgis....
6
votes
Finding number of lines touching intersection point in polyline layer using QGIS
To count the touched split lines for each point, overlay_touches() can be used in combination with array_length().
The expression for creating the "type" integer field then looks like this:
...
1
vote
Calculating Convex Hull based on attributes in QGIS
You can create a convex hull based on an attribute using QGIS expressions with "Geometry Generator" or "Geometry by Expression" (see here for details about both options). Use this ...
Top 50 recent answers are included
Related Tags
line × 1992qgis × 898
arcgis-desktop × 382
point × 293
polygon × 275
splitting × 108
arcmap × 103
intersection × 85
shapefile × 83
postgis × 82
distance × 81
qgis-3 × 78
python × 67
arcpy × 67
r × 67
length × 65
symbology × 64
merge × 62
overlapping-features × 62
vector × 60
arcgis-10.1 × 57
geometry × 57
polyline-creation × 51
style × 50
pyqgis × 49