[GIS] Intersect line with raster QGIS

gmeintersectqgis

I am looking to replicate a tool that is available in Geospatial Modelling Environment (GME) within QGIS, preferably not using GRASS. The tool is isectlinerst (Intersect Lines With Raster) http://www.spatialecology.com/gme/isectlinerst.htm

I am hoping to have a tool that can extract raster information (i.e. slope) for an entire linear network (i.e. roads). I have seen other post on here that show a rasterize process, but I am looking to maintain the vector input data and add the attributes to the data.

Best Answer

SAGA Profiles from lines may satisfy your needs, though it does not directly return slope or other information. It returns rather raw data of cells intersected by your line layer.

When you give the raster (DEM) and linestrings (roads), it will return a Profiles (points) along the line.

Each point represents the cell center of the raster along the line. The attribute table is populated with information from your raster:

  • LINE_ID: your road id
  • ID: point id starting from the start point of each road (in my example: Path layer)
  • DIST: distance from start point
  • DIST_SURF: distance from start point, along the DEM (so it is slightly longer than DIST.
  • X,Y,Z coordinates

You will need to calculate slope and/or other statistics, but I think you would be more confident about the result.

enter image description here