7
votes
Accepted
Midpoint coordinates from line in Field Calculator (QGIS)
To plot the midpoint of a polyline using the field calc:
line_interpolate_point ($geometry, $length / 2)
To visualize the point, add a style layer with the geometry generator:
$length:
Returns the ...
4
votes
Accepted
Use polygon lines to create masks
Even if it's located in Vector tools, you can extract the extent of your tile with this tool : "Extract layer extent". The result will be a rectangle (polygon) of the extent.
Split this ...
4
votes
Making middle point going on curve lines in QGIS
Use the "Interpolate point on line" tool from the Processing Toolbox (Ctrl+Alt+T):
Choose your line layer, and then find "Edit" in the dropdown for Distance:
Enter $length / 2 as ...
3
votes
Accepted
Geopandas - Create all lines between two point shapefiles
You only need the Python itertools module for the Cartesian product of the geometries of the two GeoDataFrames
import itertools
import geopandas as gpd
from shapely.geometry import LineString
pt1 = ...
2
votes
QGIS 3.10.3 line out of the route
The offset left or right is dependent on line direction. You can reverse the direction of lines by selecting them and using the QGIS tool Processing > Toolbox > Vector geometry > Reverse line ...
2
votes
Getting line length of geometry of parent feature as default value in child feature in QGIS
update: answer below is only relevant when adding new features in child layer. Question has since been clarified to the child form that appears when adding feature to parent layer, and using a default ...
1
vote
Accepted
Duplicated attributes problem while adding attributes of points to attribute table of lines in QGIS
Open the field calculator in the lines layer and calculate the fields with this expression.
For the start of the line:
aggregate(
'Points', -- replace Points with the points layer name/id
'...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
line × 1790qgis × 768
arcgis-desktop × 378
point × 267
polygon × 249
splitting × 98
arcmap × 96
shapefile × 78
postgis × 77
intersection × 76
distance × 73
qgis-3 × 69
r × 66
python × 64
arcpy × 64
length × 58
arcgis-10.1 × 57
symbology × 57
merge × 57
vector × 55
polyline-creation × 50
overlapping-features × 49
geometry × 44
arcgis-10.0 × 42
style × 42