Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
The standard IEC 13249-3:2016 — titled Information technology — Database languages — SQL multimedia and application packages — Part 3: Spatial — is widely known as SQL/MM Spatial. It defines the user‑defined types (UDTs), methods, and conventions for storing, managing, and querying spatial data directly within SQL databases. This article provides a technical overview of the standard’s scope, core requirements, implementation highlights, and compliance considerations.
IEC 13249-3:2016 specifies a set of spatial data types and operators that extend the SQL language to handle geometric and geographic information. Its primary goals are:
The standard is part of the ISO/IEC 13249 series, which covers multimedia and application packages for SQL. It adapts and harmonises concepts from the Open Geospatial Consortium (OGC) Simple Feature Access specification, ensuring interoperability with the broader GIS ecosystem.
The standard defines a hierarchy of geometry types rooted at ST_Geometry. Each type supports specific methods and participates in spatial predicates. The following table lists the primary types and their characteristics.
| Type | Description | Constraints & Subtypes |
|---|---|---|
ST_Point | A 0‑dimensional geometry representing a single coordinate. | Coordinates may include Z (elevation) and M (measure) values. |
ST_Curve | 1‑dimensional geometry whose coordinates define a parametric curve. | Subtypes: ST_LineString, ST_CircularString. |
ST_Surface | 2‑dimensional geometry bounded by one or more closed curves. | Subtypes: ST_Polygon, ST_CurvePolygon. |
ST_GeomCollection | A homogenous or heterogeneous collection of geometries. | Subtypes: ST_MultiPoint, ST_MultiLineString, ST_MultiPolygon. |
IEC 13249-3 defines a comprehensive set of Boolean predicates and analysis functions. The table below summarises the most common predicates used in spatial filtering and relationship testing.
| Predicate | Example | Description |
|---|---|---|
ST_Equals | a.ST_Equals(b) | Returns TRUE if geometries are spatially equal. |
ST_Disjoint | a.ST_Disjoint(b) | Returns TRUE if geometries share no points in common. |
ST_Intersects | a.ST_Intersects(b) | Returns TRUE if geometries have at least one point in common. |
ST_Touches | a.ST_Touches(b) | Returns TRUE if geometries touch only at boundary points. |
ST_Contains | a.ST_Contains(b) | Returns TRUE if b is wholly inside a. |
Additional operations include constructive methods (e.g., ST_Buffer, ST_ConvexHull, ST_Union), metric functions (ST_Area, ST_Length, ST_Distance), and coordinate system transformation (ST_Transform). All methods follow the naming prefix ST_ to avoid collisions with non‑spatial functions.
ST_Within / ST_Contains pair carefully to avoid double‑counting rows. Always consider whether the predicate you need is exactly the inverse of another (e.g., ST_Contains(a,b) is equivalent to ST_Within(b,a)). SQL/MM Spatial is designed to be a natural extension of the SQL object‑relational model. Implementations typically:
ST_Geometry type or one of its subtypes.The standard defines two conformance levels:
ST_CircularString, ST_CurvePolygon), parametric curves, and advanced operations (e.g., ST_IsValid, ST_MakeValid).Compliance with IEC 13249-3:2016 is achieved by implementing all required features for the declared conformance level and satisfying the type‑checking and semantic rules defined in the standard. Key compliance aspects include:
ST_ prefix and the prescribed argument list (overloading is allowed but must be documented).UNKNOWN when any argument is NULL.Conformance testing is typically performed by the vendor or a third‑party using the abstract test suite provided by the standard. For users, choosing a database that has undergone formal conformance testing ensures predictable behaviour when migrating or sharing geographic applications.
SDO_GEOMETRY system, which is based on SQL/MM), IBM Db2 Spatial Extender, PostgreSQL with PostGIS (largely compliant at Level 0), and Microsoft SQL Server spatial types (geometry and geography, which follow a similar but not identical model). Always check the specific version documentation for conformance details. — Published 2026. This article is for informational purposes and does not substitute the official standard document. For authoritative specification and conformance testing details, refer directly to IEC 13249-3:2016 or its national adoptions.