ISO/IEC 13249-3:2016
(Main)Information technology — Database languages — SQL multimedia and application packages — Part 3: Spatial
Information technology — Database languages — SQL multimedia and application packages — Part 3: Spatial
ISO/IEC 13249:2016 a) defines concepts specific to this part of ISO/IEC 13249, b) defines spatial user-defined types and their associated routines.
Technologies de l'information — Langages de bases de données — Multimédia SQL et paquetages d'application — Partie 3: Spatial
General Information
Relations
Buy Standard
Standards Content (Sample)
INTERNATIONAL ISO/IEC
STANDARD 13249-3
Fifth edition
2016-01-15
Information technology — Database
languages — SQL multimedia and
application packages —
Part 3:
Spatial
Technologies de l’information — Langages de bases de données —
Multimédia SQL et paquetages d’application —
Partie 3: Spatial
Reference number
ISO/IEC 13249-3:2016(E)
©
ISO/IEC 2016
---------------------- Page: 1 ----------------------
ISO/IEC 13249-3:2016(E)
COPYRIGHT PROTECTED DOCUMENT
© ISO/IEC 2016, Published in Switzerland
All rights reserved. Unless otherwise specified, no part of this publication may be reproduced or utilized otherwise in any form
or by any means, electronic or mechanical, including photocopying, or posting on the internet or an intranet, without prior
written permission. Permission can be requested from either ISO at the address below or ISO’s member body in the country of
the requester.
ISO copyright office
Ch. de Blandonnet 8 • CP 401
CH-1214 Vernier, Geneva, Switzerland
Tel. +41 22 749 01 11
Fax +41 22 749 09 47
copyright@iso.org
www.iso.org
ii © ISO/IEC 2016 – All rights reserved
---------------------- Page: 2 ----------------------
ISO/IEC 13249-3:2016(E)
Contents Page
Foreword . xviii
Introduction . xix
1 Scope. 1
2 Normative references . 1
3 Terms and definitions, notations, and conventions . 2
3.1 Terms and definitions . 2
3.1.1 Terms and definitions provided in Part 1 . 2
3.1.2 Terms and definitions provided in Part 3 . 2
3.1.3 Terms and definitions taken from ISO 19107 . 7
3.1.4 Terms and definitions taken from ISO 19111 . 8
3.1.5 Terms and definitions taken from ISO 19148 . 8
3.2 Notations . 9
3.2.1 Notations provided in Part 1 . 9
3.2.2 Notations provided in Part 3 . 9
3.3 Conventions . 10
3.4 Extended BNF notation for WKT and WKB . 10
4 Concepts . 11
4.1 Concepts provided in Part 1 . 11
4.2 Geometry Types . 11
4.2.1 ST_Geometry . 11
4.2.2 Spatial Relationships using ST_Geometry. 19
4.2.3 ST_Point . 24
4.2.4 ST_Curve . 24
4.2.5 ST_LineString . 26
4.2.6 ST_CircularString . 26
4.2.7 ST_Circle . 28
4.2.8 ST_GeodesicString . 28
4.2.9 ST_EllipticalCurve . 29
4.2.10 ST_NURBSCurve . 30
4.2.11 ST_Clothoid . 31
4.2.12 ST_SpiralCurve . 32
4.2.13 ST_CompoundCurve . 33
4.2.14 ST_Surface . 33
4.2.15 ST_CurvePolygon . 34
4.2.16 ST_Polygon . 35
4.2.17 ST_Triangle . 35
4.2.18 ST_PolyhdrlSurface . 36
4.2.19 ST_TIN . 36
4.2.20 ST_CompoundSurface . 37
4.2.21 ST_Solid . 38
4.2.22 ST_BRepSolid . 38
4.2.23 ST_GeomCollection . 38
4.2.24 ST_MultiPoint . 39
4.2.25 ST_MultiCurve . 39
4.2.26 ST_MultiLineString . 40
4.2.27 ST_MultiSurface . 41
4.2.28 ST_MultiPolygon . 42
4.3 Topology-Geometry . 42
4.3.1 .ST_NODE . 43
4.3.2 .ST_EDGE . 43
4.3.3 .ST_FACE . 46
© ISO/IEC 2016 - All rights reserved iii
---------------------- Page: 3 ----------------------
ISO/IEC 13249-3:2016(E)
4.4 Topology-Network . 49
4.4.1 .ST_NODE . 49
4.4.2 .ST_LINK . 49
4.5 General Routines . 52
4.5.1 ST_ShortestUndPath Function . 52
4.5.2 ST_ShortestDirPath Function . 53
4.6 Spatial Reference System Type . 53
4.6.1 ST_SpatialRefSys . 53
4.7 Linear Referencing Types . 53
4.7.1 ST_PositionExp . 53
4.7.2 ST_LinearElement . 54
4.7.3 ST_LRFeature . 55
4.7.4 ST_LRCurve . 55
4.7.5 ST_LRDirectedEdge . 56
4.7.6 ST_StartValue . 56
4.7.7 ST_LRM . 56
4.7.8 ST_DistanceExp . 57
4.7.9 ST_LRMeasure . 58
4.7.10 ST_Referent . 59
4.7.11 ST_LatOffsetExp . 59
4.7.12 ST_VerOffsetExp . 59
4.7.13 ST_VectorOffsetExp . 60
4.8 Angle and Direction Types . 60
4.8.1 ST_Angle . 60
4.8.2 ST_Direction . 61
4.9 Support Types . 63
4.9.1 ST_TINElement . 63
4.9.2 ST_Vector . 63
4.9.3 ST_AffinePlacement . 64
4.9.4 ST_NURBSPoint . 65
4.9.5 ST_Knot . 65
4.10 Support Routines . 65
4.10.1 ST_Geometry ARRAY and ST_Vector ARRAY Support Routines . 65
4.11 Tables with columns using geometry types . 67
4.12 The Spatial Information Schema . 67
5 Geometry Types . 68
5.1 ST_Geometry Type and Routines . 68
5.1.1 ST_Geometry Type . 68
5.1.2 ST_Dimension Method . 83
5.1.3 ST_CoordDim Method . 84
5.1.4 ST_GeometryType Method . 85
5.1.5 ST_SRID Methods . 87
5.1.6 ST_Transform Method . 88
5.1.7 ST_IsEmpty Method . 89
5.1.8 ST_IsSimple Method . 90
5.1.9 ST_3DIsSimple Method . 91
5.1.10 ST_IsValid Method . 92
5.1.11 ST_Is3D Method . 93
5.1.12 ST_IsMeasured Method . 94
5.1.13 ST_LocateAlong Method . 95
5.1.14 ST_3DLocateAlong Method . 96
5.1.15 ST_LocateBetween Method . 97
5.1.16 ST_3DLocateBetween Method . 99
5.1.17 ST_Boundary Method . 101
5.1.18 ST_3DBoundary Method . 102
5.1.19 ST_Envelope Method . 103
5.1.20 ST_EnvelopeAsPts Method . 104
5.1.21 ST_MinX Method . 105
5.1.22 ST_MaxX Method . 106
5.1.23 ST_MinY Method . 107
© ISO/IEC 2016 - All rights reserved iv
---------------------- Page: 4 ----------------------
ISO/IEC 13249-3:2016(E)
5.1.24 ST_MaxY Method . 108
5.1.25 ST_MinZ Method . 109
5.1.26 ST_MaxZ Method . 110
5.1.27 ST_MinM Method . 111
5.1.28 ST_MaxM Method . 112
5.1.29 ST_ConvexHull Method . 113
5.1.30 ST_Buffer Methods . 114
5.1.31 ST_Intersection Method . 116
5.1.32 ST_3DIntersection Method . 117
5.1.33 ST_Union Method . 118
5.1.34 ST_3DUnion Method . 119
5.1.35 ST_Difference Method . 120
5.1.36 ST_3DDifference Method. 121
5.1.37 ST_SymDifference Method . 122
5.1.38 ST_3DSymDifference Method . 123
5.1.39 Return Types from ST_Intersection, ST_Union, ST_Difference, and ST_SymDifference . 124
5.1.40 Return Types from ST_3DIntersection, ST_3DUnion, ST_3DDifference, and
ST_3DSymDifference . 127
5.1.41 ST_Distance Methods . 128
5.1.42 ST_3DDistance Methods . 130
5.1.43 ST_Equals Method . 132
5.1.44 ST_3DEquals Method . 133
5.1.45 ST_Relate Method . 134
5.1.46 ST_Disjoint Method . 137
5.1.47 ST_3DDisjoint Method . 138
5.1.48 ST_Intersects Method . 139
5.1.49 ST_3DIntersects Method . 140
5.1.50 ST_Touches Method . 141
5.1.51 ST_Crosses Method . 142
5.1.52 ST_Within Method . 143
5.1.53 ST_Contains Method . 144
5.1.54 ST_Overlaps Method . 145
5.1.55 Cast. 146
5.1.56 ST_WKTToSQL Method . 164
5.1.57 ST_AsText Method . 165
5.1.58 ST_WKBToSQL Method . 166
5.1.59 ST_AsBinary Method . 167
5.1.60 ST_GMLToSQL Method . 168
5.1.61 ST_AsGML Method . 171
5.1.62 ST_GeomFromText Functions . 172
5.1.63 ST_GeomFromWKB Functions . 173
5.1.64 ST_GeomFromGML Functions . 174
5.1.65 ST_Geometry Ordering Definition . 176
5.1.66 SQL Transform Functions . 177
5.1.67 . 178
5.1.68 . 203
6 Point Types . 253
6.1 ST_Point Type and Routines . 253
6.1.1 ST_Point Type . 253
6.1.2 ST_Point Methods . 258
6.1.3 ST_X Methods . 265
6.1.4 ST_Y Methods . 266
6.1.5 ST_Z Methods . 267
6.1.6 ST_M Methods . 268
6.1.7 ST_ExplicitPoint Method . 269
6.1.8 ST_PointFromText Functions . 270
6.1.9 ST_PointFromWKB Functions . 271
6.1.10 ST_PointFromGML Functions . 272
7 Curve Types . 273
© ISO/IEC 2016 - All rights reserved v
---------------------- Page: 5 ----------------------
ISO/IEC 13249-3:2016(E)
7.1 ST_Curve Type and Routines . 273
7.1.1 ST_Curve Type . 273
7.1.2 ST_Length Methods . 278
7.1.3 ST_3DLength Methods . 280
7.1.4 ST_StartPoint Method . 282
7.1.5 ST_EndPoint Method . 283
7.1.6 ST_IsClosed Method . 284
7.1.7 ST_3DIsClosed Method . 285
7.1.8 ST_IsRing Method . 286
7.1.9 ST_3DIsRing Method . 287
7.1.10 ST_CurveToLine Method . 288
7.1.11 ST_DistanceToPoint Methods . 289
7.1.12 ST_3DDistanceToPt Methods . 291
7.1.13 ST_PointAtDistance Methods . 293
7.1.14 ST_3DPtAtDistance Methods . 295
7.1.15 ST_PerpPoints Method . 297
7.2 ST_LineString Type and Routines . 298
7.2.1 ST_LineString Type . 298
7.2.2 ST_LineString Methods . 301
7.2.3 ST_Points Methods . 304
7.2.4 ST_NumPoints Method . 306
7.2.5 ST_PointN Method . 307
7.2.6 ST_StartPoint Method . 308
7.2.7 ST_EndPoint Method . 309
7.2.8 ST_LineFromText Functions . 310
7.2.9 ST_LineFromWKB Functions . 311
7.2.10 ST_LineFromGML Functions . 312
7.3 ST_CircularStrin
...
FINAL
INTERNATIONAL ISO/IEC
DRAFT
STANDARD FDIS
13249-3
ISO/IEC JTC 1/SC 32
Information technology — Database
Secretariat: ANSI
languages — SQL multimedia and
Voting begins
on: 2015-09-30 application packages —
Voting terminates
Part 3:
on: 2015-11-30
Spatial
Technologies de l’information — Langages de bases de données —
Multimédia SQL et paquetages d’application —
Partie 3: Spatial
RECIPIENTS OF THIS DRAFT ARE INVITED TO
SUBMIT, WITH THEIR COMMENTS, NOTIFICATION
OF ANY RELEVANT PATENT RIGHTS OF WHICH
THEY ARE AWARE AND TO PROVIDE SUPPOR TING
DOCUMENTATION.
IN ADDITION TO THEIR EVALUATION AS
Reference number
BEING ACCEPTABLE FOR INDUSTRIAL, TECHNO-
ISO/IEC FDIS 13249-3:2015(E)
LOGICAL, COMMERCIAL AND USER PURPOSES,
DRAFT INTERNATIONAL STANDARDS MAY ON
OCCASION HAVE TO BE CONSIDERED IN THE
LIGHT OF THEIR POTENTIAL TO BECOME STAN-
DARDS TO WHICH REFERENCE MAY BE MADE IN
©
NATIONAL REGULATIONS. ISO/IEC 2015
---------------------- Page: 1 ----------------------
ISO/IEC FDIS 13249-3:2015(E)
COPYRIGHT PROTECTED DOCUMENT
© ISO/IEC 2015, Published in Switzerland
All rights reserved. Unless otherwise specified, no part of this publication may be reproduced or utilized otherwise in any form
or by any means, electronic or mechanical, including photocopying, or posting on the internet or an intranet, without prior
written permission. Permission can be requested from either ISO at the address below or ISO’s member body in the country of
the requester.
ISO copyright office
Ch. de Blandonnet 8 • CP 401
CH-1214 Vernier, Geneva, Switzerland
Tel. +41 22 749 01 11
Fax +41 22 749 09 47
copyright@iso.org
www.iso.org
ii © ISO/IEC 2015 – All rights reserved
---------------------- Page: 2 ----------------------
ISO/IEC 13249-3:2015(E)
Contents Page
Foreword . xviii
Introduction . xix
1 Scope. 1
2 Normative references . 1
3 Terms and definitions, notations, and conventions . 2
3.1 Terms and definitions . 2
3.1.1 Terms and definitions provided in Part 1 . 2
3.1.2 Terms and definitions provided in Part 3 . 2
3.1.3 Terms and definitions taken from ISO 19107 . 7
3.1.4 Terms and definitions taken from ISO 19111 . 8
3.1.5 Terms and definitions taken from ISO 19148 . 8
3.2 Notations . 9
3.2.1 Notations provided in Part 1 . 9
3.2.2 Notations provided in Part 3 . 9
3.3 Conventions . 10
3.4 Extended BNF notation for WKT and WKB . 10
4 Concepts . 11
4.1 Concepts provided in Part 1 . 11
4.2 Geometry Types . 11
4.2.1 ST_Geometry . 11
4.2.2 Spatial Relationships using ST_Geometry. 19
4.2.3 ST_Point . 24
4.2.4 ST_Curve . 24
4.2.5 ST_LineString . 26
4.2.6 ST_CircularString . 26
4.2.7 ST_Circle . 28
4.2.8 ST_GeodesicString . 28
4.2.9 ST_EllipticalCurve . 29
4.2.10 ST_NURBSCurve . 30
4.2.11 ST_Clothoid . 31
4.2.12 ST_SpiralCurve . 32
4.2.13 ST_CompoundCurve . 33
4.2.14 ST_Surface . 33
4.2.15 ST_CurvePolygon . 34
4.2.16 ST_Polygon . 35
4.2.17 ST_Triangle . 35
4.2.18 ST_PolyhdrlSurface . 36
4.2.19 ST_TIN . 36
4.2.20 ST_CompoundSurface . 37
4.2.21 ST_Solid . 38
4.2.22 ST_BRepSolid . 38
4.2.23 ST_GeomCollection . 38
4.2.24 ST_MultiPoint . 39
4.2.25 ST_MultiCurve . 39
4.2.26 ST_MultiLineString . 40
4.2.27 ST_MultiSurface . 41
4.2.28 ST_MultiPolygon . 42
4.3 Topology-Geometry . 42
4.3.1 .ST_NODE . 43
4.3.2 .ST_EDGE . 43
4.3.3 .ST_FACE . 46
© ISO/IEC 2015 - All rights reserved iii
---------------------- Page: 3 ----------------------
ISO/IEC 13249-3:2015(E)
4.4 Topology-Network . 49
4.4.1 .ST_NODE . 49
4.4.2 .ST_LINK . 49
4.5 General Routines . 52
4.5.1 ST_ShortestUndPath Function . 52
4.5.2 ST_ShortestDirPath Function . 53
4.6 Spatial Reference System Type . 53
4.6.1 ST_SpatialRefSys . 53
4.7 Linear Referencing Types . 53
4.7.1 ST_PositionExp . 53
4.7.2 ST_LinearElement . 54
4.7.3 ST_LRFeature . 55
4.7.4 ST_LRCurve . 55
4.7.5 ST_LRDirectedEdge . 56
4.7.6 ST_StartValue . 56
4.7.7 ST_LRM . 56
4.7.8 ST_DistanceExp . 57
4.7.9 ST_LRMeasure . 58
4.7.10 ST_Referent . 59
4.7.11 ST_LatOffsetExp . 59
4.7.12 ST_VerOffsetExp . 59
4.7.13 ST_VectorOffsetExp . 60
4.8 Angle and Direction Types . 60
4.8.1 ST_Angle . 60
4.8.2 ST_Direction . 61
4.9 Support Types . 63
4.9.1 ST_TINElement . 63
4.9.2 ST_Vector . 63
4.9.3 ST_AffinePlacement . 64
4.9.4 ST_NURBSPoint . 65
4.9.5 ST_Knot . 65
4.10 Support Routines . 65
4.10.1 ST_Geometry ARRAY and ST_Vector ARRAY Support Routines . 65
4.11 Tables with columns using geometry types . 67
4.12 The Spatial Information Schema . 67
5 Geometry Types . 68
5.1 ST_Geometry Type and Routines . 68
5.1.1 ST_Geometry Type . 68
5.1.2 ST_Dimension Method . 83
5.1.3 ST_CoordDim Method . 84
5.1.4 ST_GeometryType Method . 85
5.1.5 ST_SRID Methods . 87
5.1.6 ST_Transform Method . 88
5.1.7 ST_IsEmpty Method . 89
5.1.8 ST_IsSimple Method . 90
5.1.9 ST_3DIsSimple Method . 91
5.1.10 ST_IsValid Method . 92
5.1.11 ST_Is3D Method . 93
5.1.12 ST_IsMeasured Method . 94
5.1.13 ST_LocateAlong Method . 95
5.1.14 ST_3DLocateAlong Method . 96
5.1.15 ST_LocateBetween Method . 97
5.1.16 ST_3DLocateBetween Method . 99
5.1.17 ST_Boundary Method . 101
5.1.18 ST_3DBoundary Method . 102
5.1.19 ST_Envelope Method . 103
5.1.20 ST_EnvelopeAsPts Method . 104
5.1.21 ST_MinX Method . 105
5.1.22 ST_MaxX Method . 106
5.1.23 ST_MinY Method . 107
© ISO/IEC 2015 - All rights reserved iv
---------------------- Page: 4 ----------------------
ISO/IEC 13249-3:2015(E)
5.1.24 ST_MaxY Method . 108
5.1.25 ST_MinZ Method . 109
5.1.26 ST_MaxZ Method . 110
5.1.27 ST_MinM Method . 111
5.1.28 ST_MaxM Method . 112
5.1.29 ST_ConvexHull Method . 113
5.1.30 ST_Buffer Methods . 114
5.1.31 ST_Intersection Method . 116
5.1.32 ST_3DIntersection Method . 117
5.1.33 ST_Union Method . 118
5.1.34 ST_3DUnion Method . 119
5.1.35 ST_Difference Method . 120
5.1.36 ST_3DDifference Method . 121
5.1.37 ST_SymDifference Method . 122
5.1.38 ST_3DSymDifference Method . 123
5.1.39 Return Types from ST_Intersection, ST_Union, ST_Difference, and ST_SymDifference . 124
5.1.40 Return Types from ST_3DIntersection, ST_3DUnion, ST_3DDifference, and
ST_3DSymDifference . 127
5.1.41 ST_Distance Methods . 128
5.1.42 ST_3DDistance Methods . 130
5.1.43 ST_Equals Method . 132
5.1.44 ST_3DEquals Method . 133
5.1.45 ST_Relate Method . 134
5.1.46 ST_Disjoint Method . 137
5.1.47 ST_3DDisjoint Method . 138
5.1.48 ST_Intersects Method . 139
5.1.49 ST_3DIntersects Method . 140
5.1.50 ST_Touches Method . 141
5.1.51 ST_Crosses Method . 142
5.1.52 ST_Within Method . 143
5.1.53 ST_Contains Method . 144
5.1.54 ST_Overlaps Method . 145
5.1.55 Cast . 146
5.1.56 ST_WKTToSQL Method . 164
5.1.57 ST_AsText Method . 165
5.1.58 ST_WKBToSQL Method . 166
5.1.59 ST_AsBinary Method . 167
5.1.60 ST_GMLToSQL Method . 168
5.1.61 ST_AsGML Method . 171
5.1.62 ST_GeomFromText Functions . 172
5.1.63 ST_GeomFromWKB Functions . 173
5.1.64 ST_GeomFromGML Functions . 174
5.1.65 ST_Geometry Ordering Definition . 176
5.1.66 SQL Transform Functions . 177
5.1.67 . 178
5.1.68 . 203
6 Point Types . 253
6.1 ST_Point Type and Routines . 253
6.1.1 ST_Point Type . 253
6.1.2 ST_Point Methods . 258
6.1.3 ST_X Methods . 265
6.1.4 ST_Y Methods . 266
6.1.5 ST_Z Methods . 267
6.1.6 ST_M Methods . 268
6.1.7 ST_ExplicitPoint Method . 269
6.1.8 ST_PointFromText Functions . 270
6.1.9 ST_PointFromWKB Functions . 271
6.1.10 ST_PointFromGML Functions . 272
7 Curve Types . 273
© ISO/IEC 2015 - All rights reserved v
---------------------- Page: 5 ----------------------
ISO/IEC 13249-3:2015(E)
7.1 ST_Curve Type and Routines . 273
7.1.1 ST_Curve Type . 273
7.1.2 ST_Length Methods . 278
7.1.3 ST_3DLength Methods . 280
7.1.4 ST_StartPoint Method . 282
7.1.5 ST_EndPoint Method . 283
7.1.6 ST_IsClosed Method . 284
7.1.7 ST_3DIsClosed Method . 285
7.1.8 ST_IsRing Method . 286
7.1.9 ST_3DIsRing Method . 287
7.1.10 ST_CurveToLine Method . 288
7.1.11 ST_DistanceToPoint Methods . 289
7.1.12 ST_3DDistanceToPt Methods . 291
7.1.13 ST_PointAtDistance Methods . 293
7.1.14 ST_3DPtAtDistance Methods . 295
7.1.15 ST_PerpPoints Method . 297
7.2 ST_LineString Type and Routines . 298
7.2.1 ST_LineString Type . 298
7.2.2 ST_LineString Methods . 301
7.2.3 ST_Points Methods . 304
7.2.4 ST_NumPoints Method . 306
7.2.5 ST_PointN Method . 307
7.2.6 ST_StartPoint Method .
...
Questions, Comments and Discussion
Ask us and Technical Secretary will try to provide an answer. You can facilitate discussion about the standard in here.