Skip to main content

Glossary

View Markdown versionEdit this page on GitHub

Current version — This documentation describes the current major version of doctrine-spatial.

View the library roadmap

This catalogue preserves the collected Doctrine Spatial implementation snapshot. The database columns and planned types are historical capability notes, not a statement of current database support or normative conformance.

Types​

Types described in OGC Standards or in ISO/IEC 13249-3:2016​

The ISO/IEC 13249-3 International Standard defines multimedia and application specific types and their associated routines using the user-defined features in ISO/IEC 9075. The third part of ISO/IEC 13249 defines spatial user-defined types and their associated routines.

In doctrine spatial extensions, some of all normalized spatial user-defined types are implemented.

This section lists them.

Spatial typesCOORDINATESImplementedMySqlPostgreSql
GeometricX, YYESYESYES
PointX, YYESYESYES
LineStringX, YYESYESYES
PolygonX, YYESYESYES
MultiPointX, YYESYESYES
MultiLineStringX, YYESYESYES
MultiPolygonX, YYESYESYES
GeomCollectionX, YNO
CurveX, YNI (not instantiable)NI (not instantiable)NI (not instantiable)
SurfaceX, YNI (not instantiable)NI (not instantiable)NI (not instantiable)
PolyHedralSurfaceX, YNONONO
GeometricZX, Y, ZNONA (not applicable)
PointZX, Y, ZIncomingNA (not applicable)
LineStringZX, Y, ZIncomingNA (not applicable)
PolygonZX, Y, ZNONA (not applicable)
MultiPointZX, Y, ZNONA (not applicable)
MultiLineStringZX, Y, ZNONA (not applicable)
MultiPolygonZX, Y, ZNONA (not applicable)
GeomCollectionZX, Y, ZNONA (not applicable)
CurveZX, Y, ZNI (not instantiable)NI (not instantiable)NI (not instantiable)
SurfaceZX, Y, ZNI (not instantiable)NI (not instantiable)NI (not instantiable)
PolyHedralSurfaceZX, Y, ZNONA (not applicable)
GeometricMX, Y, MNONA (not applicable)
PointMX, Y, MIncomingNA (not applicable)
LineStringMX, Y, MIncomingNA (not applicable)
PolygonMX, Y, MNONA (not applicable)
MultiPointMX, Y, MNONA (not applicable)
MultiLineStringMX, Y, MNONA (not applicable)
MultiPolygonMX, Y, MNONA (not applicable)
GeomCollectionMX, Y, MNONA (not applicable)
CurveMX, Y, MNI (not instantiable)NI (not instantiable)NI (not instantiable)
SurfaceMX, Y, MNI (not instantiable)NI (not instantiable)NI (not instantiable)
PolyHedralSurfaceMX, Y, MNONA (not applicable)
GeometricZMX, Y, Z, MNONA (not applicable)
PointZMX, Y, Z, MIncomingNA (not applicable)
LineStringZMX, Y, Z, MIncomingNA (not applicable)
PolygonZMX, Y, Z, MNONA (not applicable)
MultiPointZMX, Y, Z, MNONA (not applicable)
MultiLineStringZMX, Y, Z, MNONA (not applicable)
MultiPolygonZMX, Y, Z, MNONA (not applicable)
GeomCollectionZMX, Y, Z, MNONA (not applicable)
CurveZMX, Y, Z, MNI (not instantiable)NI (not instantiable)NI (not instantiable)
SurfaceZMX, Y, Z, MNI (not instantiable)NI (not instantiable)NI (not instantiable)
PolyHedralSurfaceZMX, Y, Z, MNONA (not applicable)

Not instantiable: Some types are defined as not instantiable by ISO/IEC 13249-3 International Standard.

Not applicable: the collected source records these types as unsupported by MySQL.

Functions​

Functions described in OGC Standards or in ISO/IEC 13249-3:2016​

The ISO/IEC 13249-3 International Standard defines multimedia and application specific types and their associated routines using the user-defined features in ISO/IEC 9075. The third part of ISO/IEC 13249 defines spatial user-defined types and their associated routines.

Associated routines of this document are considered as the "Standard functions" for this doctrine spatial extension. I try to maintain this documentation up-to-date. In any case, you will find under the Functions/Standards directory a set of classes. Each class implement the spatial function of the same name.

The below table shows the defined functions:

