Join GitHub today
Volcano impact on buildings - report by type error #2090
The volcano name attribute is actually expected to be "NAME" if the user renames it to "TYPE" and sets it to "TYPE" in the impact function, then this problem is created. I propose inspecting the volcano name attribute and if that name already exists, then to edit the attribute name to end in an underscore "_".
In this case, the use case will be doing the following: The volcano point layer has a column called "TYPE", which contains the name. The user selects this as the attribute to contain the volcano name. Since the attribute already exists in the buildings layer, this is changed to "TYPE_" and the attribute is no longer masked.
I'm not sure that is what i experienced.
Maybe your comment above relates to the other ticket where the name of the considered volcano is not read by the IF?
What is happening here is a consequence of using the assign_hazard_values_to_exposure_data. What this method does, is it takes the exposure and adds hazard attributes to the exposure creating an impact layer. The impact layer has the following attribute:
If any of these are equal the hazard attribute overwrites the exposure attribute. In our case the the TYPE field was overwritten. Since this is the standard building type descriptor name in our OSM building layers, the buildings where grouped by the hazard type they fall into, not the buildings' actual types.
This affects both Volcano Buildings IFs (Point and Polygon) as well as Classified Polygon on Buildings IF.
To avoid this problem we need to rename the conflicting name to something non-conflicting. If you think that the hazard attributes are no longer interesting after the analysis is done, then we can drop them after we have run the analysis.