You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What I am trying to do is have a geometry column in Postgres that has a spatial index, so I cannot set the column to be nullable. In raw SQL, it would be something like this:
-- Create Dummy TableCREATETABLEpoly_testing
(
id SERIALNOT NULL,
poly geometry(Polygon,4326) NOT NULL,
CONSTRAINT poly_testing_pkey PRIMARY KEY (id)
);
-- Insert empty polygoninsert into poly_testing (poly)
values ('SRID=4326;POLYGON EMPTY')
I've tried to create an empty Polygon object by passing it no rings, like this but it fails:
Is there any way to store an empty polygon?
What I am trying to do is have a geometry column in Postgres that has a spatial index, so I cannot set the column to be nullable. In raw SQL, it would be something like this:
I've tried to create an empty Polygon object by passing it no rings, like this but it fails:
I get the following error:
Error: Method CrEOF\Spatial\PHP\Types\Geometry\Polygon::__toString() must return a string value
My Doctrine config looks like:
Any suggestions on how to go about storing an empty polygon or other geometry?
Thanks!
The text was updated successfully, but these errors were encountered: