From Oracle FAQ
Jump to: navigation, search

Oracle Spatial is an option of the Oracle database that allows users to store and retrieve geographical or location information. Some examples: population by county, amount of sales by state, amount of employees per site, etc.


Oracle Spatial was previously known as SDO and before that as MultiDimension. A brief history:

  • Spatial data capabilities as modification shipped by scientists working with the Canadian Hydrographic Service (CHS) to Oracle 4.
  • Spatial Data Option (SDO) shipped in Oracle 7.3.3.
  • Spatial introduced it's object type in Oracle 8.1.5.
  • Spatial added Java Classes, Projections, Linear Referencing and R-Tree Indexing in Oracle 8.1.7.
  • Spatial added Whole Earth Geometry Model, Function-based indexes, Object replication, Partitioning in Oracle 9i.
  • Spatial added Geocoder, GeoRaster, Network Data Model, Topology, Spatial Analytic Functions and Routing engine in Oracle 10g.
  • Spatial added 3D Support and Web Services in Oracle 11g.
  • Oracle Application Server MapViewer first shipped in AS 9.0.2
  • MapViewer, now called the Map Visualization Component, is part of the Spatial feature in Oracle Database


Oracle Spatial is a free option included in Oracle Standard Edition 2 and Enterprise Edition.

Functionality provided[edit]

  • An object type (SDO_GEOMETRY) that describes and supports any type of geometry
  • A spatial indexing capability that lets you create spatial indexes on geometry data
  • Spatial operators that use the spatial index for performing spatial queries
  • Some geometry functions and the SDO_AGGR_MBR spatial aggregate function
  • An object type that describes and supports geometries such as points, lines, polygons
  • Fast spatial R-tree indexing
  • Spatial operators that use the spatial index for performing queries that determine the interaction of geometric features
  • Spatial functions for distance, area, and length
  • Spatial function for buffering (new to Locator in release 11g)
  • Open, standard SQL access to spatial operations
  • Whole Earth geometry model that provides comprehensive storage, management and use of geodetic data
  • Function-based spatial indexes
  • Long transactions (through Oracle Workspace Manager feature)
  • Coordinate system support based on the European Petroleum Survey Group (EPSG) data model
  • Explicit coordinate transformations
  • Support for SQL/MM Spatial types and operators** (new to Locator in release 11g)
  • Tuning functions and procedures (SDO_TUNE package)
  • Spatial utility functions (SDO_UTIL package)
  • OGC Web Services [WMS, WFS, WCS, CSW, OpenLS)
  • GeoJSON and Spatial JSON object support
  • Linear referenced features, LRS, e.g. roads which store the distance along the road
  • Network models, NDM, such as road networks, allowing rapid calculation of shortest paths
  • Topological relationships can be stored, such as this property boundary touches this neighbouring boundary. Generally used by data producers wishing to edit high integrity spatial data
  • Coordinate system support based on the European Petroleum Survey Group (EPSG) data model
  • Explicit coordinate transformations
  • WorkSpace manager for versioning, long transaction support
  • GeoRaster Storage of images such as satellite and aerial photography
  • A geocoder that translates address data to coordinate, a routing engine for street directions
  • Some more complex spatial functions, mainly for analysis and data aggregation
  • 3D data model for storing and managing 3D vector data, Triangualted Irregular Networks, TINs and Point Cloud data
  • Web Services , WFS , CSW and OpenLS
  • Integration with Oracle Application Server 11g MapViewer map visualization development tool


Create a spatial table to store GPS (Global Positioning System) coordinates:


Register the spatial table:

INSERT INTO user_sdo_geom_metadata VALUES('GPS', 'LONGLAT',
        mdsys.sdo_dim_element('Long', -15, 25, 0.005),
        mdsys.sdo_dim_element('Lat', -35, -15, 0.005)), 8307);

Create a spatial index:

CREATE INDEX gps_ind ON gps(longlat) INDEXTYPE IS mdsys.spatial_index;

Load a record:

          3428099223, -3.342E+09,
          3427750794, -3.342E+09,
          3427655045, -3.342E+09,
          3427548248, -3.342E+09,
          3427542723, -3.342E+09)));

Also see[edit]

  • Spatial FAQ. frequently asked questions
  • Locator,a scaled down "free" version of Oracle Spatial available prior to the inclusion of Oracle Spatial as a feature of Oracle Database for all editions in Dec. 2019.
  • Mapviewer, Oracle's map rendering solution that is now renamed and included in the Oracle Spatial feature of Oracle Database.

External links[edit]