riverarchitect.volume_assessment
Earthworks quantities from a pair of DEMs.
Compares an original (pre-project) and a modified (post-project) digital elevation model and reports the fill and excavation volumes required to get from one to the other, together with the affected areas.
This is the open-source port of the former VolumeAssessment module. Beyond dropping
arcpy and the 3D Analyst licence it changes two things of substance:
Volumes are integrated under the triangulated surface (
riverarchitect.volume) rather than parsed out of a geoprocessing message string.The two DEMs are explicitly aligned onto a common grid. The original relied on
arcpy.env.extentto reconcile differing extents silently, which is the single most likely source of quietly wrong numbers when the modified DEM covers a different footprint.
Example
from riverarchitect.volume_assessment import VolumeAssessment
va = VolumeAssessment("dem.tif", "dem_modified.tif", unit="us")
result = va.run(output_dir="Output/volumes")
print(result["fill_volume"], result["excavation_volume"])
- class riverarchitect.volume_assessment.VolumeAssessment(original_dem, modified_dem, unit='us', level_of_detection=None)[source]
Bases:
objectCompare two DEMs and quantify the earthworks between them.
- Parameters:
original_dem (str) – path to the pre-project DEM.
modified_dem (str) – path to the post-project DEM.
unit (str) –
"us"(feet, reported in cubic yards) or"si"(metres, cubic metres).level_of_detection (float) – elevation changes with a magnitude below this threshold are treated as survey noise and ignored. Defaults to 0.99 ft for
"us"and 0.3 m for"si", matching the original module.
- difference()[source]
Compute the DEM of Difference (modified minus original) on a common grid.
- Returns:
(dod, profile). Positive values are fill, negative are excavation.- Return type:
- volumes()[source]
Fill and excavation volumes from the DEM of Difference.
- Returns:
volumes in the reporting unit plus the planimetric and draped areas.
- Return type: