Skip to content

Conversation

@heathdutton
Copy link

@heathdutton heathdutton commented Jan 2, 2026

Fixes #228

When drawing an AOI at low zoom levels, the polygon coordinates can collapse to nearly identical points, resulting in a degenerate polygon with zero area. The validateGeoJSONArea function was incorrectly returning false (valid) for these cases instead of true (invalid). Confused? So was I.

This one-line fix correctly rejects polygons with zero, NaN, or invalid area values.

@kshitijrajsharma
Copy link
Member

Thanks @heathdutton for the PR , we will be reviewing this soon !

@jeafreezy
Copy link
Collaborator

Thank you for your contribution @heathdutton .

The issue this PR intends to fix was happening before the latest development on fAIr. As of now, you can't experience the bug again because we now have a minimum size for drawing a polygon. See attached video for context.

Screen.Recording.2026-01-18.at.17.22.34.mov

Nevertheless, we'll have this PR opened for merging should such issue come up again in the future.

Thank you!

Copy link
Collaborator

@jeafreezy jeafreezy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add validation for small AOI

3 participants