Closed LachlanArthur closed 4 days ago
Empty geometry collections should generate their WKT as GEOMETRYCOLLECTION EMPTY instead of GEOMETRYCOLLECTION()
GEOMETRYCOLLECTION EMPTY
GEOMETRYCOLLECTION()
$empty = new MatanYadaev\EloquentSpatial\Objects\GeometryCollection([], 4326); $emptyWkt = $empty->toWkt(); // "GEOMETRYCOLLECTION()" $parsed = MatanYadaev\EloquentSpatial\Objects\Geometry::fromWkt($emptyWkt, 4326); // InvalidArgumentException: Invalid spatial value.
Thanks @LachlanArthur!
Empty geometry collections should generate their WKT as
GEOMETRYCOLLECTION EMPTY
instead ofGEOMETRYCOLLECTION()