0

Is there a method to calculate the area of a polygon (shapefile) drawn on a digital terrain model (raster - DTM)? I would then need not the planimetric area but the actual area. Here is a picture to make it clearer:

enter image description here

Vince
  • 20,017
  • 15
  • 45
  • 64
  • See https://gis.stackexchange.com/questions/139957/qgis-calculate-the-3d-surface-area-of-a-region – Babel Jun 08 '22 at 10:57
  • 1
    Sure, there's probably several ways, and some of them might even be reasonably accurate. But you'll need to provide details about the exact data, the spatial reference, the method of collection, and what you have tried so far. – Vince Jun 08 '22 at 11:01

1 Answers1

1

First I convert my DTM with the tool from SAGA called "Real surface area". After that, I have a raster with the real surface for each pixels, on band 1.

Than I simply use "zonal statistics" with my polygones layer, to get the 'sum' of band 1... and that's it!

katagena
  • 1,659
  • 1
  • 6
  • 15
  • And how do you get from pixels to polygons? – Erik Jun 08 '22 at 13:16
  • You told that you have polygons in a shapefile. Zonal statistics computes statistics for pixels which fall inside the polygons. Try it. – user30184 Jun 08 '22 at 13:25
  • @Erik: with Zonal Statistics! Or I don’t understand your question?!? – katagena Jun 08 '22 at 13:35
  • You said you use zonal statistics with your polygon layer - but before you were talking about raster layers. So the solution you present is either faulty, or misleading, or missing a step. – Erik Jun 08 '22 at 13:40
  • 1
    Sorry I don't understand... First you convert your raster with "Real surface area", and then you use "Zonal statistics" with your polygon layer! So I still don't under stand your question! – katagena Jun 08 '22 at 13:54
  • 1
    The question presents two sources: DEM raster and a polygon (shapefile). The answer suggests to process DEM into another raster file with SAGA. Zonal statistics is analyzing a raster layer by selecting a subset of pixels which intersect the polygons of a polygon layer. The solution is complete and correct. Only missing part is that it is not explicitly said that "zonal statistics" requires one raster layer and one polygon layer but it is obvious once somebody opens the tool. – user30184 Jun 10 '22 at 08:24
  • Alternatively, you can use Clip Raster by mask layer, and clip the raster with the polygon of your interest. Then, you can run the Real surface area, with the clipped pixels, which are, of course, only those inside the polygon. Thereafter, the zonal statistics already refer to the polygon-contained pixels only, so you can get the SUM and that is going to be the total area the question seeks. – ForeverNoob Dec 09 '23 at 12:10