Skip to main content

PostGIS spatial support

View Markdown versionEdit this page on GitHub

Platform and version scope​

DBMS behavior: this reference uses the PostGIS 3.5 manual, chapter 4, checked on 2026-10-11. PostgreSQL hosts the extension; the statements below concern PostGIS spatial types rather than PostgreSQL's unrelated built-in geometric types. No PostgreSQL server-version compatibility range or live test result is inferred. Integration evidence is pinned to Doctrine Spatial 6.0.0.

Spatial behavior​

The vendor documents the following in chapter 4, sections 4.1–4.5:

SubjectPostGIS behavior
Typesgeometry uses a planar model; geography supports geodetic calculations with a smaller function/type subset.
GeometriesPoint, LineString, Polygon, their multi-types and GeometryCollection; also curves, Triangle, TIN and PolyhedralSurface. Not every operation accepts every type.
DimensionsGeometry coordinates can be XY, XYZ, XYM or XYZM. Storing Z/M does not mean every operation uses them.
CRS/SRIDSRIDs identify reference systems through spatial_ref_sys. ST_SetSRID labels coordinates; ST_Transform changes them between reference systems.
FormatsWKT/WKB and extended EWKT/EWKB; extended forms can carry SRID metadata. Geometry's canonical textual output is hexadecimal EWKB.
Empty/validityEmpty geometries exist. Storage also permits invalid geometry; validity checking remains an explicit operation.

See the vendor data model and reference-system documentation for the per-type and per-function restrictions. Geography is not interchangeable with geometry solely because both can contain a Point.

Differences from standards​

Vendor extension: EWKT's SRID=...; prefix and EWKB's embedded SRID are PostGIS extensions, described in section 4.2.1. They must not be identified as the OGC geometry WKT/WKB layouts. Compare OGC 06-103r4 clauses 7.2.2–7.2.5 and 8.2.8 through the geometry representation reference.

Scope distinction: the vendor's planar/geodetic models and additional operations do not establish conformance of every supported feature to every SQL/MM edition. Curved types should not all be classified as proprietary: the separate SQL/MM reference owns their normative assessment.

LongitudeOne integration and support​

Implementation scope: every row applies to Doctrine Spatial 6.0.0 on its PostgreSQL/PostGIS adapter. Server versions and features beyond the rows are not assessed. These records describe inspected code, not a deployment certification.

FeatureImplementation scopeStatusLimitationsImplementation decisionExtensionsEvidence
Geometry persistenceDoctrine Spatial 6.0.0, PostGISSupportedLimited to the library's PHP types; no universal DBMS type coverage.Write through ST_GeomFromEWKT; read through ST_AsEWKB.None documented as LongitudeOne-specific; uses PostGIS formats.PostgreSql adapter
Geography persistenceDoctrine Spatial 6.0.0, PostGISPartially supportedPHP geography types are Point, LineString and Polygon; no claim for every native geography type.Use ST_GeographyFromText and ST_AsEWKT; missing SRID becomes 4326.None documented.Adapter, PHP types
SRID propagationDoctrine Spatial 6.0.0, PostGISSupportedLabels are transmitted; this does not transform coordinates or verify SRS validity.Include a supplied SRID in EWKT; use subtype/SRID declarations when provided.None documented.Adapter
XYZ, XYM, XYZM PHP persistenceDoctrine Spatial 6.0.0, PostGISUnsupportedThe PHP Point model exposes X/Y, not Z/M. Native dimensional support does not extend this model.Keep the released PHP model's two ordinates.None documented.Point, AbstractPoint
Curves, Triangle, TIN, PolyhedralSurface and GeometryCollection PHP valuesDoctrine Spatial 6.0.0, PostGISUnsupportedNo corresponding PHP classes in this release.Supported classes are the six linear geometry families.None documented.PHP type inventory
Complete EMPTY round tripsDoctrine Spatial 6.0.0, PostGISNot assessedDo not infer PHP empty support from native PostGIS constructors.No new compatibility decision made.None documented.PHP type inventory

DBMS overview, geometry families, dimensions, CRS/SRID, formats and Doctrine Spatial 6.x usage.