Glossary

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 types

COORDINATES

Implemented

MySql

PostgreSql

Geometric

X, Y

YES

YES

YES

Point

X, Y

YES

YES

YES

LineString

X, Y

YES

YES

YES

Polygon

X, Y

YES

YES

YES

MultiPoint

X, Y

YES

YES

YES

MultiLineString

X, Y

YES

YES

YES

MultiPolygon

X, Y

YES

YES

YES

GeomCollection

X, Y

NO

Curve

X, Y

NO

Surface

X, Y

NO

PolyHedralSurface

X, Y

NO

GeometricZ

X, Y, Z

NO

PointZ

X, Y, Z

NO

LineStringZ

X, Y, Z

NO

PolygonZ

X, Y, Z

NO

MultiPointZ

X, Y, Z

NO

MultiLineStringZ

X, Y, Z

NO

MultiPolygonZ

X, Y, Z

NO

GeomCollectionZ

X, Y, Z

NO

CurveZ

X, Y, Z

NO

SurfaceZ

X, Y, Z

NO

PolyHedralSurfaceZ

X, Y, Z

NO

GeometricM

X, Y, M

NO

PointM

X, Y, M

NO

LineStringM

X, Y, M

NO

PolygonM

X, Y, M

NO

MultiPointM

X, Y, M

NO

MultiLineStringM

X, Y, M

NO

MultiPolygonM

X, Y, M

NO

GeomCollectionM

X, Y, M

NO

CurveM

X, Y, M

NO

SurfaceM

X, Y, M

NO

PolyHedralSurfaceM

X, Y, M

NO

GeometricZM

X, Y, Z, M

NO

PointZM

X, Y, Z, M

NO

LineStringZM

X, Y, Z, M

NO

PolygonZM

X, Y, Z, M

NO

MultiPointZM

X, Y, Z, M

NO

MultiLineStringZM

X, Y, Z, M

NO

MultiPolygonZM

X, Y, Z, M

NO

GeomCollectionZM

X, Y, Z, M

NO

CurveZM

X, Y, Z, M

NO

SurfaceZM

X, Y, Z, M

NO

PolyHedralSurfaceZM

X, Y, Z, M

NO

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 functions

Implemented

Type

MySql

PostgreSql

ST_Area

YES

Numeric

YES

YES

ST_AsBinary

YES

String

YES

YES

ST_Boundary

YES

String

YES

YES

ST_Buffer

YES

Numeric

NO*

YES

ST_Centroid

YES

String

YES

YES

ST_Contains

YES

Numeric

YES

YES

ST_ConvexHull

YES

String

NO

YES

ST_Crosses

YES

Numeric

YES

YES

ST_Difference

YES

String

YES

YES

ST_Dimension

YES

Numeric

YES

YES

ST_Disjoint

YES

Numeric

YES

YES

ST_Distance

YES

Numeric

NO*

YES

ST_Equals

YES

Numeric

YES

YES

ST_Intersects

YES

Numeric

YES

YES

ST_Intersection

YES

String

YES

YES

ST_IsClosed

YES

Numeric

YES

YES

ST_IsEmpty

YES

Numeric

YES

YES

ST_IsRing

YES

Numeric

NO

YES

ST_IsSimple

YES

Numeric

YES

YES

ST_EndPoint

YES

String

YES

YES

ST_Envelope

YES

String

YES

YES

ST_ExteriorRing

YES

String

YES

YES

ST_GeometryN

YES

String

YES

YES

ST_GeometryN

YES

String

YES

YES

ST_EndPoint

YES

String

YES

YES

ST_GeometryType

YES

Numeric

NO*

YES

ST_GeomFromWkb

YES

String

YES

YES

ST_GeomFromText

YES

String

YES

YES

ST_InteriorRingN

YES

String

YES

YES

ST_Length

YES

Numeric

YES

YES

ST_LineStringFromWkb

YES

String

YES

YES

ST_MPointFromWkb

YES

String

YES

YES

ST_MLineFromWkb

YES

String

YES

YES

ST_MPolyFromWkb

YES

String

YES

YES

ST_NumInteriorRing

YES

String

YES

YES

ST_NumGeometries

YES

String

YES

YES

ST_NumPoints

YES

String

YES

YES

ST_Overlaps

YES

String

YES

YES

ST_Perimeter

YES

String

YES

YES

ST_Point

YES

String

YES

YES

ST_PointFromWkb

YES

String

YES

YES

ST_PointN

YES

String

YES

YES

ST_PointOnSurface

YES

String

NO

YES

ST_PolyFromWkb

YES

String

YES

YES

ST_Relate

YES

String

YES

YES

ST_SetSRID

YES

Numeric

YES

YES

ST_StartPoint

YES

Numeric

YES

YES

ST_SymDifference

YES

String

YES

YES

ST_Touches

YES

Numeric

YES

YES

ST_Union

YES

String

YES

YES

ST_Within

YES

Numeric

YES

YES

ST_X

YES

Numeric

YES

YES

ST_Y

YES

Numeric

YES

YES

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 functions

Implemented

Type

Sp_AsGeoJson

YES

String

Sp_Azimuth

YES

String

Sp_ClosestPoint

YES

String

Sp_Collect

YES

String

Sp_ContainsProperly

YES

Numeric

Sp_CoveredBy

YES

Numeric

Sp_Covers

YES

Numeric

Sp_Distance_Sphere

YES

Numeric

Sp_DWithin

YES

Numeric

Sp_Expand

YES

Numeric

Sp_GeogFromText

YES

String

Sp_GeographyFromText

YES

String

Sp_GeomFromEwkt

YES

Numeric

Sp_GeometryType

YES

Numeric

Sp_LineCrossingDirection

YES

Numeric

Sp_LineSubstring

YES

Numeric

Sp_LineLocatePoint

YES

Numeric

Sp_LineInterpolatePoint

YES

String

Sp_MakeEnvelope

YES

String

Sp_MakeBox2D

YES

String

Sp_MakeLine

YES

String

Sp_MakePoint

YES

String

Sp_NPoints

YES

Numeric

Sp_Scale

YES

Numeric

Sp_Simplify

YES

Numeric

Sp_Split

YES

Numeric

Sp_SnapToGrid

YES

String

Sp_Summary

YES

String

Sp_Transform

YES

Numeric

Sp_Translate

YES

Numeric

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 functions

Implemented

Type

Sp_Distance

YES

Numeric

Sp_Buffer

YES

Numeric

Sp_BufferStrategy

YES

Numeric

Sp_GeometryType

YES

Numeric

Sp_LineString

YES

Numeric

Sp_MBRContains

YES

Numeric

Sp_MBRDisjoint

YES

Numeric

Sp_MBREquals

YES

Numeric

Sp_MBRDisjoint

YES

Numeric

Sp_MBRIntersects

YES

Numeric

Sp_MBROverlaps

YES

Numeric

Sp_MBRTouches

YES

Numeric

Sp_MBRWithin

YES

Numeric

Sp_Point

YES

Numeric

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.