3

I have a lot of my projects that are located in mountains. When I draw my polygones, I can easily calculate $area, of course. But in many cases, I underestimate the surface of my polygons due to the slope.

My question, is it a simple way, as an expression for example, to calculate $area but taking in count the DEM?

Babel
  • 71,072
  • 14
  • 78
  • 208
katagena
  • 1,659
  • 1
  • 6
  • 15
  • You'd need to get a DEM first. Do you have one? – Erik Aug 24 '21 at 07:52
  • Yes, I have one. – katagena Aug 24 '21 at 08:25
  • 1
    It guess DEM is what OP means by "MNT": modèle numérique de terrain / MNT = DEM. @Stocker Antoine - if I'm right, it would be good to edit your question and replace MNT by DEM as this is an english-language site – Babel Aug 24 '21 at 08:25
  • You are right... I modified it! – katagena Aug 24 '21 at 08:27
  • 1
    Have a look here: https://gis.stackexchange.com/q/139957/88814 – Babel Aug 24 '21 at 08:29
  • It is way to complicated... I have more than 300 polygones (and not rectangles) for which I have to calculate "real" area! And secondly, I always have an error with r.surf.area. – katagena Aug 24 '21 at 10:17
  • File "C:\PROGRA~1/QGIS31~1.8/apps/qgis-ltr/./python/plugins\processing\algs\grass7\Grass7Algorithm.py", line 456, in processAlgorithm self.convertToHtml(self.fileOutputs[outName]) File "C:\PROGRA~1/QGIS31~1.8/apps/qgis-ltr/./python/plugins\processing\algs\grass7\Grass7Algorithm.py", line 1060, in convertToHtml lines = f.readlines() – katagena Aug 24 '21 at 10:17
  • File "C:\PROGRA~1\QGIS31~1.8\apps\Python39\lib\codecs.py", line 322, in decode (result, consumed) = self._buffer_decode(data, self.errors, final) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 30: invalid continuation byte – katagena Aug 24 '21 at 10:17

1 Answers1

3

I found myself a quiet good solution, which allowed to handle with a lot of polygones.

First I convert my DEM 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!

It works perfectly, and it's correct, I tested on different known surfaces!

katagena
  • 1,659
  • 1
  • 6
  • 15
  • A similar solution seems to be GRASS r.surf.area, see: https://grass.osgeo.org/grass78/manuals/r.surf.area.html As it is stated there, "calculation is heavily dependent on data resolution: (...) the more resolution the more detail, the more area". So this might be something to consider in your case, too. – Babel Sep 16 '21 at 14:55
  • As I mentioned, GRASS never workes for me... I always have python error!!! – katagena Sep 16 '21 at 15:00
  • And you can't use it to calculate on different polygones! – katagena Sep 16 '21 at 15:15