OpenDataAnalytics / gaia

Gaia is a geospatial analysis library jointly developed by Kitware and Epidemico.
31 stars 15 forks source link

Update crop functions to handle partial and null intersection cases #127

Closed johnkit closed 5 years ago

johnkit commented 5 years ago

Adds some intersection checks and constrains the raster clipping "mask" to the input extents.

The logic returns None for the case of a null intersection, so the application should check the return value from crop(). In the future, we should consider adding a flag to indicate that a GaiaDataObject is empty, or possibly add an "empty" subclass of GaiaDataObject.

coveralls commented 5 years ago

Coverage Status

Coverage increased (+0.3%) to 36.002% when pulling 6c3b6944941f7d94da1ecc8562f80ce08cc06abf on johnkit:crop-edge-cases into 31d0239b7524d8fef5fc014010a852a32d48835e on OpenDataAnalytics:master.

coveralls commented 5 years ago

Coverage Status

Coverage increased (+0.4%) to 36.104% when pulling 3d8628ff533b05ae4d12ff11b74da468598a9489 on johnkit:crop-edge-cases into 31d0239b7524d8fef5fc014010a852a32d48835e on OpenDataAnalytics:master.

johnkit commented 5 years ago

This PR resolves issue #126