Skip to content

risk function of DamageScanner does not allow for custom object type column #65

@MaxKranabetter

Description

@MaxKranabetter

The calculate function of DamageScanner currently takes an optional keyword-argument object_col. However, this parameter is not implemented for the risk and exposure functions, despite them using the same underlying input data.

This is a problem because the "object_type" column name is one character too long for shapefiles (see here), leading to an unavoidable renaming of the column and thus an incompatibility with the two mentioned functions on the DamageScanner object.

This could be fixed by simply adding a variable object_type_column = kwargs.get("object_col", "object_type") and replacing the hard-coded column names with this variable (similar to how it is implemented for the calculate function).

Happy to open a PR if helpful :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions