oq-engine icon indicating copy to clipboard operation
oq-engine copied to clipboard

Proposal: Allow tagNames for attributes that exist in only a subset of the exposure model

Open nicolepaul opened this issue 2 years ago • 1 comments

It is useful to specify tagNames such that additional attributes of the exposure model can be retained in the average losses output. For example, a reference to the administrative boundary of interest.

However, some attributes in the exposure may only be relevant to a subset of the exposure data. For example, we may have a residential exposure model at administrative level 4 (with attribute NAME_4) but the commercial exposure model at administrative level 3 (with attribute NAME_3) within a given country.

With the current setup, adding both tagNames raises an InvalidFile error since one of the tags does not exist in one of the exposure inputs.

In the proposed setup, the model would not error and the average losses output would have a placeholder such as "No_tag" for the NAME_4 for the subset of assets that do not have that tag specified.

If implemented, we may need to add an internal check to avoid supplying the partially available tag name (e.g., NAME_4 in this example) in the aggregate_by of the job.ini.

partial_tag_example.zip

nicolepaul avatar Jun 03 '22 23:06 nicolepaul

@CatalinaYepes and @raoanirudh may have some additional thoughts or feedback.

nicolepaul avatar Jun 03 '22 23:06 nicolepaul