Skip to content

Conversation

@LachlanArthur
Copy link
Contributor

Empty geometry collections should generate their WKT as GEOMETRYCOLLECTION EMPTY instead of GEOMETRYCOLLECTION()

$empty = new MatanYadaev\EloquentSpatial\Objects\GeometryCollection([], 4326);

$emptyWkt = $empty->toWkt();
// "GEOMETRYCOLLECTION()"

$parsed = MatanYadaev\EloquentSpatial\Objects\Geometry::fromWkt($emptyWkt, 4326);
// InvalidArgumentException: Invalid spatial value.

@MatanYadaev MatanYadaev merged commit 102db62 into MatanYadaev:master Nov 30, 2024
@MatanYadaev
Copy link
Owner

Thanks @LachlanArthur!

@LachlanArthur LachlanArthur deleted the lachlan/fix-empty-geometrycollection-wkt branch December 1, 2024 23:10
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

Successfully merging this pull request may close these issues.

2 participants