I have nationwide areas I want to get the average slope in ° in a south-north line for each area. I found something about zonal statistics in QGIS and DEM (enter link description here) but returns just the average elevation.
How to get the slope?
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It only takes a minute to sign up.
Sign up to join this communityI have nationwide areas I want to get the average slope in ° in a south-north line for each area. I found something about zonal statistics in QGIS and DEM (enter link description here) but returns just the average elevation.
How to get the slope?
Calculating Slope
To calculate the slope of a DEM in QGIS you can use the "Slope" tool under the "Raster terrain analysis" section of the toolbox. I recommend using the default Z factor of 1 for your purpose. I won't go into detail and I haven't looked at the DEM you are proposing but you may choose to smooth/fill voids in the DEM.
Calculating average slope for a given area
Assuming your nationwide areas are projected to the same projection as your DEM and are vector layers you can use the "Zonal Statistics" tool under "Raster Analysis" in the the toolbox. Here your input for "Input Layer" will be your vector nationwide areas. Your "Raster layer" will be your newly created slope layer. Your "Raster band" should default to band 1. Add a prefix if you want for the output statistic fields. Select either mean or median under "Statistics to calculate" and hey presto.