GIS (Geographic Information System) And DB2 Spatial Extender n Khiem Pham n CSCI C n Instructor: Professor Renner
Introduction to GIS n What is GIS? n 1) Spatial data n 2) Projection and Coordinate System n 3) Data Format and Storage n 4) Data Retrieval n 5) Precision and Accuracy n 6) Applications
Spatial Data n What is spatial data? Information about objects, location, distance in space…. Geographic data: road maps, grocery store location…. n 2 Spatial data models 1) Vector Model 2) Raster Model
Projection and Coordinate System n Projection - Definition: convert world coordinate to 2D Cartesian coordinate. - Methods: project earth surface onto cylindrical surfaces or conical surfaces. n Coordinate System - Longitude and Latitude. - 2D Cartesian coordinate system.
Other Points of Concern n Data Format n Data Storage n Data Retrieval n Precision and Accuracy * Application requirements * Depends on physical storage * Depends on the data model
Applications n Yahoo Map n n * Getting a map * Driving direction * Military use
DB2 Spatial Extender n Introduction n Architecture n Example: Using DB2 Spatial Extender n Spatial Index
DB2 Spatial Extender: Introduction n An extension of DB2 DataJoiner to support spatial data. n Components of DB2 Spatial Extender: 1) A set of spatial data type 2) A set of spatial operations and predicates 3) A set of spatial index data types
DB2 Spatial Extender : Architecture DataJoiner with Spatial Extender Spatial Data Engine(SDE) Client Apps SDE API ODBC API TCP/IP The components of a complete spatial system
DB2 Spatial Extender: Example n CREATE TABLE CUSTOMERS (CID INT, ADDR VARCHAR(40), …, LOC POINT) n CREATE TABLE STORES (SID INT, ADDR VARCHAR(40), …, LOC POINT, ZONE POLYGON) n SELECT CID, LOC FROM CUSTOMERS WHERE WITHIN(LOC, :POLYGON) = 1 n SELECT CID, LOC FROM CUSTOMERS WHERE WITHIN(LOC, :CIRCLE1) = 1 OR WITHIN(LOC, :CIRCLE2) = 1 n SELECT C.CID, C.LOC FROM CUSTOMERS C, STORE S WHERE CONTAINS (S.LOC, C.LOC) = 1
DB2 Spatial Extender : Spatial Index n B+ tree index is not enough n Index using grids: 2 dimensional arrays of cells Store the intersections of object with the grids, If object has more than 4 intersections, then go to higher grid level. Example: CREATE INDEX CUSindex ON CUSTOMERS (LOC) USING SPATIAL_INDEX (1000e0, 100e0, 10e0)
Summary n GIS is a specialized system to deal with spatial data. Supports a wide range of application. n DB2 spatial extender: powerful database extension to support spatial data and GIS system.
References n Websites: 1) 2) 3) 4) 5) n Writings & Books: 1) DB2 Spatial Extender: Administration Guide and Reference (Version 2 Release1 Modification 1 – July 1998), Copyright IBM Corporation ) DB2 DataJoiner for Windows NT Systems: Planning, Installation, and Configuration Guide (Version 2 Release 1 Modification 1 – July 1998), Copyright IBM Corporation ) Aldenderfer, M. and Maschner, H.D.G: Anthropology, Space, and Geographic Information Systems. New York: Oxford University Press. n Software Package & Tutorials: IBM DB2 DataJoiner 2.11 (DB2 DataJoiner, Spatial Extender Trial Version, ESRI Spatial Data Engine, ArcView Road Map, U.S. Map data, World Map data). Copyright IBM Corporation 1998.