wri / gfw-raster-analysis-lambda

GFW Raster Analysis in AWS Lambda
8 stars 4 forks source link

Handle empty geometries after tile intersections correctly #69

Closed jterry64 closed 1 year ago

jterry64 commented 1 year ago

This is a corner case where a large and complicated geometry had one tile intersection become an empty polygon after making it valid (it probably created a thin sliver). The code path for handling this corner case was invalid.

Pull request checklist

Please check if your PR fulfills the following requirements:

Pull request type

Please check the type of change your PR introduces:

What is the current behavior?

On getting an empty polygon intersection, the lambdas tries to return an empty dictionary instead of an empty pandas DataFrame as the result. This causes an exception on saving the result to DynamoDB when it tries get its shape.

Issue Number: GTC-2458

What is the new behavior?

Does this introduce a breaking change?