mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-09 00:35:20 -05:00
The SAGA version of this algorithm is of limited use in QGIS, because the volume calculated is embedded only in the SAGA terminal output. This prevents it being saved to a file, or reused within a model as an input to a later model step. It's also very user-unfriendly, because users must know to manually scan the algorithm log to find the SAGA output. Given that the maths here is trivial, this commit ports the algorithm across to be a native QGIS c++ algorithm. The algorithm duplicates the SAGA alg 1:1, but outputs the volume (and area) to either a HTML report, or a vector table. Additionally, the outputs are exported as numeric outputs from the algorithm, allowing them to be re-used within models. (It's also considerably faster, because it avoids the forced conversion to SAGA raster format) Fixes #8607 (properly, even though that report is closed)
6 lines
309 B
HTML
6 lines
309 B
HTML
<html><head><meta http-equiv="Content-Type" content="text/html;charset=utf-8"/></head><body>
|
|
<p>Analyzed file: /home/nyall/dev/QGIS/python/plugins/processing/tests/testdata/dem.tif (band 1)</p>
|
|
<p>Volume: 0.06158301982428629</p>
|
|
<p>Pixel count: 130550</p>
|
|
<p>Area: 0.001305499999999814 deg2</p>
|
|
</body></html> |