Skip to content

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

Open
@alexey-m-ukolov

Description

@alexey-m-ukolov

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions