civicmapper / culvert-toolkit

GIS tools designed to support analysis of culvert performance within their watershed
https://civicmapper.github.io/culvert-toolkit/
Apache License 2.0
0 stars 0 forks source link

handle slope bad data value (-1) in capacity calculation #6

Closed gassc closed 1 year ago

gassc commented 1 year ago

-1 in the NAAACC Slope field means No Data. Need to handle this, as it should not be used for the capacity calculation.

For discussion: for the purposes of getting a conservative capacity estimate, should we convert these to 0, add a validation error, but set the include flag to stay True to allow delineations and peak flow to run?

https://github.com/civicmapper/culvert-toolkit/blob/602b096926505b598e61559d25816b0f04eb0e4c/src/drainit/services/naacc.py#L104

gassc commented 1 year ago

After some internal discussion with GPE, changes in commit 4948f9cfb76691ad35cfc5bf2407cc11d9a2a8fe mean that a culvert with a -1 slope is invalid and flagged/noted accordingly.

gassc commented 1 year ago

After further discussion with GPE, commit 83427dcd1b33c1b7ed7f658cef4c2a1ff8fa1454 detects -1 in the modeled slope field and changes it to 0, while leaving include=True but also adding a corresponding slope comment to the validation_error field.

This will let the model run with a flat slope, but with a validation error to flag it as such.