IBM Software Group ® Business Integration from IBM IBM Software Group © 2003 IBM Corporation.
IBM Software Group © 2004 IBM Corporation 7/22/2004 How To Spatially Enable Your IBM Informix...
-
Upload
wesley-allan-bryan -
Category
Documents
-
view
221 -
download
0
Transcript of IBM Software Group © 2004 IBM Corporation 7/22/2004 How To Spatially Enable Your IBM Informix...
IBM Software Group
7/22/2004 © 2004 IBM Corporation
How To Spatially EnableYour IBM Informix Database
Chris Bosch, Software EngineerIBM DB2 Information Management
IBM Software Group | DB2 Information Management Software
© 2004 IBM Corporation2 7/22/2004
Agenda
Introduction
– spatial data models
– spatial standards
– spatial products
– spatial partners
Geometry concepts
Spatially enabling your database
Resources for further information
IBM Software Group | DB2 Information Management Software
© 2004 IBM Corporation3 7/22/2004
Introduction: spatial data models
Spatial data is modeled as raster or vector, and …
… organized as collections of thematic layers
IBM Software Group | DB2 Information Management Software
© 2004 IBM Corporation4 7/22/2004
Introduction: spatial standards
Open GIS Consortium (OGC)
– OpenGIS Simple Features Specification for SQL, Revision 1.1
• SQL92 implementations (SFS NG)– using numeric SQL types for geometry storage and ODBC
access.
– using binary SQL types for geometry storage and ODBC access.
• SQL92 with Geometry Types implementations (SFS TF)– supporting both textual and binary ODBC access to geometry.
SQL/MM (Multi-Media)
IBM Software Group | DB2 Information Management Software
© 2004 IBM Corporation5 7/22/2004
Introduction: spatial products
Products Implementing or Complying to OGC Simple Features - SQL - Types and Functions 1.1
Product Version Status Contact Organization
ArcSDE for Informix 8.1 Compliant Danko, David ESRI
Spatial Database Engine for Informix 3.0.2 Compliant Danko, David ESRI
ArcSDE for DB2 8.1 Compliant Danko, David ESRI
Spatial Database Engine for DB2 Datajoiner 3.0.2 Compliant Danko, David ESRI
IBM DB2 Spatial Extender 7.1 Compliant Adler, David IBM Corporation
IBM DB2 Spatial Extender 8.1 Compliant Adler, David IBM Corporation
IBM DB2 Spatial Extender 7.1 Compliant Adler, David IBM Corporation
Spatial DataBlade Module 8.1 Compliant Stevens, Michael Informix Software, Inc.
MapInfo SpatialWare 4.5 Implementing Gordon, Douglas MapInfo Corporation
PostGIS / PostgreSQL 0.8.0 Implementing Ramsey, Paul Refractions Research Inc
10 Registered Implementations of Simple Features - SQL - Types and Functions 1.1.
IBM Software Group | DB2 Information Management Software
© 2004 IBM Corporation6 7/22/2004
Introduction: spatial products
IBM Informix Spatial DataBlade Module
– V8.10, 2000
– V8.11, 2001
– V8.20, 2002
IBM Informix Geodetic DataBlade Module
– V2.11, 1997
– V2.12, 1998
– V3.0, 2000
Other partner products for Informix Dynamic Server …
IBM DB2 Spatial Extender
– V7.1, 2000
– V7.2, 2001
– V8.1, 2002
– V8.2, 2004 (open beta)
IBM DB2 Geodetic Extender
– V8.2, 2004 (open beta)
IBM Software Group | DB2 Information Management Software
© 2004 IBM Corporation7 7/22/2004
Introduction: spatial products
Spatial vs. Geodetic
– The Spatial DataBlade/Extender treats the earth as a flat map.
• Projecting the curved earth onto a flat map creates distortion around the edges of the map
• Geometric operations can be inaccurate around those edges.
• The Spatial DataBlade/Extender is best used for regional datasets and applications.
– The Geodetic DataBlade/Extender treats the earth as a globe.
• Geometric operations are precise regardless of location.
• The Geodetic DataBlade/Extender is best for global datasets and applications, such as satellite imagery repositories.
IBM Software Group | DB2 Information Management Software
© 2004 IBM Corporation8 7/22/2004
Introduction: spatial partners
ESRI
– Provides the shape, projection, and geocoding libraries used by IBM Informix Spatial DataBlade and DB2 Spatial Extender
Geodyssey Limited
– Provides the Hipparchus Library used by IBM Informix Geodetic DataBlade and DB2 Geodetic Extender
MapInfo
– Developer of SpatialWare DataBlade for Informix Dynamic Server
Barrodale Computing Services
– Developer of Grid DataBlade for Informix Dynamic Server
Others …
IBM Software Group | DB2 Information Management Software
© 2004 IBM Corporation9 7/22/2004
Agenda
Introduction
Geometry concepts
– Projections
– Coordinate Systems
– OGC Geometry Object Model
– Basic Methods on Geometries
– Methods for testing Spatial Relations
– Methods that support Spatial Analysis
Spatially enabling your database
Resources for further information
IBM Software Group | DB2 Information Management Software
© 2004 IBM Corporation10 7/22/2004
Geometry Concepts
Projections
IBM Software Group | DB2 Information Management Software
© 2004 IBM Corporation11 7/22/2004
Geometry Concepts
Conic projections
– A portion of the Earth's surface is projected onto a cone. The cone is then flattened.
Mercator projections– The Earth's sphere is
flattened out. In these projections the further away from the equator a point is, the larger it seems.
IBM Software Group | DB2 Information Management Software
© 2004 IBM Corporation12 7/22/2004
Geometry Concepts
Coordinate systems
– Geographic• GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GR
S_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]
– Projected• PROJCS["NAD_1983_10TM_AEP_Forest",GEOGCS["GCS_North_American_1983",DATUM["D
_North_American_1983",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",-115.0],PARAMETER["Scale_Factor",0.9992],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]]
– Geocentric• GEOCCS["Geocentric",DATUM["WGS_1984",SPHEROID["WGS
84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0],UNIT["Meter",1],AXIS["X",OTHER],AXIS["Y",EAST],AXIS["Z",NORTH]]
IBM Software Group | DB2 Information Management Software
© 2004 IBM Corporation13 7/22/2004
Geometry Concepts
OGC Geometry Object Model
IBM Software Group | DB2 Information Management Software
© 2004 IBM Corporation14 7/22/2004
Geometry Concepts
Basic Methods on Geometries
– Dimension ( ):Integer
– GeometryType ( ):String
– SRID ( ):Integer
– Envelope( ):Geometry
– IsEmpty( ):Integer
– IsSimple( ):Integer
– Boundary( ):Geometry
– AsText( ):String
– AsBinary( ):Binary
IBM Software Group | DB2 Information Management Software
© 2004 IBM Corporation15 7/22/2004
Geometry Concepts
Methods for testing Spatial Relations between Geometries
– Equals(anotherGeometry:Geometry):Integer
– Disjoint(anotherGeometry:Geometry):Integer
– Intersects(anotherGeometry:Geometry):Integer
– Touches(anotherGeometry:Geometry):Integer
– Crosses(anotherGeometry:Geometry):Integer
– Within(anotherGeometry:Geometry):Integer
– Contains(anotherGeometry:Geometry):Integer
– Overlaps(anotherGeometry:Geometry):Integer
– Relate(anotherGeometry:Geometry, intersectionPatternMatrix:String):Integer
IBM Software Group | DB2 Information Management Software
© 2004 IBM Corporation16 7/22/2004
Geometry Concepts
Equals
IBM Software Group | DB2 Information Management Software
© 2004 IBM Corporation17 7/22/2004
Geometry Concepts
Disjoint
IBM Software Group | DB2 Information Management Software
© 2004 IBM Corporation18 7/22/2004
Geometry Concepts
Intersects
IBM Software Group | DB2 Information Management Software
© 2004 IBM Corporation19 7/22/2004
Geometry Concepts
Touches
IBM Software Group | DB2 Information Management Software
© 2004 IBM Corporation20 7/22/2004
Geometry Concepts
Crosses
IBM Software Group | DB2 Information Management Software
© 2004 IBM Corporation21 7/22/2004
Geometry Concepts
Within
IBM Software Group | DB2 Information Management Software
© 2004 IBM Corporation22 7/22/2004
Geometry Concepts
Contains
IBM Software Group | DB2 Information Management Software
© 2004 IBM Corporation23 7/22/2004
Geometry Concepts
Overlaps
IBM Software Group | DB2 Information Management Software
© 2004 IBM Corporation24 7/22/2004
Geometry Concepts
Methods that support Spatial Analysis
– Intersection(anotherGeometry:Geometry):Geometry
– Union(anotherGeometry:Geometry):Geometry
– Difference(anotherGeometry:Geometry):Geometry
– SymDifference(anotherGeometry:Geometry):Geometry
– Buffer(distance:Double):Geometry
– ConvexHull( ):Geometry
– Distance(anotherGeometry:Geometry):Double
IBM Software Group | DB2 Information Management Software
© 2004 IBM Corporation25 7/22/2004
Geometry Concepts
Intersection
IBM Software Group | DB2 Information Management Software
© 2004 IBM Corporation26 7/22/2004
Geometry Concepts
Difference
IBM Software Group | DB2 Information Management Software
© 2004 IBM Corporation27 7/22/2004
Geometry Concepts
Union
IBM Software Group | DB2 Information Management Software
© 2004 IBM Corporation28 7/22/2004
Geometry Concepts
SymDifference
IBM Software Group | DB2 Information Management Software
© 2004 IBM Corporation29 7/22/2004
Geometry Concepts
Buffer
IBM Software Group | DB2 Information Management Software
© 2004 IBM Corporation30 7/22/2004
Geometry Concepts
ConvexHull
IBM Software Group | DB2 Information Management Software
© 2004 IBM Corporation31 7/22/2004
Agenda
Introduction
Geometry concepts
Spatially enabling your database
– Product installation and configuration
– Adding spatial types, functions, and index support to your database
– Adding spatial data to your database
– Demonstration
Resources for further information
IBM Software Group | DB2 Information Management Software
© 2004 IBM Corporation32 7/22/2004
Spatially enabling your database
Product installation and configuration
– IDS
• Installation of the IBM Informix Spatial DataBlade module is straightforward
• Update ONCONFIG parameters before registering Spatial DataBlade module in your database– SBSPACENAME <sbspacename>
– SYSSBSPACENAME <sbspacename>
– STACKSIZE 64
IBM Software Group | DB2 Information Management Software
© 2004 IBM Corporation33 7/22/2004
Spatially enabling your database
Product installation and configuration
– DB2
• Installation of the DB2 Spatial Extender is straightforward• Update DB CFG parameters before enabling your database
with Spatial Extender– logfilsiz 1000
– logprimary 10
– logsecond 2
– applheapsz 2048
– app_ctl_heap_sz 1024
IBM Software Group | DB2 Information Management Software
© 2004 IBM Corporation34 7/22/2004
Spatially enabling your database
Adding spatial types, functions, and index support
– IDS
• Register the Spatial DataBlade module in your database– Command line: blademgr
– GUI: BladeManager (%INFORMIXDIR%\bin\wblademgr.exe)
– DB2
• Enable your database with Spatial Extender– Command line: db2se enable_db
– GUI: DB2 Control Center (%DB2PATH%\bin\db2cc.bat)
IBM Software Group | DB2 Information Management Software
© 2004 IBM Corporation35 7/22/2004
Spatially enabling your database
Adding spatial data to your database
– Import spatial data from ESRI Data & Maps data bundle• IDS
– Command line: loadshp
• DB2– Command line: db2se import_shape– GUI: DB2 Control Center
– Geocode existing business data• DB2
– Command line: db2se run_gc– GUI: DB2 Control Center
IBM Software Group | DB2 Information Management Software
© 2004 IBM Corporation36 7/22/2004
Spatially enabling your database
Demonstration
IBM Software Group | DB2 Information Management Software
© 2004 IBM Corporation37 7/22/2004
Agenda
Introduction
Geometry concepts
Spatially enabling your database
Resources for further information
IBM Software Group | DB2 Information Management Software
© 2004 IBM Corporation38 7/22/2004
Resources for further information
IBM Informix Spatial DataBlade module
– http://www.ibm.com/software/data/informix/blades/spatial/
IBM Informix Geodetic DataBlade module
– http://www.ibm.com/software/data/informix/blades/geodetic/
IBM DB2 Spatial Extender
– http://www.ibm.com/software/data/spatial/
Informix Developer Zone– http://www.ibm.com/developerworks/db2/zones/informix/ids_spatial.html
– http://www.ibm.com/developerworks/db2/zones/informix/library/techarticle/ids_geo_spatial.html
IBM Software Group | DB2 Information Management Software
© 2004 IBM Corporation39 7/22/2004
Resources for further information
Open GIS Consortium
– http://opengis.org/
ESRI
– http://www.esri.com/
Geodyssey Limited
– http://www.geodyssey.com/
Newsgroups and forums
– news://news.software.ibm.com/ibm.software.db2.udb.spatial
– http://www.iiug.org/forums/datablade-list