Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exposure out of bounds #441

Open
2 tasks done
DirkEilander opened this issue Jan 29, 2025 · 0 comments
Open
2 tasks done

exposure out of bounds #441

DirkEilander opened this issue Jan 29, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@DirkEilander
Copy link
Contributor

DirkEilander commented Jan 29, 2025

hydomt_fiat version checks

  • I have checked that this issue has not already been reported.
  • I have checked that this bug exists on the latest version of hydomt_fiat.

Reproducible Example / Current behaviour

When setting up road exposure from OSM we find that the exposure might be slightly outside of the model region, causing an "out of bounds" error in Delft-FIAT. Recently a clip_exposure_to_hazard_extent method has been added to fix this as option in the setup_hazard method. However, I would argue that already at the setup exposure step no exposure outside of the model region should be created. In my cases we first setup a basemodel with exposure and vulnerability and later update this model with hazard data. Ideally, the exposure is already correct in the first step and doesn't need to be updated every time you update the hazard.

Desired behaviour

Change the clip_exposure_to_hazard_extent method to a more general clip_exposure method with a geometry as input. This method can then already be called in the setup_exposure_* steps to make sure the data is sound when building it. When clipping based on the hazard map one single line is needed outside of the clip method to get the extent of the hazard map with geom=da.raster.box

@DirkEilander DirkEilander added the bug Something isn't working label Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant