Daniel Wirz, Department of Geography - GIS Division, University of Zurich mailto:wirz@geo.unizh.ch January 2004
What,...? Introduction Develop publicly available geoprocessing specifications. Open interfaces and protocols defined by OpenGIS Specifications support interoperable solutions that geo-enable the Web, wireless and location-based services, and mainstream IT, and empower technology developers to make complex spatial information and services accessible and useful with all kinds of applications. dw 2004 1
Geometry Object Model Introduction Conceptual model DCP-neutral, not SQL specific defines geometries and operations/methods on them Geometry is an abstract class Instantiable subclasses in essence: Points A point in 2-dimensional space Lines are linear edges between two points Linestrings are connected lines (end-point is start-point of next line) Linear Rings are closed Linestrings (last end-point is first start-point ) Polygons Surface within a Linear Ring, potentially excluding inner Linear Rings Uniform Collections of concrete Types dw 2004 2
Introduction dw 2004 3
Introduction Limitations of the Simple Features Geometry Object Model No explicit declaration of topological relations Only 2-dimensional geometries Only linear geometries No Rasterdata dw 2004 4
..., why,... Introduction Interoperability Share representation of geometric properties of spatial features GI for the Mainstream Extend the market dw 2004 5
..., who,... Introduction OpenGIS Consortium Members ESRI Mapinfo Cadcorp IBM Informix Oracle... dw 2004 6
..., and how? Introduction Features to be stored in tables with geometry-valued columns: Main characteristics Each feature constitutes one row in a feature table The feature table contains one or more geometry-valued columns Non-spatial attributes mapped to SQL92 datatypes Spatial attributes mapped onto columns of additional geometric datatypes To be accessed by ODBC dw 2004 7
Two (three) possible implementations for SQL: Implementation Specification for ANSI SQL92 SQL92 using numeric SQL types for geometry storage SQL92 using binary SQL types for geometry storage (WKB GEOMETRY) SQL92 with geometry types Required Tables and Views (SQL92): Feature tables Feature table metadata views GEOMETRY SPATIAL REFERENCE SYSTEMS,... Geometry tables COLUMNS, dw 2004 8
Fig 2.13/ p2-20 Feature tables: Implementation Specification for ANSI SQL92 SQL92 Feature tables 1/3 CREATE TABLE <feature-name> ( <FID name> <FID type>, <feature attributes> <other FID type> REFERENCES <other feature view>,... <geometry attribute 1> <GID type>,... PRIMARY KEY <FID name>,... FOREIGN KEY <geometric attribute 1> REFERENCES <geometry-table-name-1>, FOREIGN KEY <FID relation name> REFERENCES <FEATURE table> <other FID name>,... ) dw 2004 9
Feature table metadata views: Implementation Specification for ANSI SQL92 GEOMETRY COLUMNS ID of feature table SRS ID type of storage (0 = normalized; 1 = WKB) type of geometry (0 = GEOMETRY; 1 = POINT;... 11 = MULTIPOLYGON) coordinate dimension of column ID of geometry table Navigation info for normalized geometry storage SPATIAL REFERENCE SYSTEMS dw 2004 10
Implementation Specification for ANSI SQL92 SQL92 Feature tables 2/3: Numeric Geometry SQL types Geometry Tables or Views: CREATE TABLE <table name> ( GID NUMBER NOT NULL, -- ID of Geometry ESEQ INTEGER NOT NULL, -- multiple components within a geometry ETYPE INTEGER NOT NULL, -- (1 = Point, 2 = LineString, 3 = Polygon) SEQ INTEGER NOT NULL, -- row-sequence to define a geometry component X1 <ordinate type>, Y1 <ordinate type>,... <repeated for each ordinate, repeated for each point> X<max_ppr> <ordinate type>, Y<max_ppr> <ordinate type>,..., <attribute name> <attribute type> CONSTRAINT GID_PK PRIMARY KEY (GID, ESEQ, SEQ) ) dw 2004 11
Implementation Specification for ANSI SQL92 SQL92 Feature tables 3/3: Binary Geometry Geometry Tables: CREATE TABLE <table name> ( GID NUMBER NOT NULL PRIMARY KEY, XMIN <ordinate type>, YMIN <ordinate type>, XMAX <ordinate type>, YMAX <ordinate type>, WKB_GEOMETRY VARBINARY, -- Blob? <attribute name> <attribute type> ) The bounding box allows for spatial indexing without accessing the WKB GEOMETRY. dw 2004 12
Implementation Specification for ANSI SQL92 SQL92 Feature tables with geometry types Fig 2.15/ p2-26 Just a subset of SQL92-implementation outlined above: Abstract Data Types (SQL Type extensions) Specification standardizes Types (names, geometric definitions) Functions (names, signature, geometric definitions) Blackbox -access through SQL-functions only (Encapsulation) dw 2004 13
Feature table metadata views: Implementation Specification for ANSI SQL92 GEOMETRY COLUMNS: 1 row for each geometry column in DB ID of feature table SRS ID type of geometry coordinate dimension of column Geometries are assigned to SRS at construction time, SRS-check at insertion time Example: PointFromText(pointTaggedText String, SRID Integer): Point (pointtaggedtext is in Well-known Text-Representation of Geometry) p. 3.11 dw 2004 14
Component Specifications Implementation in Oracle Spatial Chapter 3 of OGC s Simple Feature Specification for SQL provides detailed instructions on how to implement each one of the three suggested alternatives. dw 2004 15
Oracle Spatial Implementation in Oracle Spatial http://www.geo.unizh.ch/kickoff/manuals/oracle_817/inter.817/a85337/toc.htm Provides: A schema (MDSYS) that prescribes the storage, syntax, and semantics of supported geometric data types A spatial indexing mechanism A set of operators and functions for performing area-of-interest queries and spatial join queries Administrative utilities... dw 2004 16
Oracle Spatial Implementations Implementation in ESRI SDE Spatial supports two mechanisms, or models, for representing geometries: The relational model uses a table with a predefined set of columns of type NUMBER and one or more rows for each geometry instance. corresponds to OGC s SF for SQL - numeric SQL92 types The object-relational model uses a table with a single column of type MDSYS.SDO GEOMETRY and a single row per geometry instance. corresponds to OGC s SF for SQL - SQL with Geometry Types Oracle recommends using the object-relational model! Some advantages: Additional geometry types: arcs, circles, compound polygons, compound line strings, and optimized rectangles. Performance is greatly improved. dw 2004 17
ESRI SDE Implementation in Postgres/PostGIS ESRI was the first vendor to complete the conformance tests with fully functional, commercial off-the-shelf software: SDE v. 3.0.2 Implementation: Normalized schema and SQL data types dw 2004 18
Implementation in XML: GML 1 and 2 Postgres/PostGIS An OpenSource Database System supporting OGC SF Thomy Hächler dw 2004 19
Implementation in XML: GML 1 and 2 GML - Geography Markup Language An XML-implementation specification of the Simple Features XML Extensible Markup Language XML gets increasingly popular for integrating heterogenous distributed systems. (Web Services) Dedicated to exchanging (and storing) interoperable data Easy to parse (strict syntax-rules), language neutral, readable for machines and humans Hierarchical content model: Formalism is standardized, but the actual model must/can be defined to match application-specific requirements. XML is a Meta-Language designed to define Markup Languages dw 2004 20
Implementation in XML: GML 1 and 2 GML 1 and 2 still use the (limited) Geometry Model of Simple Features: GML = Simple Features for XML GML3 is expected to support Rasterdata, 3D-Geometries, Topology, etc. GML gets the highest attention of all OGC standards. Apparently it drives the further development even at the conceptual level of Simple Features. GML is designed as data-modeling markup language. It does not provide built-in visualization, but it works well with other XML-technologies dedicated for that purpose, i.e. Scaleable Vector Graphics (SVG). dw 2004 21
Implementation in XML: GML 1 and 2 GML - Geography Markup Language: GML Implementation GML 1.0 based on a Document Type Definition GML 2.0 based on a set of XML-schemas Type system can be extended in an object oriented manner Standardized Geometry schema Standardized XLINK schema for declaring references between resources Application schema to be custom built dw 2004 22
Implementation in XML: GML 1 and 2 GML-2 Example A fictive example from the GML specification. Namespaces: location According to GML Geometry schema, Dean, nickname Defined in application schema. <Dean> <familyname>smith</familyname> <age>42</age> <nickname>smithy</nickname> <nickname>bonehead</nickname> <gml:location> <gml:point> <gml:coord><gml:x>1.0</gml:x><gml:y>1.0</gml:y></gml:coord> </gml:point> <gml:location> </Dean> dw 2004 23
Implementation in XML: GML 1 and 2 Two real world applications of GML: OS MasterMap UK s national mapping agency Ordnance Survey, uses GML for distributing UK digital maps: http://www.ordnancesurvey.co.uk/dnf/home.htm GDI NRW Testbed Geodaten-Infrastruktur Nordrhein-Westfalen (GDI) This project examplifies the intention to broaden the market for digital geographic information. It is dedicated not only to GI-specialists but to the general public! http://gdi-nrw.uni-muenster.de/testbed-download.html dw 2004 24
Implementation in XML: GML 3 Commercial systems with GML support No official OGC certification programme for GML-conformance yet. Many GIS applications do provide some level of GML-export/import facilities. Some vendors already do offer products based on OGC s Web Feature Server Specification: Cadcorp Cadcorp SIS Feature Server Ionic IONIC WFS Framework Web Edition, IONIC Suite for ORACLE 8i/9i Cubewerx CubeServ (WFS) Galdos Data Management Suite dw 2004 25
Implementation in XML: GML 3 GML Version 3 Not so simple anymore... 548 pages of specification, more than 1000 new tags, finalized in Jan 2003 limited backward compatibility Modularity: Few (or no) products are expected to support the full standard. Packaging tool creates a tailored schema containing only the required components from the GML core schemas Beyond Simple Features ISO TC211 Conformity Temporal information Nonlinear Geometry Topology dw 2004 26
Implementation in XML: GML 3 Topology Mathematically speaking... Definition.... Topology describes the properties of objects which are invariant under continuous deformation. For example, a circle is topologically equivalent to an ellipse because one can be transformed into the other by stretching. In geographic modelling, the foremost use of topology is in accelerating computational geometry. Remark. In most cases we will be more interested in topological relationships between different features rather than the topological properties of a features individual geometries. dw 2004 27
Implementation in XML: GML 3 GML3 conceptual Model for Topology Volume Topology The GML3 Conceptual Model for Topology describes the correspondence of topological and geometric relationships in up to 3 dimensions. according to Topic 1 of the OGC Abstract Specification (ISO DIS 19107) There are four instantiable classes: Node (0D) Edge (1D) Face (2D) TopoSolid (3D) dw 2004 28