User's Guide and Reference

User's Guide and Reference

IBM Spatial Support for DB2 10 for z/OS User's Guide and Reference IBM GC19-2986 IBM Spatial Support for DB2 10 for z/OS User's Guide and Reference IBM GC19-2986 Notes Before using this information and the product it supports, be sure to read the general information under “Notices” at the end of this information. July 18, 2017 edition This edition applies to IBM Spatial Support for DB2 10 for z/OS, part of Version 2.2 of DB2 Accessories Suite for z/OS, product number 5697-Q02, and to any subsequent releases to IBM Spatial Support for DB2 for z/OS until otherwise indicated in new editions. Make sure that you are using the correct edition for the level of the IBM Spatial Support for DB2 for z/OS offering. © Copyright IBM Corporation 2007, 2013. US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. Contents About this information ............................. ix Who should read this information ............................ ix DB2 Utilities Suite ................................. ix Terminology and citations............................... ix Accessibility features for DB2 10 for z/OS ......................... x How to send your comments .............................. x How to read syntax diagrams ............................. xi Chapter 1. IBM Spatial Support for DB2 for z/OS .................. 1 The purpose of IBM Spatial Support for DB2 for z/OS ..................... 1 How data represents geographic features .......................... 2 The nature of spatial data .............................. 3 Where spatial data comes from ............................ 4 How features, spatial information, spatial data, and geometries fit together .............. 5 Chapter 2. About geometries ........................... 7 Geometries .................................... 7 Properties of geometries ............................... 8 Types ..................................... 8 Geometry coordinates ............................... 8 | X and Y coordinates ................................ 9 Z coordinates .................................. 9 M coordinates .................................. 9 Interior, boundary, and exterior ............................ 9 Simple or non-simple ............................... 9 Closed .................................... 9 Empty or not empty ................................ 9 Minimum bounding rectangle (MBR) .......................... 10 Dimension................................... 10 Spatial reference system identifier ........................... 10 Chapter 3. Getting started with IBM Spatial Support for DB2 for z/OS ......... 11 System requirements for installing IBM Spatial Support for DB2 for z/OS .............. 11 Setting up and installing spatial support.......................... 11 Verifying the installation of spatial support ......................... 12 Inventory of resources supplied for your database ...................... 13 | Enabling spatial support for the first time ......................... 13 | Enabling spatial support when migrating from the previous version of DB2 .............. 14 Chapter 4. Setting up spatial resources...................... 17 How to use coordinate systems............................. 17 Coordinate systems................................ 17 Geographic coordinate system ............................ 17 Projected coordinate systems ............................ 22 Selecting or creating coordinate systems ......................... 23 How to set up spatial reference systems .......................... 24 Spatial reference systems .............................. 24 Deciding whether to use a default spatial reference system or create a new system .......... 25 Spatial reference systems supplied with IBM Spatial Support for DB2 for z/OS............ 26 Creating a spatial reference system .......................... 28 Conversion factors that transform coordinate data into integers ................. 29 Calculating offset values .............................. 30 Calculating scale factors .............................. 31 Determining minimum and maximum coordinates and measures ................ 32 © Copyright IBM Corp. 2007, 2013 iii Chapter 5. Setting up spatial columns ...................... 35 Spatial columns .................................. 35 Spatial columns with viewable content ......................... 35 Spatial data types ................................ 35 Creating spatial columns ............................... 36 | Creating inline spatial columns ............................. 37 Registering spatial columns .............................. 39 Chapter 6. Populating spatial columns ...................... 41 About importing spatial data ............................. 41 Importing spatial data ................................ 42 Importing shape data to a new or existing table ...................... 42 Chapter 7. Using indexes to access spatial data .................. 43 Spatial indexes .................................. 43 Spatial grid indexes ................................ 43 Generation of spatial grid indexes ........................... 44 Use of spatial functions in a query........................... 44 How a query uses a spatial grid index ......................... 45 Considerations for the number of grid levels and grid sizes ................... 45 Number of grid levels ............................... 45 Grid cell sizes ................................. 46 Creating spatial grid indexes ............................. 50 Chapter 8. Analyzing and generating spatial information .............. 53 Environments for performing spatial analysis ........................ 53 Examples of how spatial functions operate ......................... 53 Functions that use indexes to optimize queries ....................... 54 Chapter 9. Stored procedures .......................... 57 ST_alter_coordsys ................................. 57 ST_alter_srs ................................... 59 ST_create_coordsys ................................. 62 ST_create_index .................................. 64 ST_create_srs ................................... 67 ST_create_srs_2 .................................. 71 ST_drop_coordsys ................................. 75 ST_drop_index .................................. 76 ST_drop_srs ................................... 77 ST_export_shape ................................. 78 ST_import_shape ................................. 81 ST_register_spatial_column .............................. 88 ST_unregister_spatial_column ............................. 90 Chapter 10. Catalog views ........................... 93 The DB2GSE.GEOMETRY_COLUMNS catalog view ...................... 93 The DB2GSE.SPATIAL_REF_SYS catalog view ........................ 93 The DB2GSE.ST_COORDINATE_SYSTEMS catalog view .................... 94 The DB2GSE.ST_GEOMETRY_COLUMNS catalog view .................... 95 The DB2GSE.ST_SIZINGS catalog view .......................... 96 The DB2GSE.ST_SPATIAL_REFERENCE_SYSTEMS catalog view ................. 97 The DB2GSE.ST_UNITS_OF_MEASURE catalog view ..................... 99 Chapter 11. Spatial functions: categories and uses ................ 101 Constructor functions................................ 101 Functions that operate on data exchange formats ..................... 101 A function that creates geometries from coordinates .................... 102 Examples................................... 103 Conversion to well-known text (WKT) representation .................... 105 iv User's Guide and Reference Conversion to well-known binary (WKB) representation ................... 105 Conversion to ESRI shape representation ........................ 106 Conversion to Geography Markup Language (GML) representation ............... 106 Comparison functions ............................... 106 Spatial comparison functions ............................ 108 Functions that compare geographic features ....................... 108 Functions that check whether one geometry contains another .................. 109 ST_Contains .................................. 109 ST_Within .................................. 110 Functions that check intersections between geometries..................... 112 EnvelopesIntersect................................ 113 ST_Intersects ................................. 113 ST_Crosses .................................. 114 ST_Overlaps.................................. 116 ST_Touches .................................. 117 Function that checks whether two geometries are identical ................... 118 ST_Equals .................................. 118 Functions that return coordinate and measure information ................... 119 | ST_Is3D ................................... 120 | ST_IsMeasured ................................. 120 | ST_IsValid .................................. 120 ST_M .................................... 120 ST_MaxM .................................. 120 ST_MaxX ................................... 120 ST_MaxY ................................... 120 ST_MaxZ ................................... 121 ST_MinM................................... 121 ST_MinX ................................... 121 ST_MinY ................................... 121 ST_MinZ ................................... 121 ST_X .................................... 121 ST_Y .................................... 121 ST_Z .................................... 121 Functions that return information about geometries within a geometry ............... 121 ST_Centroid .................................. 121 ST_EndPoint ................................

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    353 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us