0% found this document useful (0 votes)
532 views14 pages

As ISO IEC 13249.3-2005 Information Technology - Database Languages - SQL Multimedia and Application Packages

Standards Preview PDFs from SAI Global InfoStore
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
532 views14 pages

As ISO IEC 13249.3-2005 Information Technology - Database Languages - SQL Multimedia and Application Packages

Standards Preview PDFs from SAI Global InfoStore
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

AS ISO/IEC 13249.

3—2005
ISO/IEC 13249-3:2003
AS ISO/IEC 13249.3—2005

Australian Standard™
This is a free 13 page sample. Access the full version at http://infostore.saiglobal.com.

Information technology—Database
languages—SQL multimedia and
application packages

Part 3: Spatial
This Australian Standard was prepared by Committee IT-027, Data Management &
Interchange. It was approved on behalf of the Council of Standards Australia on
21 April 2005. This Standard was published on 3 June 2005.

The following are represented on Committee IT-027:

Association of Superannuation Funds of Australia


Australia Post
Australia Bankers Association
Australian Bureau of Statistics
Australian Computer Society
This is a free 13 page sample. Access the full version at http://infostore.saiglobal.com.

Australian Customs Service


Australian Electoral Commission
Australian Electric and Electronic Manufacturers Association
Australian Industry Group
Australian Information Industry Association
Australian Institute of Health and Welfare
Australian Taxation Office
Centrelink
Data Management Association Australia
Department of Defence
Department of Immigration, Multicultural and Indigenous Affairs
Health Insurance Commission

Keeping Standards up-to-date


Standards are living documents which reflect progress in science, technology and
systems. To maintain their currency, all Standards are periodically reviewed, and
new editions are published. Between editions, amendments may be issued.
Standards may also be withdrawn. It is important that readers assure themselves
they are using a current Standard, which should include any amendments which
may have been published since the Standard was purchased.
Detailed information about Standards can be found by visiting the Standards Web
Shop at www.standards.com.au and looking up the relevant Standard in the on-line
catalogue.
Alternatively, the printed Catalogue provides information current at 1 January each
year, and the monthly magazine, The Global Standard, has a full listing of revisions
and amendments published each month.
Australian StandardsTM and other products and services developed by Standards
Australia are published and distributed under contract by SAI Global, which
operates the Standards Web Shop.
We also welcome suggestions for improvement in our Standards, and especially
encourage readers to notify us immediately of any apparent inaccuracies or
ambiguities. Contact us via email at [email protected], or write to the Chief
Executive, Standards Australia, GPO Box 5420, Sydney, NSW 2001.

This Standard was issued in draft form for comment as DR 05116.


AS ISO/IEC 13249.3—2005

Australian Standard™
This is a free 13 page sample. Access the full version at http://infostore.saiglobal.com.

Information technology—Database
languages—SQL multimedia and
application packages

Part 3: Spatial

First published as AS ISO/IEC 13249.3—2005.

COPYRIGHT
© Standards Australia
All rights are reserved. No part of this work may be reproduced or copied in any form or by
any means, electronic or mechanical, including photocopying, without the written
permission of the publisher.
Published by Standards Australia GPO Box 5420, Sydney, NSW 2001, Australia
ISBN 0 7337 6721 4
ii

PREFACE
This Standard was prepared by the Standards Australia Committee IT-027, Data Management &
Interchange.
This Standard is identical with, and has been reproduced from, ISO/IEC 13249-3:2003,
Information technology—Database languages—SQL multimedia and application packages—
Part 3: Spatial.
The objective of this Standard is to define spatial data types and their associated routines for use
in SQL databases by software developers.
This Standard is Part 3 of AS 3249, Information technology—Database languages—SQL
multimedia and application packages, which is published in parts as follows:
Part 1: Framework
Part 2: Full-Text
Part 3: Spatial (this Standard)
This is a free 13 page sample. Access the full version at http://infostore.saiglobal.com.

Part 5: Still image


Part 6: Data mining
As this Standard is reproduced from an international standard, the following applies:
(a) Its number appears on the cover and title page while the international standard number
appears only on the cover.
(b) In the source text ‘this part of ISO/IEC 13249’ should read ‘this Australian Standard’.
(c) A full point substitutes for a comma when referring to a decimal marker.
References to International Standards should be replaced by references to Australian or
Australian/New Zealand Standards, as follows:
Reference to International Standard Australian Standard
ISO/IEC AS ISO/IEC
9075 Information technology—Database 9075 Information technology—Database
languages—SQL (all parts) languages—SQL (all parts)
13249 Information technology—Database 13249 Information technology—Database
languages—SQL multimedia and languages—SQL multimedia and
application packages application packages
13249-1 Part 1: Framework 13249.1 Part 1: Framework
ISO AS/NZS ISO
19111 Geographic information—Spatial 19111 Geographic information—Spatial
referencing by coordinates referencing by coordinates
Only referenced documents that have been adopted as Australian or Australian/New Zealand
Standards have been listed.
iii
ISO/IEC 13249-3:2003(E)

CONTENTS

Page

Contents Page

Foreword ..................................................................................................................................................... ix
Introduction ................................................................................................................................................ x
1 Scope............................................................................................................................................... 1
2 Normative references .................................................................................................................... 3
2.1 ISO/IEC JTC 1 standards............................................................................................................... 3
2.2 ISO standards................................................................................................................................. 3
2.3 IEC standards ................................................................................................................................. 3
2.4 Other international standards....................................................................................................... 3
This is a free 13 page sample. Access the full version at http://infostore.saiglobal.com.

3 Terms and definitions, notations and conventions....................................................................5


3.1 Terms and definitions.................................................................................................................... 5
3.1.1 Terms and definitions provided in ISO/IEC 13249-1:2002..........................................................5
3.1.2 Terms and definitions provided in this part of ISO/IEC 13249.................................................. 5
3.1.3 Terms and definitions taken from ISO/IEC 9075 (all parts)...................................................... 8
3.1.4 Terms and definitions taken from ISO 19107:2003.................................................................... 9
3.1.5 Terms and definitions taken from ISO 19111:2003.................................................................... 9
3.2 Notations....................................................................................................................................... 10
3.2.1 Notations provided in ISO/IEC 13249-1:2002............................................................................. 10
3.2.2 Notations provided in this part of ISO/IEC 13249...................................................................... 10
3.3 Conventions ................................................................................................................................. 10
4 Concepts....................................................................................................................................... 11
4.1 Geometry Types ........................................................................................................................... 11
4.1.1 ST_Geometry................................................................................................................................ 11
4.1.2 Spatial Relationships using ST_Geometry................................................................................ 13
4.1.3 ST_Point........................................................................................................................................ 17
4.1.4 ST_Curve ...................................................................................................................................... 17
4.1.5 ST_LineString............................................................................................................................... 18
4.1.6 ST_CircularString......................................................................................................................... 18
4.1.7 ST_CompoundCurve ................................................................................................................... 19
4.1.8 ST_Surface ................................................................................................................................... 20
4.1.9 ST_CurvePolygon ........................................................................................................................ 20
4.1.10 ST_Polygon .................................................................................................................................. 20
4.1.11 ST_GeomCollection ..................................................................................................................... 21
4.1.12 ST_MultiPoint ............................................................................................................................... 22
4.1.13 ST_MultiCurve .............................................................................................................................. 22
4.1.14 ST_MultiLineString ...................................................................................................................... 22
4.1.15 ST_MultiSurface ........................................................................................................................... 23
4.1.16 ST_MultiPolygon .......................................................................................................................... 23
4.2 Spatial Reference System Type.................................................................................................. 25
4.2.1 ST_SpatialRefSys......................................................................................................................... 25
4.3 Angle and Direction Types.......................................................................................................... 26
4.3.1 ST_Angle....................................................................................................................................... 26
4.3.2 ST_Direction ................................................................................................................................. 27
4.4 Support Routines ......................................................................................................................... 29
4.4.1 ST_Geometry ARRAY Support Routines................................................................................... 29
4.5 Tables with columns using geometry types ............................................................................. 30
4.6 The Spatial Information Schema ................................................................................................ 31
5 Geometry Types ........................................................................................................................... 33
5.1 ST_Geometry Type and Routines .............................................................................................. 33
5.1.1 ST_Geometry Type ...................................................................................................................... 33
5.1.2 ST_Dimension Method ................................................................................................................ 42

© ISO/IEC 2003 - All rights reserved Contents iii

www.standards.com.au Copyright ISO www.isostandards.com.au


iv

ISO/IEC 13249-3:2003(E)
Page

5.1.3 ST_CoordDim Method.................................................................................................................. 43


5.1.4 ST_GeometryType Method.......................................................................................................... 44
5.1.5 ST_SRID Methods ........................................................................................................................ 46
5.1.6 ST_Transform Method ................................................................................................................. 47
5.1.7 ST_IsEmpty Method ..................................................................................................................... 48
5.1.8 ST_IsSimple Method .................................................................................................................... 49
5.1.9 ST_IsValid Method ....................................................................................................................... 50
5.1.10 ST_Boundary Method .................................................................................................................. 51
5.1.11 ST_Envelope Method ................................................................................................................... 52
5.1.12 ST_ConvexHull Method ............................................................................................................... 53
5.1.13 ST_Buffer Methods ...................................................................................................................... 54
5.1.14 ST_Intersection Method .............................................................................................................. 56
5.1.15 ST_Union Method......................................................................................................................... 57
5.1.16 ST_Difference Method ................................................................................................................. 58
5.1.17 ST_SymDifference Method.......................................................................................................... 59
This is a free 13 page sample. Access the full version at http://infostore.saiglobal.com.

5.1.18 Return Types from ST_Intersection, ST_Union, ST_Difference, and ST_SymDifference .... 60
5.1.19 ST_Distance Methods .................................................................................................................. 63
5.1.20 ST_Equals Method ....................................................................................................................... 65
5.1.21 ST_Relate Method ........................................................................................................................ 66
5.1.22 ST_Disjoint Method...................................................................................................................... 69
5.1.23 ST_Intersects Method .................................................................................................................. 70
5.1.24 ST_Touches Method .................................................................................................................... 71
5.1.25 ST_Crosses Method..................................................................................................................... 72
5.1.26 ST_Within Method ........................................................................................................................ 73
5.1.27 ST_Contains Method.................................................................................................................... 74
5.1.28 ST_Overlaps Method.................................................................................................................... 75
5.1.29 Empty Cast.................................................................................................................................... 76
5.1.30 ST_WKTToSQL Method ............................................................................................................... 83
5.1.31 ST_AsText Method ....................................................................................................................... 84
5.1.32 ST_WKBToSQL Method............................................................................................................... 85
5.1.33 ST_AsBinary Method ................................................................................................................... 86
5.1.34 ST_GMLToSQL Method ............................................................................................................... 87
5.1.35 ST_AsGML Method ...................................................................................................................... 89
5.1.36 ST_GeomFromText Functions.................................................................................................... 90
5.1.37 ST_GeomFromWKB Functions................................................................................................... 92
5.1.38 ST_GeomFromGML Functions ................................................................................................... 93
5.1.39 ST_Geometry Ordering Definition .............................................................................................. 95
5.1.40 SQL Transform Functions........................................................................................................... 96
5.1.41 <well-known text representation> .............................................................................................. 97
5.1.42 <well-known binary representation>........................................................................................ 105
6 Point Types ................................................................................................................................. 113
6.1 ST_Point Type and Routines .................................................................................................... 113
6.1.1 ST_Point Type ............................................................................................................................ 113
6.1.2 ST_Point Methods ...................................................................................................................... 116
6.1.3 ST_X Methods............................................................................................................................. 119
6.1.4 ST_Y Methods............................................................................................................................. 120
6.1.5 ST_ExplicitPoint Method ........................................................................................................... 121
6.1.6 ST_PointFromText Functions ................................................................................................... 122
6.1.7 ST_PointFromWKB Functions.................................................................................................. 123
6.1.8 ST_PointFromGML Functions .................................................................................................. 124
7 Curve Types................................................................................................................................ 125
7.1 ST_Curve Type and Routines ................................................................................................... 125
7.1.1 ST_Curve Type ........................................................................................................................... 125
7.1.2 ST_Length Methods ................................................................................................................... 127
7.1.3 ST_StartPoint Method................................................................................................................ 129
7.1.4 ST_EndPoint Method ................................................................................................................. 130
7.1.5 ST_IsClosed Method .................................................................................................................. 131
7.1.6 ST_IsRing Method ...................................................................................................................... 132
7.1.7 ST_CurveToLine Method........................................................................................................... 133

iv Contents © ISO/IEC 2003 - All rights reserved

www.standards.com.au Copyright ISO www.isostandards.com.au


v

ISO/IEC 13249-3:2003(E)
Page

7.2 ST_LineString Type and Routines ........................................................................................... 134


7.2.1 ST_LineString Type ................................................................................................................... 134
7.2.2 ST_LineString Methods ............................................................................................................. 137
7.2.3 ST_Points Methods.................................................................................................................... 140
7.2.4 ST_NumPoints Method.............................................................................................................. 142
7.2.5 ST_PointN Method ..................................................................................................................... 143
7.2.6 ST_StartPoint Method................................................................................................................ 144
7.2.7 ST_EndPoint Method ................................................................................................................. 145
7.2.8 ST_LineFromText Functions .................................................................................................... 146
7.2.9 ST_LineFromWKB Functions ................................................................................................... 147
7.2.10 ST_LineFromGML Functions.................................................................................................... 148
7.3 ST_CircularString Type and Routines ..................................................................................... 149
7.3.1 ST_CircularString Type ............................................................................................................. 149
7.3.2 ST_CircularString Methods....................................................................................................... 153
7.3.3 ST_Points Methods.................................................................................................................... 156
This is a free 13 page sample. Access the full version at http://infostore.saiglobal.com.

7.3.4 ST_NumPoints Method.............................................................................................................. 158


7.3.5 ST_PointN Method ..................................................................................................................... 159
7.3.6 ST_MidPointRep Method........................................................................................................... 160
7.3.7 ST_StartPoint Method................................................................................................................ 161
7.3.8 ST_EndPoint Method ................................................................................................................. 162
7.3.9 ST_CircularFromTxt Functions ................................................................................................ 163
7.3.10 ST_CircularFromWKB Functions ............................................................................................. 164
7.4 ST_CompoundCurve Type and Routines ................................................................................ 165
7.4.1 ST_CompoundCurve Type ........................................................................................................ 165
7.4.2 ST_CompoundCurve Methods ................................................................................................. 169
7.4.3 ST_Curves Methods................................................................................................................... 172
7.4.4 ST_NumCurves Method............................................................................................................. 174
7.4.5 ST_CurveN Method .................................................................................................................... 175
7.4.6 ST_StartPoint Method................................................................................................................ 176
7.4.7 ST_EndPoint Method ................................................................................................................. 177
7.4.8 ST_CompoundFromTxt Functions........................................................................................... 178
7.4.9 ST_CompoundFromWKB Functions........................................................................................ 179
8 Surface Types............................................................................................................................. 181
8.1 ST_Surface Type and Routines ................................................................................................ 181
8.1.1 ST_Surface Type ........................................................................................................................ 181
8.1.2 ST_Area Methods....................................................................................................................... 183
8.1.3 ST_Perimeter Methods .............................................................................................................. 185
8.1.4 ST_Centroid Method .................................................................................................................. 187
8.1.5 ST_PointOnSurface Method ..................................................................................................... 188
8.2 ST_CurvePolygon Type and Routines..................................................................................... 189
8.2.1 ST_CurvePolygon Type............................................................................................................. 189
8.2.2 ST_CurvePolygon Methods ...................................................................................................... 193
8.2.3 ST_ExteriorRing Methods ......................................................................................................... 197
8.2.4 ST_InteriorRings Methods ........................................................................................................ 199
8.2.5 ST_NumInteriorRing Method .................................................................................................... 202
8.2.6 ST_InteriorRingN Method.......................................................................................................... 203
8.2.7 ST_CurvePolyToPoly Method................................................................................................... 204
8.2.8 ST_CPolyFromText Functions.................................................................................................. 205
8.2.9 ST_CPolyFromWKB Functions ................................................................................................ 206
8.3 ST_Polygon Type and Routines ............................................................................................... 207
8.3.1 ST_Polygon Type ....................................................................................................................... 207
8.3.2 ST_Polygon Methods................................................................................................................. 210
8.3.3 ST_ExteriorRing Methods ......................................................................................................... 214
8.3.4 ST_InteriorRings Methods ........................................................................................................ 215
8.3.5 ST_InteriorRingN Method.......................................................................................................... 217
8.3.6 ST_PolyFromText Functions .................................................................................................... 218
8.3.7 ST_PolyFromWKB Functions ................................................................................................... 219
8.3.8 ST_PolyFromGML Functions.................................................................................................... 220
8.3.9 ST_BdPolyFromText Functions ............................................................................................... 221
8.3.10 ST_BdPolyFromWKB Functions .............................................................................................. 223

© ISO/IEC 2003 - All rights reserved Contents v

www.standards.com.au Copyright ISO www.isostandards.com.au


vi

ISO/IEC 13249-3:2003(E)
Page

9 Geometry Collection Types....................................................................................................... 225


9.1 ST_GeomCollection Type and Routines.................................................................................. 225
9.1.1 ST_GeomCollection Type.......................................................................................................... 225
9.1.2 ST_GeomCollection Methods ................................................................................................... 229
9.1.3 ST_Geometries Methods ........................................................................................................... 232
9.1.4 ST_NumGeometries Method ..................................................................................................... 234
9.1.5 ST_GeometryN Method ............................................................................................................. 235
9.1.6 ST_GeomCollFromTxt Functions .............................................................................................236
9.1.7 ST_GeomCollFromWKB Functions.......................................................................................... 237
9.1.8 ST_GeomCollFromGML Functions .......................................................................................... 238
9.2 ST_MultiPoint Type and Routines ............................................................................................239
9.2.1 ST_MultiPoint Type .................................................................................................................... 239
9.2.2 ST_MultiPoint Methods ............................................................................................................. 242
9.2.3 ST_Geometries Methods ........................................................................................................... 245
9.2.4 ST_MPointFromText Functions ................................................................................................ 247
This is a free 13 page sample. Access the full version at http://infostore.saiglobal.com.

9.2.5 ST_MPointFromWKB Functions...............................................................................................248


9.2.6 ST_MPointFromGML Functions ...............................................................................................249
9.3 ST_MultiCurve Type and Routines........................................................................................... 250
9.3.1 ST_MultiCurve Type................................................................................................................... 250
9.3.2 ST_MultiCurve Methods ............................................................................................................ 253
9.3.3 ST_IsClosed Method .................................................................................................................. 256
9.3.4 ST_Length Methods ................................................................................................................... 257
9.3.5 ST_Geometries Methods ........................................................................................................... 259
9.3.6 ST_MCurveFromText Functions............................................................................................... 261
9.3.7 ST_MCurveFromWKB Functions.............................................................................................. 262
9.4 ST_MultiLineString Type and Routines ................................................................................... 263
9.4.1 ST_MultiLineString Type ........................................................................................................... 263
9.4.2 ST_MultiLineString Methods..................................................................................................... 266
9.4.3 ST_Geometries Methods ........................................................................................................... 269
9.4.4 ST_MLineFromText Functions.................................................................................................. 271
9.4.5 ST_MLineFromWKB Functions ................................................................................................272
9.4.6 ST_MLineFromGML Functions ................................................................................................. 273
9.5 ST_MultiSurface Type and Routines........................................................................................ 274
9.5.1 ST_MultiSurface Type................................................................................................................ 274
9.5.2 ST_MultiSurface Methods ......................................................................................................... 277
9.5.3 ST_Area Methods ....................................................................................................................... 280
9.5.4 ST_Perimeter Methods .............................................................................................................. 282
9.5.5 ST_Centroid Method .................................................................................................................. 284
9.5.6 ST_PointOnSurface Method...................................................................................................... 285
9.5.7 ST_Geometries Methods ........................................................................................................... 286
9.5.8 ST_MSurfaceFromTxt Functions.............................................................................................. 288
9.5.9 ST_MSurfaceFromWKB Functions........................................................................................... 289
9.6 ST_MultiPolygon Type and Routines....................................................................................... 290
9.6.1 ST_MultiPolygon Type............................................................................................................... 290
9.6.2 ST_MultiPolygon Methods ........................................................................................................ 293
9.6.3 ST_Geometries Methods ........................................................................................................... 296
9.6.4 ST_MPolyFromText Functions ................................................................................................. 298
9.6.5 ST_MPolyFromWKB Functions ................................................................................................299
9.6.6 ST_MPolyFromGML Functions................................................................................................. 300
9.6.7 ST_BdMPolyFromText Functions.............................................................................................301
9.6.8 ST_BdMPolyFromWKB Functions ........................................................................................... 303
10 Spatial Reference System Type................................................................................................ 305
10.1 ST_SpatialRefSys Type and Routines ..................................................................................... 305
10.1.1 ST_SpatialRefSys Type ............................................................................................................. 305
10.1.2 ST_SpatialRefSys Methods....................................................................................................... 307
10.1.3 ST_AsWKTSRS Method............................................................................................................. 308
10.1.4 ST_WKTSRSToSQL Method ..................................................................................................... 309
10.1.5 ST_SRID Method ........................................................................................................................ 310
10.1.6 ST_Equals Method ..................................................................................................................... 311
10.1.7 ST_OrderingEquals Function ................................................................................................... 312

vi Contents © ISO/IEC 2003 - All rights reserved

www.standards.com.au Copyright ISO www.isostandards.com.au


vii

ISO/IEC 13249-3:2003(E)
Page

10.1.8 ST_WellKnownText SQL Transform Group............................................................................. 313


10.1.9 <spatial reference system>....................................................................................................... 314
11 Angle and Direction Types........................................................................................................ 319
11.1 ST_Angle Type and Routines ................................................................................................... 319
11.1.1 ST_Angle Type ........................................................................................................................... 319
11.1.2 ST_Angle Methods..................................................................................................................... 324
11.1.3 ST_Radians Methods................................................................................................................. 331
11.1.4 ST_Degrees Methods................................................................................................................. 332
11.1.5 ST_DegreeComponent Method ................................................................................................ 333
11.1.6 ST_MinuteComponent Method ................................................................................................. 334
11.1.7 ST_SecondComponent Method................................................................................................ 335
11.1.8 ST_String Methods .................................................................................................................... 336
11.1.9 ST_Gradians Methods ............................................................................................................... 338
11.1.10 ST_Add Method.......................................................................................................................... 339
11.1.11 ST_Subtract Method .................................................................................................................. 340
This is a free 13 page sample. Access the full version at http://infostore.saiglobal.com.

11.1.12 ST_Multiply Method ................................................................................................................... 341


11.1.13 ST_Divide Method ...................................................................................................................... 342
11.1.14 ST_AsText Method..................................................................................................................... 343
11.1.15 ST_Angle Ordering Definition................................................................................................... 344
11.1.16 SQL Transform Functions......................................................................................................... 345
11.2 ST_Direction Type and Routines.............................................................................................. 346
11.2.1 ST_Direction Type...................................................................................................................... 346
11.2.2 ST_Direction Methods ............................................................................................................... 351
11.2.3 ST_Radians Method................................................................................................................... 356
11.2.4 ST_AngleNAzimuth Methods.................................................................................................... 357
11.2.5 ST_AsText Method..................................................................................................................... 358
11.2.6 ST_RadianBearing Method ....................................................................................................... 359
11.2.7 ST_DegreesBearing Method ..................................................................................................... 361
11.2.8 ST_DMSBearing Method ........................................................................................................... 363
11.2.9 ST_RadianNAzimuth Method.................................................................................................... 365
11.2.10 ST_DegreesNAzimuth Method.................................................................................................. 366
11.2.11 ST_DMSNAzimuth Method ........................................................................................................ 367
11.2.12 ST_RadianSAzimuth Method .................................................................................................... 368
11.2.13 ST_DegreesSAzimuth Method.................................................................................................. 369
11.2.14 ST_DMSSAzimuth Method ........................................................................................................ 370
11.2.15 ST_AddAngle Method................................................................................................................ 371
11.2.16 ST_SubtractAngle Method ........................................................................................................ 372
11.2.17 ST_Direction Ordering Definition ............................................................................................. 373
11.2.18 SQL Transform Functions......................................................................................................... 374
12 Support Routines ....................................................................................................................... 375
12.1 ST_Geometry ARRAY Support Routines................................................................................. 375
12.1.1 ST_MaxDimension Function..................................................................................................... 375
12.1.2 ST_CheckSRID Function ........................................................................................................... 377
12.1.3 ST_CheckNulls Procedure ........................................................................................................ 378
12.1.4 ST_CheckConsecDups Procedure........................................................................................... 379
12.1.5 ST_ToPointAry Cast Function .................................................................................................. 380
12.1.6 ST_ToCurveAry Cast Function................................................................................................. 382
12.1.7 ST_ToLineStringAry Cast Function ......................................................................................... 384
12.1.8 ST_ToCircularAry Cast Function ............................................................................................. 386
12.1.9 ST_ToCompoundAry Cast Function ........................................................................................ 388
12.1.10 ST_ToSurfaceAry Cast Function.............................................................................................. 390
12.1.11 ST_ToCurvePolyAry Cast Function ......................................................................................... 392
12.1.12 ST_ToPolygonAry Cast Function............................................................................................. 394
13 SQL/MM Spatial Information Schema ...................................................................................... 397
13.1 Introduction ................................................................................................................................ 397
13.2 ST_GEOMETRY_COLUMNS view............................................................................................. 398
13.3 ST_SPATIAL_REFERENCE_SYSTEMS view........................................................................... 399
13.4 ST_UNITS_OF_MEASURE view ................................................................................................ 400
13.5 ST_SIZINGS view ....................................................................................................................... 401

© ISO/IEC 2003 - All rights reserved Contents vii

www.standards.com.au Copyright ISO www.isostandards.com.au


viii

ISO/IEC 13249-3:2003(E)
Page

13.6 Short name views....................................................................................................................... 402


14 SQL/MM Spatial Definition Schema.......................................................................................... 403
14.1 Introduction ................................................................................................................................ 403
14.2 ST_GEOMETRY_COLUMNS base table ................................................................................... 404
14.3 ST_SPATIAL_REFERENCE_SYSTEMS base table ................................................................. 405
14.4 ST_UNITS_OF_MEASURE base table ...................................................................................... 407
14.5 ST_SIZINGS base table.............................................................................................................. 408
15 Status Codes .............................................................................................................................. 409
16 Conformance .............................................................................................................................. 411
16.1 Requirements for conformance................................................................................................ 411
16.2 Features of ISO/IEC 9075 required for this part of ISO/IEC 13249 ........................................ 411
16.3 Claims of conformance ............................................................................................................. 411
Annex A .................................................................................................................................................... 417
This is a free 13 page sample. Access the full version at http://infostore.saiglobal.com.

A.1 Implementation-defined Meta-variables................................................................................... 434


Annex B .................................................................................................................................................... 435
Annex C .................................................................................................................................................... 437
Annex D .................................................................................................................................................... 439
Bibliography ............................................................................................................................................ 441
Index ......................................................................................................................................................... 443

Figures Page
Figure D.1 — Geometry Type Hierarchy Diagram................................................................................ 439

Tables Page
Table 1 — Symbols ................................................................................................................................... 10
Table 2 — DE-9IM ...................................................................................................................................... 14
Table 3 — Parameter Types ..................................................................................................................... 60
Table 4 — Return Type Sets..................................................................................................................... 61
Table 5 — Return Type Matrix for the ST_Intersection Method ........................................................... 61
Table 6 — Return Type Matrix for the ST_Union Method...................................................................... 62
Table 7 — Return Type Matrix for the ST_Difference Method .............................................................. 62
Table 8 — Return Type Matrix for the ST_SymDifference Method ...................................................... 62
Table 9 — DE-9IM Mapping ...................................................................................................................... 68
Table 10 — Cell Values ............................................................................................................................. 68
Table 11 – <well-known binary representation> <uint32> Values...................................................... 111
Table 12 — SQLSTATE class and subclass values............................................................................. 409

viii Contents © ISO/IEC 2003 - All rights reserved

www.standards.com.au Copyright ISO www.isostandards.com.au


ix
ISO/IEC 13249-3:2003(E)

INTRODUCTION

Introduction
The purpose of this International Standard is to define multimedia and application specific types and their
associated routines using the user-defined features in ISO/IEC 9075.
This document is based on the content of ISO/IEC International Standard Database Language (SQL).
The organization of this part of ISO/IEC 13249 is as follows:
1) Clause 1, "Scope", specifies the scope of this part of ISO/IEC 13249.
2) Clause 2, "Normative references", identifies additional standards that, through reference in this part of
ISO/IEC 13249, constitute provisions of this part of ISO/IEC 13249.
3) Clause 3, "Definitions, notations, and conventions", defines the notations and conventions used in
this part of ISO/IEC 13249.
This is a free 13 page sample. Access the full version at http://infostore.saiglobal.com.

4) Clause 4, "Concepts", presents concepts used in the definition of this part of ISO/IEC 13249.
5) Clause 5, "Geometry Types", defines the geometry supertype.
6) Clause 6, "Point Types", defines primitive 0-dimensional geometry types.
7) Clause 7, "Curve Types", defines primitive 1-dimensional geometry types.
8) Clause 8, "Surface Types", defines primitive 2-dimensional geometry types.
9) Clause 9, "Geometry Collection Types", defines the geometry collection types.
10) Clause 10, "Spatial Reference System Types", defines the user-defined type to manage spatial
reference systems.
11) Clause 11, "Angle and Direction Types", defines the angles and direction types.
12) Clause 12, "Support Routines", defines supporting functions and procedures used by this part of
ISO/IEC 13249.
13) Clause 13, "SQL/MM Spatial Information Schema" defines the SQL/MM Spatial Information Schema.
14) Clause 14, "SQL/MM Spatial Definition Schema" defines the SQL/MM Spatial Definition Schema.
15) Clause 15, "Status Codes", defines the SQLSTATE codes used in this part of ISO/IEC 13249.
16) Clause 16, "Conformance", defines the criteria for conformance to this part of ISO/IEC 13249.
17) Annex A, "Implementation-defined elements", is an informative Annex. It lists those features for which
the body of this part of ISO/IEC 13249 states that the syntax or meaning or effect on the database is
partly or wholly implementation-defined, and describes the defining information that an implementer
shall provide in each case.
18) Annex B, "Implementation-dependent elements", is an informative Annex. It lists those features for
which the body of this part of ISO/IEC 13249 states explicitly that the meaning or effect on the
database is implementation-dependent.
19) Annex C, “Incompatibilities with ISO/IEC 13249-3:1999”, is an informative Annex. It lists
incompatibilities with the previous version of this part of ISO/IEC 13249-3.
20) Annex D, "Geometry Type Hierarchy", is an informative Annex. It visually describes the inheritance
relationship between user-defined types in this part of ISO/IEC 13249.
21) Bibliography is the last informative Annex. It is a list of selective reading relating to this part of
ISO/IEC 13249.
In the text of this part of ISO/IEC 13249, Clauses begin a new odd-numbered page, and in Clause 5,
"Geometry Types", through Clause 11, "Angle and Direction Types", subclauses begin a new page. Any
resulting blank space is not significant.

x Introduction © ISO/IEC 2003 - All rights reserved

www.standards.com.au Copyright ISO www.isostandards.com.au


This is a free 13 page sample. Access the full version at http://infostore.saiglobal.com.

NOTES
1

AUSTRALIAN STANDARD

Information technology—Database languages—SQL multimedia


and application packages

Part 3:
Information technology — Database languages —
SQL multimedia
Spatial and application packages —
Part 3: Spatial

1 Scope
This part of ISO/IEC 13249:
a) introduces the Spatial part of ISO/IEC 13249,
b) gives the references necessary for this part of ISO/IEC 13249,
This is a free 13 page sample. Access the full version at http://infostore.saiglobal.com.

c) defines notations and conventions specific to this part of ISO/IEC 13249,


d) defines concepts specific to this part of ISO/IEC 13249,
e) defines spatial user-defined types and their associated routines.
The spatial user-defined types defined in this part adhere to the following:
— A spatial user-defined type is generic to spatial data handling. It addresses the need to store, manage
and retrieve information based on aspects of spatial data such as geometry, location, and topology.
— A spatial user-defined type does not redefine the database language SQL directly or in combination
with another spatial data type.
Implementations of this part of ISO/IEC 13249 may exist in environments that also support geographic
information, decision support, data mining, and data warehousing systems.
Application areas addressed by implementations of this part of ISO/IEC 13249 include, but are not
restricted to, automated mapping, desktop mapping, facilities management, geoengineering, graphics,
multimedia, and resource management applications.

© ISO/IEC 2003 - All rights reserved Scope 1

www.standards.com.au Copyright ISO www.isostandards.com.au


www.standards.com.au © Standards Australia
This is a free preview. Purchase the entire publication at the link below:

AS ISO/IEC 13249.3-2005, Information technology -


Database languages - SQL multimedia and
application packages Spatial
This is a free 13 page sample. Access the full version at http://infostore.saiglobal.com.

Looking for additional Standards? Visit SAI Global Infostore


Subscribe to our Free Newsletters about Australian Standards® in Legislation; ISO, IEC, BSI and more
Do you need to Manage Standards Collections Online?
Learn about LexConnect, All Jurisdictions, Standards referenced in Australian legislation
Do you want to know when a Standard has changed?
Want to become an SAI Global Standards Sales Affiliate?

Learn about other SAI Global Services:

LOGICOM Military Parts and Supplier Database


Metals Infobase Database of Metal Grades, Standards and Manufacturers
Materials Infobase Database of Materials, Standards and Suppliers
Database of European Law, CELEX and Court Decisions

Need to speak with a Customer Service Representative - Contact Us

You might also like