Hot answers tagged

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
4 votes
Accepted

rasterstats zonal_stats - return cell position

You can grab the indices of the mini raster where the pixel value == the statistic value (i.e min or max) using numpy.argwhere, then use the transform/affine to work out the map coordinates. e.g. from ...
  • 58.7k
3 votes

How do you interpret a DEM?

A DEM is to my understanding usually created from the interpolation from other data sources, typically point elevations and\or contour lines, the pixel being assigned an elevation value. When I use a ...
  • 41.2k

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