A geometry[] or geography[] column holds several spatial values in one row. This library maps it to a PHP list of WktSpatialData value objects, one per item, with null for a NULL item.
The platform mappings let schema introspection recognise the columns. PostgreSQL names an array column’s type after its item type with a leading underscore.
Loading the entity gives the same list back. The items of one array may mix geometry types, SRIDs and dimensions, and every type in Supported geometry types works as an item. A geography item written without an SRID reads back with SRID=4326, because PostGIS gives every geography value one.
Dimensional modifiers
An array item reads back with its dimensional modifier spelled POINT Z(…), exactly like a single value:
POINTZ(1 2 3) => POINT Z(1 2 3)
LINESTRINGM(0 0 1, 1 1 2) => LINESTRING M(0 0 1, 1 1 2)
POLYGONZM((...)) => POLYGON ZM((...))
POINT Z (1 2 3) => POINT Z(1 2 3)
SRID=4326;POINT Z (1 2 3) => SRID=4326;POINT Z(1 2 3)
An item of another geometry type or SRID fails at insert time, and an item without an SRID is stored with 4326. Column options for DDL lists the options.
Indexing
A GiST index cannot index an array column, so the items of a geometry[] get no spatial index. When you query the items spatially, either:
store each geometry in its own row, with a GiST index on that column, or
keep a geometry column next to the array that holds their union or bounding box, and index that.