Spatial FAQ

From Oracle FAQ
Jump to: navigation, search

Oracle Spatial FAQ:

What is Oracle Spatial?[edit]

Oracle Spatial (formerly called SDO and before that MultiDimension), provides a way to store and retrieve multi-dimensional data in Oracle. It is primarily used for Geographical Information Systems to implement geo-reference and solve queries such as how is something related to a specific location.

With this, representation of features (point, line or polygon) are stored in a single field within a table. A single Helical Hyperspatial code (HHCODE) is used to store the Euclidean spatial dimensions and additional data dimensional include depth, elevation, or time. The types of multidimensional data are restricted only in that they must be a numeric data type and have a bounded range. The HHCODE is generated through the recursive decomposition of dimensional space. Attribute data for specific multidimensional data is stored within columns of a table in the database. Access to the data for processing and manipulation is accomplished through extensions to Oracle PL/SQL.

What is the difference between Oracle Spatial and Locator?[edit]

Oracle Locator is free with the Oracle Database Server (EE and Standard Edition). Oracle Spatial is intended for "heavy" spatial applications. It only ships with Oracle Enterprise Edition and are separately charged.

What is the difference between the Relational and Object Spatial model?[edit]

Oracle Spatial provides two mutually exclusive models for representing geometry:

  • Object-relational model - uses a table with single column of type MDSYS.SDO_GEOMETRY and a single row per geometry instance.
  • Relational model - uses a table with a predefined set of columns of type NUMBER and one or more rows for each geometry instance.

The object model provides more features. In Oracle8i, the Object model didn't support replication, partitioning and distribution. From Oracle 9i there is no benefits in choosing the relational model above the object model.

How does one install Oracle Spatial?[edit]

Oracle Spatial can be installed via the Oracle installer, DBCA or from the command line interface. Look at these examples:

For Oracle 9i and 10g:

SQL> connect SYS as SYSDBA
SQL> @?/md/admin/mdinst.sql

For Oracle 8i:

SQL> REM # Create MDSYS users as part of the ORD (Object Relational Data) 
SQL> REM #    install script ordisys.sql:
SQL> connect SYS as SYSDBA
SQL> @?/ord/admin/ordisys.sql

SQL> REM # Install MD catalog into the MDSYS user
SQL> connect mdsys/mdsys
SQL> @?/md/admin/catmd.sql

For Oracle 8.0:

SQL> REM # Create user MDSYS with admin option
SQL> connect SYS as SYSDBA
SQL> @?/md/install/mdsysid.sql

SQL> REM # Install MD catalog into the MDSYS user
SQL> connect mdsys/mdsys
SQL> @?/md/admin/catmd.sql

NOTE: Also run catmd.sql after upgrading to a new Oracle release.

What is the difference between Vector and Raster data?[edit]

There are two main models for storing and representing spatial data in a Geographic Information System (GIS): the raster the vector models:

RASTER DATA - raster (or grid cell type) data can be used for analyzing, overlaying, and modeling areal features such as soil types or forested areas. Raster data are generally typically scanned in from maps.

VECTOR DATA - vector data can be used to represent linear features such as roads, streams or area edges and can be combined with raster data for display purposes or for analysis.

In general, Raster maps are faster, Vector maps are more specific and more accurate.

What is a GeoTIFF and what is it used for?[edit]

GeoTIFF is a non-proprietary geographic TIFF file format. The purpose of GeoTIFF is to provide information that lets raster imagery (scanned maps, satellite images, results of geographic analysis, etc) be read automatically into correct position and scale within many GIS softwares. GeoTIFF implements a tag structure which embeds the geographic information methodically and interoperably (and invisibly to most users) inside the TIFF file.

What are HHCodes and what are they used for?[edit]

HHCODEs (Helical Hyperspatial Codes) is an encoding technique developed by the Canadian Hydrographic Service for combining data of two or more dimensions into a single value. This value represents the intersection of all of the desired dimensions. HHCODEs makes it easy to store multidimensional data in a database.

In Oracle, a HHCODE is a datatype used for both spatial indexing and partitioned point data.

More technical:

HHCodes are in effect Peano Codes, an implementation of Space Filling Curves. The multidimensionality aspect is the use of the Riemannian hypercube in conjunction with the space filling curve. What in effect has happened is that the Riemannian tensor matrix has been mapped by the space filling curve. This gives mathematical credence to HHCodes and a lot more functionality then just data access. One more thing the HHcode encoding is not just Euclidean, Curvilinear and linear coordinates such as Lat, Lon, depth and time can also be mapped together. This creates Time varying voxels, (I suppose one can call them toxels).

Contributed by: Herman Varma

What Spatial Vendors integrate with Oracle?[edit]

The following Spatial Vendors provide Oracle based solutions: