1、INCITS/ISO 19125-2-2004(ISO 19125-2:2004, IDT) Geographic information Simple feature accessPart 2: SQL option INCITS/ISO 19125-2-2004(ISO 19125-2:2004, IDT) Reaffirmed as INCITS/ISO 19125-2:2004 R2015INCITS/ISO 19125-2-2004ii PDF disclaimer This PDF file may contain embedded typefaces. In accordance
2、 with Adobes licensing policy, this file may be printed or viewed but shall not be edited unless the typefaces which are embedded are licensed to and installed on the computer performing the editing. In downloading this file, parties accept therein the responsibility of not infringing Adobes licensi
3、ng policy. The ISO Central Secretariat accepts no liability in this area. Adobe is a trademark of Adobe Systems Incorporated. Details of the software products used to create this PDF file can be found in the General Info relative to the file; the PDF-creation parameters were optimized for printing.
4、Every care has been taken to ensure that the file is suitable for use by ISO member bodies. In the unlikely event that a problem relating to it is found, please inform the Central Secretariat at the address given below. Adopted by INCITS (InterNational Committee for Information Technology Standards)
5、 as an American National Standard. Date of ANSI Approval: 11/3/2005 Published by American National Standards Institute, 25 West 43rd Street, New York, New York 10036 Copyright 2005 by Information Technology Industry Council (ITI). All rights reserved. These materials are subject to copyright claims
6、of International Standardization Organization (ISO), International Electrotechnical Commission (IEC), American National Standards Institute (ANSI), and Information Technology Industry Council (ITI). Not for resale. No part of this publication may be reproduced in any form, including an electronic re
7、trieval system, without the prior written permission of ITI. All requests pertaining to this standard should be submitted to ITI, 1250 Eye Street NW, Washington, DC 20005. Printed in the United States of America ISO 19125-2:2004(E) ISO 2004 All rights reserved iiiContents Page Foreword iv Introducti
8、on v 1 Scope 1 2 Conformance . 2 3 Normative references . 2 4 Terms and definitions. 2 5 Symbols and abbreviated terms 3 6 Architecture . 4 6.1 Architecture SQL implementation of feature tables based on predefined data types 4 6.2 Architecture SQL with Geometry Types implementation of feature tables
9、 7 7 Clause component specifications. 12 7.1 Components Implementation of feature tables based on predefined data types . 12 7.2 Components SQL with Geometry Types implementation of feature tables. 17 Annex A (informative) Comparison of Simple feature access/SQL and SQL/MM Spatial 31 Annex B (normat
10、ive) Conformance tests. 32 ISO 19125-2:2004(E) iv ISO 2004 All rights reservedForeword ISO (the International Organization for Standardization) is a worldwide federation of national standards bodies (ISO member bodies). The work of preparing International Standards is normally carried out through IS
11、O technical committees. Each member body interested in a subject for which a technical committee has been established has the right to be represented on that committee. International organizations, governmental and non-governmental, in liaison with ISO, also take part in the work. ISO collaborates c
12、losely with the International Electrotechnical Commission (IEC) on all matters of electrotechnical standardization. International Standards are drafted in accordance with the rules given in the ISO/IEC Directives, Part 2. The main task of technical committees is to prepare International Standards. D
13、raft International Standards adopted by the technical committees are circulated to the member bodies for voting. Publication as an International Standard requires approval by at least 75 % of the member bodies casting a vote. Attention is drawn to the possibility that some of the elements of this do
14、cument may be the subject of patent rights. ISO shall not be held responsible for identifying any or all such patent rights. ISO 19125-2 was prepared by Technical Committee ISO/TC 211, Geographic information/Geomatics from a base document supplied by the Open GIS Consortium, Inc. ISO 19125 consists
15、of the following parts, under the general title Geographic information Simple feature access: Part 1: Common architecture Part 2: SQL option Part 3: COM/OLE option is under preparation. ISO 19125-2:2004(E) ISO 2004 All rights reserved vIntroduction The purpose of this part of ISO 19125 is to define
16、a standard Structured Query Language (SQL) schema that supports storage, retrieval, query and update of feature collections via the SQL Call-Level Interface (SQL/CLI) (ISO/IEC 9075-3:2003). A feature has both spatial and non-spatial attributes. Spatial attributes are geometry valued, and simple feat
17、ures are based on 2D geometry with linear interpolation between vertices. This part of ISO 19125 is dependent on the common architectural components defined in ISO 19125-1. Feature collections are stored as tables with geometry valued columns in a SQL-implementation; each feature is a row in the tab
18、le. The non-spatial attributes of features are mapped onto columns whose types are drawn from the set of standard SQL data types. The spatial attributes of features are mapped onto columns whose SQL data types are based on the underlying concept of additional geometric data types for SQL. A table wh
19、ose rows represent these features is referred to as a feature table. Such a table contains one or more geometry valued columns. Feature-table schemas are described for two SQL-implementations: implementations based on predefined data types and SQL with Geometry Types. In an implementation based on p
20、redefined data types, a geometry-valued column is implemented as a Foreign Key reference into a geometry table. A geometry value is stored using one or more rows in the geometry table. The geometry table may be implemented using either standard SQL numeric types or SQL binary types; schemas for both
21、 are described. The term SQL with Geometry Types is used to refer to a SQL-implementation that has been extended with a set of Geometry Types. In this environment, a geometry-valued column is implemented as a column whose SQL type is drawn from this set of Geometry Types. The mechanism for extending
22、 the type system of an SQL-implementation is through the definition of user defined User Defined Types. Commercial SQL-implementations with user defined type support have been available since mid-1997. AMERICAN NATIONAL STANDARD INCITS/ISO 19125-2-2004 ISO 2004 All rights reserved 1Geographic inform
23、ation Simple feature access Part 2: SQL option 1 Scope This part of ISO 19125 specifies an SQL schema that supports storage, retrieval, query and update of simple geospatial feature collections via the SQL Call Level Interface (SQL/CLI) (ISO/IEC 9075-3:2003). This part of ISO 19125 establishes an ar
24、chitecture for the implementation of feature tables. This part of ISO 19125 defines terms to use within the architecture. This part of ISO 19125 defines a simple feature profile of ISO 19107. This part of ISO 19125 describes a set of SQL Geometry Types together with SQL functions on those types. The
25、 Geometry Types and Functions described in this part of ISO 19125 represent a profile of ISO 13249-3. This part of ISO 19125 does not attempt to standardize and does not depend upon any part of the mechanism by which Types are added and maintained in the SQL environment including the following: a) t
26、he syntax and functionality provided for defining types; b) the syntax and functionality provided for defining SQL functions; c) the physical storage of type instances in the database; d) specific terminology used to refer to User Defined Types, for example, UDT. This part of ISO 19125 does standard
27、ize: names and geometric definitions of the SQL Types for Geometry; names, signatures and geometric definitions of the SQL Functions for Geometry. This part of ISO 19125 describes a feature access implementation in SQL based on a profile of ISO 19107. ISO 19107 does not place any requirements on how
28、 to define the Geometry Types in the internal schema. ISO 19107 does not place any requirements on when or how or who defines the Geometry Types. In particular, a compliant system may be shipped to the database user with the set of Geometry Types and Functions already built into the SQL-implementati
29、on, or with the set of Geometry Types and Functions supplied to the database user as a dynamically loaded extension to the SQL-implementation or in any other manner not mentioned in this part of ISO 19125. ISO 19125-2:2004(E) 2 ISO 2004 All rights reserved2 Conformance In order to conform to this pa
30、rt of ISO 19125, an implementation shall satisfy the requirements of one of the following three conformance classes, as well as the appropriate components of ISO 19125-1: a) SQL implementation of feature tables based on predefined data types: 1) using numeric SQL types for geometry storage and SQL/C
31、LI access, 2) using binary SQL types for geometry storage and SQL/CLI access; b) SQL with Geometry Types implementation of feature tables supporting both textual and binary SQL/CLI access to geometry. Annex B provides conformance tests for each implementation of this part of ISO 19125. 3 Normative r
32、eferences The following referenced documents are indispensable for the application of this document. For dated references, only the edition cited applies. For undated references, the latest edition of the referenced document (including any amendments) applies. ISO/IEC 9075-1:2003, Information techno
33、logy Database languages SQL Part 1: Framework (SQL/Framework) ISO/IEC 9075-2:2003, Information technology Database languages SQL Part 2: Foundation (SQL/Foundation) ISO/IEC 9075-3:2003, Information technology Database languages SQL Part 3: Call-Level Interface (SQL/CLI) ISO/IEC 9075-4:2003, Informat
34、ion technology Database languages SQL Part 4: Persistent Stored Modules (SQL/PSM) ISO/IEC 9075-5:1999, Information technology Database languages SQL Part 5: Host Language Bindings (SQL/Bindings) ISO/IEC 13249-3:2003, Information technology Database languages SQL multimedia and application packages P
35、art 3: Spatial ISO 19107:2003, Geographic information Spatial schema ISO 19109:1), Geographic information Rules for application schema ISO 19119:2004, Geographic information Services ISO 19125-1:2004, Geographic information Simple feature access Part 1: Common architecture 4 Terms and definitions Fo
36、r the purposes of this part of ISO 19125, the following terms and definitions apply. 4.1 feature table table where the columns represent feature attributes, and the rows represent features 1) To be published. ISO 19125-2:2004(E) ISO 2004 All rights reserved 34.2 geographic feature representation of
37、real world phenomenon associated with a location relative to the Earth 5 Symbols and abbreviated terms FID Feature ID column in the implementation of feature tables based on predefined data types GID Geometry ID column in the implementation of feature tables based on predefined data types MM Multime
38、dia SQL Structured Query Language SRID Spatial Reference System Identifier SRTEXT Spatial Reference System Well Known Text WKB Well-Known Binary (representation for example, geometry) WKTR Well-Known Text Representation 2D 2-Dimensional 11-Dimensional space 22-Dimensional space empty set intersectio
39、n union difference is a member of is not a member of is a proper subset of is a subset of if and only if implies for all X | set of X such that and or not = equal not equal greater than ISO 19125-2:2004(E) 4 ISO 2004 All rights reserved6 Architecture 6.1 Architecture SQL implementation of feature ta
40、bles based on predefined data types 6.1.1 Overview This part of ISO 19125 defines a schema for the management of feature table, Geometry, and Spatial Reference System information in an SQL-implementation based on predefined data types. This part of ISO 19125 does not define SQL functions for access,
41、 maintenance, or indexing of Geometry in an SQL-implementation based on predefined data types. Figure 1 illustrates the schema to support feature tables, Geometry, and Spatial Reference Information in an SQL-implementation based on predefined data types. a) The GEOMETRY_COLUMNS table describes the a
42、vailable feature tables and their Geometry properties. b) The SPATIAL_REF_SYS table describes the coordinate system and transformations for Geometry. c) The feature table stores a collection of features. A feature tables columns represent feature attributes, while rows represent individual features.
43、 The Geometry of a feature is one of its feature attributes; while logically a geometric data type, a Geometry Column is implemented as a foreign key to a geometry table. d) The geometry table stores geometric objects, and may be implemented using either standard SQL numeric types or SQL binary type
44、s. Figure 1 Schema for feature tables using predefined data types Depending upon the storage type specified by the GEOMETRY_COLUMNS table, a geometric object is stored either as an array of coordinate values or as a single binary value. In the former case, predefined SQL numeric types are used for t
45、he coordinates and these numeric values are obtained from the geometry table until the geometric object has been fully reconstructed. In the latter case, the complete geometric object is obtained in the Well-known Binary Representation as a single value. ISO 19125-2:2004(E) ISO 2004 All rights reser
46、ved 56.1.2 Identification of feature tables and geometry columns Feature tables and Geometry columns are identified through the GEOMETRY_COLUMNS table. Each Geometry Column in the database has an entry in the GEOMETRY_COLUMNS table. The data stored for each geometry column consists of the following:
47、 a) the identity of the feature table of which this Geometry Column is a member; b) the name of the Geometry Column; c) the spatial reference system ID (SRID) for the Geometry Column; d) the type of Geometry for the Geometry column; e) the coordinate dimension for the Geometry Column; f) the identit
48、y of the geometry table that stores geometric objects for this Geometry Column; g) the information necessary to navigate the geometry table in the case of normalized geometry storage. 6.1.3 Identification of Spatial Reference Systems Every Geometry Column is associated with a Spatial Reference Syste
49、m. The Spatial Reference System identifies the coordinate system for all geometric objects stored in the column, and gives meaning to the numeric coordinate values for any geometric object stored in the column. Examples of commonly used Spatial Reference Systems include “Latitude Longitude” and “UTM Zone 10”. The SPATIAL_REF_SYS table stores information on each Spatial Reference System in the database. The columns o