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

Sampling rasters with building voids #92

Open
akhilk15 opened this issue Feb 1, 2024 · 2 comments
Open

Sampling rasters with building voids #92

akhilk15 opened this issue Feb 1, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@akhilk15
Copy link

akhilk15 commented Feb 1, 2024

Hi Seth @cefect , I have another question. We are using flood rasters obtained from the hydraulic model which incorporated building footprints as voids, and therefore, there are holes/voids in the flood rasters. I guess the solution is to conduct hazard sampling separately in GIS and create the expos data file, which bypasses the hazard sampling step from CanFlood. I was wondering if you have any other alternative. We'll have to do some GIS spatial analysis to fill those voids or do some spatial joins of building footprints centroid and the polygon with max hazard calculated.

@lateLarch
Copy link

Hi. I've encountered that issue a few times as well. I'm not sure how messy your voids are, but if your flood rasters are elevation (not depth), you should be able to get a good sample from the footprint polygons , maybe with a small buffer added.
You can use the footprint polygons directly as your inventory in CanFlood. It will recognize that in the Hazard Sampler and allow you to select the mean, min, max.
I usually do mean because I'm wary of any anomaly with min or max but I'm not sure how the stat sampler handles no values in voids, maybe Seth does.
I also use the building polygons, not centroids, to sample stats from the bare-earth DEM because the building removal algorithms are a mystery and I've seen some strange profiles and holes in their place, particularly in varied terrain or heavily treed areas, like North Van.
David.

@cefect cefect changed the title Flood Rasters with Building Footprints as Voids Sampling rasters with building voids Feb 2, 2024
@cefect
Copy link
Collaborator

cefect commented Feb 2, 2024

Thank you for the question @akhilk15. David put it nicely and this is what I would recommend also. We've talked about incorporating something like this into CanFlood a bit... but I'm not sure where that plan sits.

As to the behavior of the polygon sampler, it uses the Zonal statistics processing alg in the backend, which I'm assuming ignores null values.

Alternatively, you could consider pre-processing your raster using some hole filling tool like this, but this is effectively the same thing but less transparent (and also only works well with water elevations rather than depths).

@cefect cefect closed this as completed Feb 2, 2024
@cefect cefect reopened this Feb 2, 2024
@cefect cefect added the enhancement New feature or request label Feb 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants