As ISO IEC 13249.3-2005 Information Technology - Database Languages - SQL Multimedia and Application Packages
As ISO IEC 13249.3-2005 Information Technology - Database Languages - SQL Multimedia and Application Packages
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.
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
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.
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.
ISO/IEC 13249-3:2003(E)
Page
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
ISO/IEC 13249-3:2003(E)
Page
ISO/IEC 13249-3:2003(E)
Page
ISO/IEC 13249-3:2003(E)
Page
ISO/IEC 13249-3:2003(E)
Page
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
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.
NOTES
1
AUSTRALIAN STANDARD
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.