To calculate the cost of removing a particular soil type, we need to first find the underlying soil feature intersecting the excavation. Then we find the intersecting area between the excavation feature and the soil feature, calculate the area, and multiply it by the depth of the excavation. This will give us the total volume of the excavation. We then query the removal cost table to find the cost of removing the 1 m3 of that particular soil and then multiply it by the excavation volume. Note that an excavation might pass between two soil type areas, which will result in multiple intersections from different soil types. Take a look at the following example drawing:
Follow these steps to calculate the cost of removing the soil:
If necessary, open the
Yharnam
project as administrator.Edit the
ExcavationCostCalculator
class.First we will need to find all of the soil features that intersect with the excavation. We will do a spatial query for that. Write the...