How to Spatially Enable Your IBM Informix Database
How to Spatially Enable Your IBM Informix Database Chris Bosch
Agenda § Introduction spatial data models Ø spatial standards Ø spatial products Ø spatial processes Ø § Geometry concepts § Spatially enabling your database § Moving forward 2
Introduction: spatial data models § Fundamental GIS data models Raster Vector Real World 3
Introduction: spatial data models § Collections of Thematic Layers 4
Introduction: spatial standards § Open GIS Consortium (OGC) Ø Open. GIS Simple Features Specification for SQL, Revision 1. 1 – SQL 92 implementations (SFS NG) • using numeric SQL types for geometry storage and ODBC access. • using binary SQL types for geometry storage and ODBC access. – SQL 92 with Geometry Types implementations (SFS TF) • supporting both textual and binary ODBC access to geometry. § SQL/MM (Multi-Media) 5
Introduction: spatial products § OGC SFS conforming products 6
Introduction: spatial products § IBM DB 2 Spatial Extender Ø IDS Spatial Data. Blade module Ø IDS Geodetic Data. Blade module Ø § Partner products for IBM Informix Dynamic Server Map. Info Spatial. Ware module Ø Map. Info Geocoding module Ø BCS Grid Ø And more … Ø 7
Introduction: spatial processes § § § 8 Input Manipulation Management Query Analysis Visualization
Agenda § Introduction § Geometry concepts Ø Ø Ø Coordinate Systems OGC Geometry Object Model Basic Methods on Geometries Methods for testing Spatial Relations Methods that support Spatial Analysis § Spatially enabling your database § Moving forward 9
Geometry Concepts § Multiple Coordinate systems exist Geographic (GEOGCS) – longitude/latitude Ø Projected (PROJCS) – X, Y Ø Geocentric (GEOCCS) – X, Y, Z Ø § Defined by several objects DATUM Ø SPHEROID Ø PRIMEM Ø UNIT Ø 10
Geometry Concepts § What is coordinate data? Ø Ø Ø Sets of values describing a particular location on a grid. Longitude/Latitude X, Y Z – Altitude or Depth value M – Measures 10 y 0, 0 11 20 x
Geometry Concepts § Projections Ø 12 Transform locations of features on the Earth’s surface to a two dimensional surface. – Mathematical – Preserving Shape – Preserving Accuracy • area • distance • location
Geometry Concepts § Conic Ø A portion of the Earth's surface is projected onto a cone. The cone is then flattened § Mercator Ø 13 The Earth's sphere is flattened out. In this projections the further away from the equator a point is, the larger it seems
Geometry Concepts 14
Geometry Concepts 15
Geometry Concepts § Open. GIS Consortium (OGC) Geometry Object Model 16
Geometry Concepts § Basic Methods on Geometries Ø Ø Ø Ø Ø 17 Dimension ( ): Integer Geometry. Type ( ): String SRID ( ): Integer Envelope( ): Geometry Is. Empty( ): Integer Is. Simple( ): Integer Boundary( ): Geometry As. Text( ): String As. Binary( ): Binary
Geometry Concepts § Dimension used to classify shapes Ø three values can be used – 0 (has neither length nor area) • points, multipoints – 1 (has length) • linestrings, multilinestrings – 2 (has area) • polygons, multipolygons Ø 18
Geometry Concepts § Is. Simple Some subclasses may be simple or non-simple, while others are always simple Ø multipoints, linestrings, multilinestrings are non-simple if their interiors intersect Ø Non-simple 19 Simple Non-simple Simple
Geometry Concepts § Is. Empty A geometry is empty if it does not have any points – An empty set Ø An empty geometry has an instantiable type Ø An empty geometry has an SRID – The set is empty but has the same SRID as the column being queried. Ø 20
Geometry Concepts § SRID (Spatial Reference ID) Each ordinate of a geometry is stored within a 32 -bit integer Ø The x offset, y offset and system units determine the limits (“box”) of the coordinate reference system Ø Spatial functions require that geometries have the same SRID – Geometries stored in a spatial column must all have the same SRID Ø 21
Geometry Concepts § Geometry types Ø Ø Ø 22 Point Line. String Polygon Multi. Point Multi. Line. String Multi. Polygon
Geometry Concepts § Point Ø Ø Ø Represent distinct locations – wells, landmarks, elevations. . . Dimension of 0 Single XY coordinate Always simple Null boundary – all “interior” interior 23
Geometry Concepts § Line. String Represent linear feature – rivers, roads, power lines. . . Ø Dimension of 1 – linestrings have length Ø String of coordinates defining a linear interpolated path Ø Simple if it does not intersect its interior Ø simple 24 non-simple
Geometry Concepts § Line. String continued … Boundary is the endpoints Ø Boundary is null if the linestring is closed Ø Line. String is a ring if the linestring is closed and simple Ø boundary interior 25
Geometry Concepts § Polygon A surface stored as a sequence of points that define an exterior ring and possibly one or more interior rings Ø The rings cannot overlap Ø Rings can intersect at a tangent Ø Always simple Ø interior 26 boundary
Geometry Concepts § Polygon continued … The rings are the boundary Ø Polygons have area and length (perimeter) Ø Define water bodies, parcels of land. . . Ø Polygon with a hole. Outer coordinates are expressed counter-clockwise, inner coordinates clockwise. 27
Geometry Concepts § Multi. Point Ø Ø Ø 28 A collection of points Dimension of 0 Simple or non-simple Boundary is NULL Define broadcast patterns. . .
Geometry Concepts § Multi. Line. String Ø Ø Ø A collection of linestrings Dimension of 1 Has length Simple and non-simple Simple if endpoints of all elements intersect Simple 29 Non-Simple
Geometry Concepts § Multi. Line. String continued … Boundary is the endpoints of all elements combined Ø Boundary is null if all endpoints intersect other endpoints, in which case the Multi. Line. String is closed Ø Define networks Ø 30
Geometry Concepts § Multi. Polygon A collection of polygons Ø Dimension of 2 Ø Has area and perimeter Ø Boundary is defined by the set of interior and exterior rings that form its elements Ø 31
Geometry Concepts § Multi. Polygon continued … Always simple Ø Rings cannot overlap Ø Rings can intersect at a single tangent point Ø 32
Geometry Concepts § Methods for testing Spatial Relations between Geometries Ø Ø Ø Ø Ø 33 Equals(another. Geometry: Geometry): Integer Disjoint(another. Geometry: Geometry): Integer Intersects(another. Geometry: Geometry): Integer Touches(another. Geometry: Geometry): Integer Crosses(another. Geometry: Geometry): Integer Within(another. Geometry: Geometry): Integer Contains(another. Geometry: Geometry): Integer Overlaps(another. Geometry: Geometry): Integer Relate(another. Geometry: Geometry, intersection. Pattern. Matrix: String): Integer
Geometry Concepts § Equals 34
Geometry Concepts § Disjoint 35
Geometry Concepts § Intersects 36
Geometry Concepts § Touches 37
Geometry Concepts § Crosses 38
Geometry Concepts § Within 39
Geometry Concepts § Contains 40
Geometry Concepts § Overlaps 41
Geometry Concepts § Methods that support Spatial Analysis Ø Ø Ø Ø 42 Intersection(another. Geometry: Geometry): Geometry Union(another. Geometry: Geometry): Geometry Difference(another. Geometry: Geometry): Geometry Sym. Difference(another. Geometry: Geometry): Geometry Buffer(distance: Double): Geometry Convex. Hull( ): Geometry Distance(another. Geometry: Geometry): Double
Geometry Concepts § Intersection 43
Geometry Concepts § Difference 44
Geometry Concepts § Union 45
Geometry Concepts § Sym. Difference 46
Geometry Concepts § Buffer 47
Geometry Concepts § Convex. Hull 48
Agenda § Introduction § Geometry concepts § Spatially enabling your database Product version requirements Ø Installation and configuration Ø Adding spatial types and functions to your database Ø Adding spatial data to your database Ø § Moving forward 49
Agenda § § Introduction Geometry concepts Spatially enabling your database Moving forward Ø Ø Ø 50 Enroll in customer training courses Become certified Participate in user community Make use of on-line resources Engage IBM technical support Provide feedback
Moving Forward § Enroll in customer training courses Ø 51 IBM Informix Dynamic Server – FN-848: Managing and Optimizing IBM Informix Dynamic Server Databases http: //www. ibm. com/software/data/informix/education/cours es/848. html – FN-910: Data Migration and Reorganization http: //www. ibm. com/software/data/informix/education/cours es/910. html – L 1 -846: IBM Informix Dynamic Server Administration http: //www. ibm. com/software/data/informix/education/cours es/846. html – L 2 -403: IBM Informix Dynamic Server Performance Tuning http: //www. ibm. com/software/data/informix/education/cours es/403. html – L 2 -748: IBM Informix Dynamic Server Backup and Restore http: //www. ibm. com/software/data/informix/education/cours es/748. html
Moving Forward § Enroll in customer training courses IBM DB 2 – CF 030 - DB 2 Family Fundamentals (also available via CD -ROM) – CF 120 - DB 2 SQL Workshop (also available via CDROM) – CF 131 - DB 2 Advanced SQL Workshop (also available via CD-ROM) – CT 28 C - DB 2 UDB for Experienced Relational DBAs (CDROM) – DW 230 - Managing Geographic Data with DB 2 Spatial Extender – http: //www 3. ibm. com/services/learning/spotlight/db 2/all. html Ø ESRI – Creating and Managing Geodatabases (for Arc. Editor 8 and Arc. Info 8) – Introduction to Arc. SDE using Arc. Info Ø 52
Moving Forward § Become certified Ø 53 IBM Certified Solutions Expert - DB 2 UDB V 7. 1 Database Administration for UNIX, Linux, Windows and OS/2 – Test 512 (or 718): DB 2 UDB V 7. 1 Family Fundamentals http: //www-1. ibm. com/certify/tests/obj 512. shtml – Test 513 (or 719): DB 2 UDB V 7. 1 for UNIX, Linux, Windows and OS/2 Database Administration http: //www-1. ibm. com/certify/tests/obj 513. shtml
Moving Forward § Become certified Ø 54 IBM Certified Solutions Expert - Informix Dynamic Server V 9 System Administrator – Test 660 -112: Managing and Optimizing Informix Dynamic Server Databases http: //www-1. ibm. com/certify/tests/obj 660 -112. shtml – Test 660 -612: System Administration for IBM Informix Dynamic Server Version 9 http: //www-1. ibm. com/certify/tests/obj 660 -612. shtml
Moving Forward § Participate in user community International Informix Users Group – http: //www. iiug. org/ Ø International DB 2 Users Group – http: //www. idug. org/ Ø ESRI International User Conference – http: //www. esri. com/events/uc/index. html Ø 55
Moving Forward § Make use of on-line resources Ø Ø Ø Ø 56 Open GIS Consortium – http: //opengis. org/ IBM DB 2 Spatial Extender – http: //www-4. ibm. com/software/data/spatial/ IBM Informix Spatial Data. Blade module – http: //www 4. ibm. com/software/data/informix/blades/spatial/ IBM Geodetic Data. Blade module – http: //www 4. ibm. com/software/data/informix/blades/geodetic/ ESRI – http: //www. esri. com/ ; http: //arconline. esri. com/ IBM developer. Works : DB 2 Developer Domain : Informix Developer Zone – http: //www 7 b. software. ibm. com/dmdd/zones/informix/ids_s patial. html Newsgroups – news: //news. software. ibm. com/ibm. software. db 2. udb. spati
Moving Forward § Engage IBM Informix technical support Ø Ø Ø The IBM Software Support Guide begins here – http: //techsupport. services. ibm. com/guides/handbook. html Information specific to support of IBM Informix products – http: //www-3. ibm. com/software/data/informix/support/ Information specific to support of IBM Informix Dynamic Server – http: //www-3. ibm. com/software/data/informix/ids/support/ Information specific to support of IBM DB 2 – http: //www-3. ibm. com/software/data/support/ Information specific to support of IBM DB 2 Spatial Extender – http: //www-3. ibm. com/software/data/spatial/support. html § Provide feedback 57
How to Spatially Enable Your IBM Informix Database Chris Bosch
- Slides: 58