OpenGIS ® Simple Features Implementation Specification for OLE/COM.

25
OpenGIS ® Simple Features Implementation Specification for OLE/COM

Transcript of OpenGIS ® Simple Features Implementation Specification for OLE/COM.

Page 1: OpenGIS ® Simple Features Implementation Specification for OLE/COM.

OpenGIS®

Simple Features Implementation

Specification for OLE/COM

Page 2: OpenGIS ® Simple Features Implementation Specification for OLE/COM.

Overview1

Architecture2

Page 3: OpenGIS ® Simple Features Implementation Specification for OLE/COM.

three OpenGIS® Simple Features Implementation Specifications:

Overview 1

Page 4: OpenGIS ® Simple Features Implementation Specification for OLE/COM.

• OLE(Object Linking and Embedding),即对象链接和嵌入,基于面向对象技术的组件软件已成为软件技术发展的趋势。

COM(Component Object Model),即组件对象模型,是微软于1993年提出的一个软件开发方法,是一个关于如何建立组件以及如何通过组件构建应用程序的规范。 COM是比 OLE高一级的软件服务的基础体系结构 , 它是使 OLE走向真正的多平台的对象系统的第一步。

Page 5: OpenGIS ® Simple Features Implementation Specification for OLE/COM.

• Simple Features Implementation Specification For

OLE/COM——基于 OLE/COM的简单要素实施规范 : 提供了对基于 OLE/COM的简单要素(点、线、面等)进行发布、存储、访问和简单操作的应用编程接口 API的规范说明。

• The purpose of these specifications is to describe interfaces to

allow GIS software engineers to develop applications that expose

functionality required to access and manipulate geospatial

information comprising features with 'simple' geometry using

different technologies.

Page 6: OpenGIS ® Simple Features Implementation Specification for OLE/COM.

Architecture2

The architecture for this specification can be classified into three major components.They are:

OLE DB for implementing data providers

ADO for presenting a simplified data access model on top of

OLE DB

Geometry and Spatial References for detailed geometry and

reference operations

Page 7: OpenGIS ® Simple Features Implementation Specification for OLE/COM.

2.1 Data Access

2.1.1 OLE DB Overview

In the OLE DB specification,Microsoft writes:

OLE DB is a set of OLE interfaces that provide applications with

uniform access to data stored in diverse information sources.These

interfaces support the amount of DBMS functionality appropriate

to the data source,enabling it to share its data.

Page 8: OpenGIS ® Simple Features Implementation Specification for OLE/COM.

• The OLE DB architecture diagram shown in Figure 2.1 has been

extracted from a Microsoft presentation on OLE DB.It and the

preceding table illustrate the interaction between three fundamental

categorizations of software:

Page 9: OpenGIS ® Simple Features Implementation Specification for OLE/COM.
Page 10: OpenGIS ® Simple Features Implementation Specification for OLE/COM.
Page 11: OpenGIS ® Simple Features Implementation Specification for OLE/COM.

2.1.2 Data Providers

The Data Provider category is the most fundamental set of

components that must be implemented in order to allow geographic

data to be shared among different applications.These applications

may be as diverse as data collection, analysis or simple viewing.

Page 12: OpenGIS ® Simple Features Implementation Specification for OLE/COM.

2.1.3 Data Consumers(ADO)

ADO is a Microsoft implementation of an OLEDB data consumer.

While it is not an OLEDB data provider,its purpose is to provide

the essence of OLEDB data to automation clients via a standard

automation server.

Page 13: OpenGIS ® Simple Features Implementation Specification for OLE/COM.

2.2 Geometry Object Model

• This section describes the object model for geometry.It is

Distributed Computing Platform neutral and uses OMT notation.

The object model for geometry is shown in Figure 2.5.

• The base Geometry class has subclasses for Point, Curve, Surface

and Geometry Collection.Each geometric object is associated

with a Spatial Reference System,which describes the coordinate

space in which the geometric object is defined.

Page 14: OpenGIS ® Simple Features Implementation Specification for OLE/COM.
Page 15: OpenGIS ® Simple Features Implementation Specification for OLE/COM.

2.2.1 Geometry

• Geometry is the root class of the hierarchy.Geometry is an

abstract class.All geometry objects must support the IGeometry

interface.

• The instantiable subclasses of Geometry defined in this

specification are restricted to 0,1 and two-dimensional geometric

objects that exist in two-dimensional coordinate space.

• All instantiable geometry classes described in this specification

are defined so that valid instances of a geometry class are

topologically closed(all defined geometries include their

boundary).

Page 16: OpenGIS ® Simple Features Implementation Specification for OLE/COM.

2.2.2 Geometry Collection

• A Geometry Collection is a geometry that is a collection of 1 or

more geometries.

• All the elements in a GeometryCollection must be in the same

Spatial Reference.This is also the Spatial Reference for the

GeometryCollection.

• GeometryCollection places no other constraints on its elements.

Subclasses of Geometry Collection may restrict membership

based on dimension and may also place other constraints on the

degree of spatial overlap between elements.

Page 17: OpenGIS ® Simple Features Implementation Specification for OLE/COM.

OGC定义的拓扑空间关系• OGC( Open Geospatial Consortium) 简单要素规范

SFS中定义的拓扑关系:

1. Equals

2. Disjoint

3. Intersects

4. Touches

5. Crosses

6. Within

7. Contains

8. Overlaps

Page 18: OpenGIS ® Simple Features Implementation Specification for OLE/COM.

操作

类别 方法名称

返回值

类型 描述

Dimension ( ) Integer 返回几何对象的维数。

GeometryType ( ) String 返回几何对象的类型。

SRID ( ) Integer 返回几何对象所属的空间参考系I D。

Envelope( ) Geometry 返回几何对象的最小外包矩形。

AsText( ) String 将几何对象以WKT格式输出。

AsBinary( ) Binary 将几何对象以WKB格式输出。

IsEmpty( ) Integer 如果几何对象为空集,则返回1(为真,下同)。 IsSimple( ) Integer 如果几何对象是简单的(不自交),则返回1。

基本

操作

Boundary( ) Geometry 返回几何对象的边界。

OGC的 SFS中定义的空间操作算子包括基本操作、空间关系运算和空间分析操作 :

空间操作算子

Page 19: OpenGIS ® Simple Features Implementation Specification for OLE/COM.

Equals(anotherGeometry) Integer 如果两个几何对象的内部和边界在空间上相等,则返回1。

Disjoint(anotherGeometry ) Integer 如果两个几何对象的内部和边界在空间上都不相交,则返回1。

Intersects(anotherGeometry ) Integer 如果两个几何对象在空间上相交,则返回1。

Touches(anotherGeometry ) Integer 如果两个几何对象边界相交但内部不相交,则返回1。

Crosses(anotherGeometry) Integer 如果一条线和面的内部相交,则返回1。

Within(anotherGeometry) Integer 如果这个几何对象空间上位于另一个几何对象内部,则返回1。

Contains(anotherGeometry) Integer

如果这个几何对象空间上包含另一个几何对象,则返回1。对于两个几何对象A、B,如果A. contai ns(B)为真 ,则 A.wi thi n(B)为真,即A. contai ns(B) = A. wi thi n(B)。

Overlaps(anotherGeometry:) Integer 如果几何对象内部有非空交集,则返回1。

空间

关系

运算

Relate(anotherGeometry, intersectionPatternMatrix)

Integer

如果这个几何对象与另一个几何对象的DE-9I M与 i ntersecti onPatternMatri x相匹配,则返回1。

Page 20: OpenGIS ® Simple Features Implementation Specification for OLE/COM.

Distance(anotherGeometry) Double 返回两个几何对象之间的最短距离。

Buffer(distance) Geometry 返回到给定几何对象的距离小于或等于指定值的几何对象的点的集合。

ConvexHull( ) Geometry 返回几何对象的最小闭包。

Intersection(anotherGeometry) Geometry 返回由两个几何对象的交集构成的几何对象。 Union(anotherGeometry) Geometry 返回由两个几何对象的并集构成的几何对象。

Difference(anotherGeometry) Geometry 返回这个几何对象与另一个几何对象不相交的部分。

空间

分析

操作

SymDifference(anotherGeometry) Geometry 返回两个几何对象与对方互不相交的部分。

Page 21: OpenGIS ® Simple Features Implementation Specification for OLE/COM.

Geometry Components—Interfaces

Page 22: OpenGIS ® Simple Features Implementation Specification for OLE/COM.

2.3 Spatial Reference System Object Model

The Spatial Reference System Object Model proposed in this

specification is shown in Figure 2.17.This object model is based upon

the OpenGIS Abstract Specification and uses the geodetic model for

spatial reference systems of the European Petroleum Survey

Group(EPSG)and the Petrotechnical Open Software Corp.(POSC).

Page 23: OpenGIS ® Simple Features Implementation Specification for OLE/COM.
Page 24: OpenGIS ® Simple Features Implementation Specification for OLE/COM.

2.4 Summary

The architecture and details contained in this specification satisfy

the functional requirements of this specification subject to the detail

notes in the narrative.The architecture has the following

characteristics:

• Provides a COM OLE implementation consistent with OLE DB

• Easily implemented by multiple vendors

• Designed with performance in mind

• Designed with reliability and data integrity in mind

• Testable implementations

• Extensible in all key areas

Page 25: OpenGIS ® Simple Features Implementation Specification for OLE/COM.