【实例简介】地理信息的 OpenGIS 实施规范 - 简单要素访问 - 第 2 部分 SQL 选项
OpenGIS Implementation Specification for Geographic information - Simple feature access - Part2 SQL option
【实例截图】





【核心代码】
Contents
Page
Foreword ...........................................................................................................................................................vii
Introduction......................................................................................................................................................viii
1
Scope ......................................................................................................................................................2
2
Conformance..........................................................................................................................................3
3
Normative references............................................................................................................................3
4
Terms and definitions ...........................................................................................................................3
5
Symbols and abbreviated terms ..........................................................................................................4
5.1
Abbreviations.........................................................................................................................................4
5.2
Symbols..................................................................................................................................................4
6
Architecture............................................................................................................................................5
6.1
Architecture — SQL implementation using predefined data types..................................................5
6.1.1 Overview.................................................................................................................................................5
6.1.2 Identification of feature tables and geometry columns.....................................................................6
6.1.3 Identification of Spatial Reference Systems.......................................................................................7
6.1.4 Feature tables ........................................................................................................................................7
6.1.5 Geometry tables.....................................................................................................................................7
6.1.6 Text .........................................................................................................................................................9
6.1.7 Use of numeric data types..................................................................................................................13
6.1.8 Notes on SQL/CLI access to Geometry values stored in binary form ...........................................13
6.2
Architecture — SQL implementation using Geometry Types.........................................................13
6.2.1 Overview...............................................................................................................................................13
6.2.2 Identification of feature tables and geometry columns...................................................................14
6.2.3 Identification of Spatial Reference Systems.....................................................................................15
6.2.4 Feature tables ......................................................................................................................................15
6.2.5 Background information on SQL User Defined Types ....................................................................15
6.2.6 SQL Geometry Type hierarchy...........................................................................................................16
6.2.7 Geometry values and spatial reference systems .............................................................................17
6.2.8 Access to Geometry values in the SQL with Geometry Type case................................................17
6.2.9 Text .......................................................................................................................................................17
7
Clause component specifications .....................................................................................................19
7.1
Components — Implementation of feature tables based on predefined data types....................19
7.1.1 Conventions.........................................................................................................................................19
7.1.2 Spatial reference system information ...............................................................................................19
7.1.3 Geometry columns information .........................................................................................................20
7.1.4 Feature tables ......................................................................................................................................24
7.1.5 Geometry tables...................................................................................................................................25
7.1.6 Operators..............................................................................................................................................29
7.2
Components — SQL with Geometry Types implementation of feature tables .............................29
7.2.1 Conventions.........................................................................................................................................29
7.2.2 SQL Geometry Types ..........................................................................................................................29
7.2.3 Feature tables ......................................................................................................................................29
7.2.4 SQL routines for constructing a geometry object given its Well-known Text Representation...30OGC 06-104r4
Copyright © 2007 Open Geospatial Consortium, Inc. All Rights Reserved.
iv
Copyright © 2007 Open Geospatial Consortium, Inc. All Rights Reserved.
7.2.5 SQL routines for constructing a geometric object given its Well-known Binary
Representation.................................................................................................................................... 30
7.2.6 SQL routines for obtaining Well-known Text Representation of a geometric object.................. 31
7.2.7 SQL routines for obtaining Well-known Binary Representations of a geometric object ............ 31
7.2.8 SQL routines on type Geometry........................................................................................................ 31
7.2.9 SQL routines on type Point ............................................................................................................... 37
7.2.10 SQL routines on type Curve .............................................................................................................. 40
7.2.11 SQL routines on type LineString....................................................................................................... 41
7.2.12 SQL functions on type Surface ......................................................................................................... 42
7.2.13 SQL functions on type Polygon ........................................................................................................ 43
7.2.14 SQL functions on type Polyhedral Surface...................................................................................... 45
7.2.15 SQL routines on type GeomCollection............................................................................................. 47
7.2.16 SQL routines on type MultiPoint ....................................................................................................... 48
7.2.17 SQL routines on type MultiCurve...................................................................................................... 48
7.2.18 SQL routines on type MultiLineString .............................................................................................. 49
7.2.19 SQL routines on type MultiSurface................................................................................................... 50
7.2.20 SQL routines on type Text................................................................................................................. 51
Annex A (normative) Abstract Test Suite...................................................................................................... 56
A.1
Purpose of this annex ........................................................................................................................ 56
A.2
Conformance Tests ............................................................................................................................ 56
A.2.1 Feature tables...................................................................................................................................... 56
A.2.2 Geometry tables or type..................................................................................................................... 57
A.2.3 Spatial reference systems ................................................................................................................. 57
A.2.4 Geometric format supported ............................................................................................................. 58
A.2.5 Geometric categories supported ...................................................................................................... 59
A.2.6 Text....................................................................................................................................................... 59
A.3
Composite Conformance Clauses .................................................................................................... 60
A.4
Conformance Classes ........................................................................................................................ 60
A.4.1 Types of conformance classes ......................................................................................................... 60
Annex B (informative) Comparison of Simple feature access/SQL and SQL/MM – Spatial.................... 62
Annex C (informative) Conformance tests from version 1.1...................................................................... 64
C.1
Purpose of this annex ........................................................................................................................ 64
C.2
Test data .............................................................................................................................................. 64
C.2.1 Test data semantics............................................................................................................................ 64
C.2.2 Test data points and coordinates ..................................................................................................... 66
C.3
Conformance tests ............................................................................................................................. 69
C.3.1 Normalized geometry schema........................................................................................................... 69
C.3.2 Binary geometry schema ................................................................................................................... 79
C.3.3 Geometry types and functions .......................................................................................................... 89Copyright © 2007 Open Geospatial Consortium, Inc. All Rights Reserved.
OGC 06-104r4
Copyright © 2007 Open Geospatial Consortium, Inc. All Rights Reserved.
v
Figures
Figure 1: Schema for feature tables using predefined data types..............................................................................6
Figure 2: Example of geometry table for Polygon Geometry using SQL ...................................................................8
Figure 3: Schema for feature tables using SQL with Geometry Types ....................................................................14
Figure 4: Figure: SQL Geometry Type hierarchy .....................................................................................................16
Figure C 1: Test Data Concept — Blue Lake vicinity map .......................................................................................65
Figure C 2: Points in the Blue Lake data set ............................................................................................................67OGC 06-104r4
Copyright © 2007 Open Geospatial Consortium, Inc. All Rights Reserved.
vi
Copyright © 2007 Open Geospatial Consortium, Inc. All Rights Reserved.
Tables
Table 1: Example of geometry table for Polygon Geometry.......................................................................................9
Table 2: Column definitions for Annotation Text metadata...................................................................................... 11
Table 3: Text metadata attributes ............................................................................................................................ 18
Table 4: Geometry type codes................................................................................................................................. 22
Table A 1 - Equivalences between V1.1 and V1.2 complinace classes.................................................................. 61
Table B 1 Comparison of SFA-SQL and SQL/MM: Spatial................................................................................. 62
Table C 1: Coordinates associated with each point in the Blue Lake data set........................................................ 68
Table C 2: Queries to determine that test data are accessible via the normalized geometry schema ................... 69
Table C 3: Queries to determine that test data are accessible via the binary geometry schema ........................... 79
Table C 4: Queries that accomplish the test of geometry types and functions ....................................................... 89
网友评论
我要评论