[GIS] How tontersect between a vector (administrative areas) and a raster layer (slope)

intersectionqgis

What I've got:

1: A vector-layer with administrative areas of my country

2: A raster-layer with the slope of the terrain of the same country (it is derived from SRTM elevation data with QGIS)

What I want:

A new vector-layer with the 'flat' land of all administrative areas.

How do I achieve this in QGIS?

A) How to extract the area below a certain slope (in the raster-layer)? – The option for rule-based display is not available (maybe this is just there for vector-layers).

B) How to 'intersect' the flat-land-raster-layer(-mask) with my admin-vector-layer?

Update:

A) Actually the "Clip to MinMax" with an appropriate set Min- and Max-value (e.g. Min: 10, Max: 100 – or inverse Min: 0, Max: 10.1) does the job. Now I want to use this as a 'clipping-mask' for my vector-layer, but how?

Best Answer

I wanted to share my exact procedure:

1 While calculating the slope out of the elevation-data (SRTM) play with different 'Z'-values [Raster > Terrain analysis > Slope]

2 Reproject the raster-layer to the same type as the vector-layer [Raster > Projection > Transformation]

3 Extract the points above/below the wished threshold with the Raster calculator [Raster > Raster calculator ...]

4 Convert the threshold-raster-layer into a vector-layer [Raster > Conversion > Polygonize]

5 Open the Attribute table of the new layer and search for either 0 or 1 and delete them all at once

6 Intersect the two vector-layers in the desired manner (intersect or difference) - [Vector > Geoprocessing Tools > Intersect/Difference]

comment: This way (with the Raster calculator) it is very easy to combine several raster-layers and get a combined 'clipping-mask' for the vector-layer - with just ONE computational intense step of Polygonization and Intersection.

In my case I combined altitudes above 1500m and steep slopes and now I've got all the lowland-flatland parts of all administrative areas (very close to the real settlement area).

Related Question