Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Different results for isEmpty() check on a polygon depending on a first constructor argument type #128

Open
alexey-m-ukolov opened this issue Jun 24, 2019 · 0 comments

Comments

@alexey-m-ukolov
Copy link

Hi.
I don't know if it is intended or not (looks like a bug to me), but if we pass an array to the Polygon constructor, it is always gets marked as non empty, even if the array itself was.

But if we pass a CoordinateCollection, emptiness of a Polygon is determined based on it's content - empty collection results in an empty Polygon.

Example

The fix is very easy but I'm not sure if I should submit a PR - maybe it's an expected behavior. And even if it isn't, the fix will break backward compatibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant