wri / gfw_forest_loss_geotrellis

Global Tree Cover Loss Analysis using Geotrellis and SPARK
MIT License
10 stars 8 forks source link

Log intersection errors #122

Closed jpolchlo closed 3 years ago

jpolchlo commented 3 years ago

Pull request checklist

Please check if your PR fulfills the following requirements:

Pull request type

Please check the type of change your PR introduces: - [ ] Bugfix - [x] Feature - [ ] Code style update (formatting, renaming) - [ ] Refactoring (no functional changes, no api changes) - [ ] Build related changes - [ ] Documentation content changes - [ ] Other (please describe): ## What is the current behavior?

Current behavior is to crash upon encountering a failing geometry intersection. Many instances of this were solved by #117, but in the event that there are other classes of geometry error that are not covered by buffering the input, crashes will still occur.

Issue Number: #118

What is the new behavior?

This PR introduces a new pathway wherein geometries are wrapped in a Validated structure upon import, and errors in geometry intersection can be propagated down the pipeline and reported in the output. It's not clear if there are any other places in the code that can generate JTS errors, but there are not currently explicit catches for other (currently unknown) risky operations.

Does this introduce a breaking change?

Other information