Hot answers tagged

12 votes
Accepted

QGIS - align labels of point layer perpendicular to course of polyline

The solution Use a data defined override for the label rotation, based on the azimuth of the line at the line segment next to the point. To do so, use this expression in the Label setting's Placement ...
  • 55.3k
10 votes

Extract raster value at each vertex from line, while keeping the line

You can use "Drape (set Z value from raster)" tool to set the z value of every vertex in the densified line to a value sampled from a raster.
9 votes
Accepted

Extract raster value at each vertex from line, while keeping the line

Using QGIS expressions, use this expression: raster_value( 'DEM', 1, start_point($geometry)) This is to get the elevation from the raster called DEM, raster band 1 for the line's start point. To get ...
  • 55.3k
8 votes

Styling contours by colour and by line thickness in QGIS

Step 1 - Configuring the symbology type (only necessary if your contours are polygons) Change the symbology of the fill from "Simple Fill" to "Outline: Simple Line" Step 2 - Stroke ...
  • 5,730
8 votes

Styling contours by colour and by line thickness in QGIS

Thanks to the insightful answers and comments I realized that, after applying color by graduated symbols or a color ramp, I could follow the logic suggested by both @Kadir Şahbaz and @TeddyTedTed in ...
6 votes

Styling contours by colour and by line thickness in QGIS

After making graduated symbols by elevation, click the line symbol. Click "Data defined override" button for "Width" option, select "Edit..." Use this expression: if( ...
4 votes

Consolidating overlapping and fragmented line into a single line geometry

Quick and dirty, but efficient: Buffer/dissolve lines with a very small distance (like 1 m) and set End cap Style to Square Get the Boundary of the buffer Run Multipart to single parts Delete the ...
  • 55.3k
3 votes

Cut polygon shapefiles by line shapefiles grouped by unique id

Here's a three step approach. Use Split Vector Layer to split both the polygons and lines by the unique id (eg fid). This should give you two directories of files, one for the polygons and the other ...
3 votes

QGIS - align labels of point layer perpendicular to course of polyline

I suggest you split your line into segments (either extract vertices, then split lines at points, or subdivide with 2 vertices per segment), then add the azimuth() to the segments, then join ...
  • 14.7k
3 votes

Consolidating overlapping and fragmented line into a single line geometry

Use network tools to use the already existing lines for the result, but get rid of parallel, almost but not exactly same lines: Create a few (like 4) more or less evenly distributed points on your ...
  • 55.3k
1 vote

Create dashed line with standard length and standard interval

You can create the dash geometry based on your line layer by: Create points along geometries with a distance of 2.5 m Buffer them by 0.75 m Difference with your lines as input and buffers as overlay:
  • 61k
1 vote
Accepted

Cut a polygon based on lines from another layer in GeoPandas

Good question - this problem is slightly trickier than it first seems because you are cutting polygons with multiple lines, and so need to do so recursively to make sure that you make all of the ...
  • 437

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