Spatial functionsImplementedTypeMySqlPostgreSql
ST_AreaYESNumericYESYES
ST_AsBinaryYESStringYESYES
ST_BoundaryYESStringYESYES
ST_BufferYESNumericNO*YES
ST_CentroidYESStringYESYES
ST_ContainsYESNumericYESYES
ST_ConvexHullYESStringNOYES
ST_CrossesYESNumericYESYES
ST_DifferenceYESStringYESYES
ST_DimensionYESNumericYESYES
ST_DisjointYESNumericYESYES
ST_DistanceYESNumericNO*YES
ST_EqualsYESNumericYESYES
ST_IntersectsYESNumericYESYES
ST_IntersectionYESStringYESYES
ST_IsClosedYESNumericYESYES
ST_IsEmptyYESNumericYESYES
ST_IsRingYESNumericNOYES
ST_IsSimpleYESNumericYESYES
ST_EndPointYESStringYESYES
ST_EnvelopeYESStringYESYES
ST_ExteriorRingYESStringYESYES
ST_GeometryNYESStringYESYES
ST_GeometryNYESStringYESYES
ST_EndPointYESStringYESYES
ST_GeometryTypeYESNumericNO*YES
ST_GeomFromWkbYESStringYESYES
ST_GeomFromTextYESStringYESYES
ST_InteriorRingNYESStringYESYES
ST_LengthYESNumericYESYES
ST_LineStringFromWkbYESStringYESYES
ST_MPointFromWkbYESStringYESYES
ST_MLineFromWkbYESStringYESYES
ST_MPolyFromWkbYESStringYESYES
ST_NumInteriorRingYESStringYESYES
ST_NumGeometriesYESStringYESYES
ST_NumPointsYESStringYESYES
ST_OverlapsYESStringYESYES
ST_PerimeterYESStringYESYES
ST_PointYESStringYESYES
ST_PointFromWkbYESStringYESYES
ST_PointNYESStringYESYES
ST_PointOnSurfaceYESStringNOYES
ST_PolyFromWkbYESStringYESYES
ST_RelateYESStringYESYES
ST_SetSRIDYESNumericYESYES
ST_StartPointYESNumericYESYES
ST_SymDifferenceYESStringYESYES
ST_TouchesYESNumericYESYES
ST_UnionYESStringYESYES
ST_WithinYESNumericYESYES
ST_XYESNumericYESYES
ST_YYESNumericYESYES

Specific functions of the PostgreSql database server​

If your application can be used with another database server than PostgreSql, you should avoid to use these functions. It's a good practice to name function with the SP prefix, but do not forget that you can name all functions as you want when you declare it into your configuration files or in your bootstrap.

Specific PostgreSQL Spatial functionsImplementedType
Sp_AsGeoJsonYESString
Sp_AzimuthYESString
Sp_ClosestPointYESString
Sp_CollectYESString
Sp_ContainsProperlyYESNumeric
Sp_CoveredByYESNumeric
Sp_CoversYESNumeric
Sp_Distance_SphereYESNumeric
Sp_DWithinYESNumeric
Sp_ExpandYESNumeric
Sp_GeogFromTextYESString
Sp_GeographyFromTextYESString
Sp_GeomFromEwktYESNumeric
Sp_GeometryTypeYESNumeric
Sp_LineCrossingDirectionYESNumeric
Sp_LineSubstringYESNumeric
Sp_LineLocatePointYESNumeric
Sp_LineInterpolatePointYESString
Sp_MakeEnvelopeYESString
Sp_MakeBox2DYESString
Sp_MakeLineYESString
Sp_MakePointYESString
Sp_NPointsYESNumeric
Sp_ScaleYESNumeric
Sp_SimplifyYESNumeric
Sp_SplitYESNumeric
Sp_SnapToGridYESString
Sp_SummaryYESString
Sp_TransformYESNumeric
Sp_TranslateYESNumeric

Specific functions of the MySql database server​

If your application can be used with another database server than MySql, you should avoid to use these functions.

Specific MySQL Spatial functionsImplementedType
Sp_DistanceYESNumeric
Sp_BufferYESNumeric
Sp_BufferStrategyYESNumeric
Sp_Distance_SphereYESNumeric
Sp_GeometryTypeYESNumeric
Sp_LineStringYESNumeric
Sp_MBRContainsYESNumeric
Sp_MBRDisjointYESNumeric
Sp_MBREqualsYESNumeric
Sp_MBRDisjointYESNumeric
Sp_MBRIntersectsYESNumeric
Sp_MBROverlapsYESNumeric
Sp_MBRTouchesYESNumeric
Sp_MBRWithinYESNumeric
Sp_PointYESNumeric

Nota: Since MySql 5.7, a lot of functions are deprecated. These functions have been removed from doctrine spatial extensions, because they are replaced by their new names. As example, the GeomFromText function does no more exist. It has been replaced by the Standard function ST_GeomFromText since MySql 5.7. So if you was using GeomFromText, removed it and use the standard function declared in the StGeomFromText class.