Hot answers tagged

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 ...
user avatar
  • 3,747
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 ...
user avatar
  • 12.5k
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 ...
user avatar
  • 52.1k
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 = ...
user avatar
  • 51.2k
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 ...
user avatar
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 ...
user avatar
  • 7,459
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 '...
user avatar
  • 1,107

Only top scored, non community-wiki answers of a minimum length are eligible