Saturday, June 2, 2018

Oracle Spatial,Oracle Spatial Web Services, Oracle Spatial Operators, Functions, and Procedures


Oracle Spatial.

  1. Coordinate systems,
  2. The linear referencing system, 
  3. Geocoding, and extending spatial indexing. 

Spatial consists of the following:

A schema (MDSYS) that prescribes the storage, syntax, and semantics of supported geometric data types


■A spatial indexing mechanism


■Operators, functions, and procedures for performing area-of-interest queries, spatial join queries, and other spatial analysis operations


■Functions and procedures for utility and tuning operations

■Topology data model for working with data about nodes, edges, and faces in a topology (described in Oracle Spatial Topology and Network Data Models Developer's Guide).

■Network data model for representing capabilities or objects that are modeled as nodes and links in a network (described in Oracle Spatial Topology and Network Data Models Developer's Guide).

■GeoRaster, a feature that lets you store, index, query, analyze, and deliver GeoRaster data, that is, raster image and gridded data and its associated metadata (described in Oracle Spatial GeoRaster Developer's Guide).




















Challenges
  • Storage
  • Temporal changes
  • Data Volume
Classification of Space
  •  Topological space,
  •  network space and
  •  metric space can be used.

Topological space uses the basic notion of a neighborhood and points to formalize relationships that are invariant under elastic deformation.Topological relationships include closed, within, connected, and overlaps. 

Network space deals with such relationships as shortest paths, and connectivity. 

Metric spaces formalize the distance relationships using positive symmetric functions that obey

the triangle inequality.

 Filter and Refine techniques.

primary and secondary filter operations.

The primary filter permits fast selection of candidate records to pass along to the secondary filter. The primary filter compares geometry approximations to reduce computation complexity and is considered a lower-cost filter. Because the primary
filter compares geometric approximations, it returns a super set of the exact result set.

■ The secondary filter applies exact computations to geometries that result from the primary filter. The secondary filter yields an accurate answer to a spatial query. The secondary filter operation is computationally expensive, but it is only applied
to the primary filter results, not the entire data set.

Spatial queries are classified into two categories:
 (i) Window queries and 
(ii) Join queries. 
Window queries take a spatial object (called the window object)
and seek spatial objects from a table that satisfy a binary relation with the window object. For example, the query, “Find all the roads in the City of Minneapolis which overlap the park Minnetonka” is a window query. Here the object representing the park Minnetonka is the window object. 

A join query seeks all the object pairs from two tables that satisfy a given relation. For example, the query, “Find all the roads and parks which overlap from the city of
Minneapolis” is a join query.


Spatial Indexing.
There are essentially two ways of providing a spatial index: 

(1) Dedicated external spatial data structures are added to the system, offering for spatial data what a B-tree does for standard attributes, and 

(2)Spatial objects are mapped into a 1-D space so that they can be stored within a standard 1-D index such as the B-tree.







Operations on Spatial types

These relationships are 
  • contains,
  •  coveredby, 
  • covers, 
  • disjoint, 
  • equal,
  •  inside,
  •  overlap,
  • touch.

 Indexing of Spatial Data


R tree indexing 



SELECT parks.name FROM parks, rivers WHERE mdsys.sdo_relate(parks.geometry, rivers.geometry,  'mask = OVERLAPBDYINTERSECT') = 'TRUE';

Quad Tree indexing

SELECT parks.name FROM parks, rivers WHERE sdo_geom.relate(parks.geometry, rivers.geometry, 'OVERLAPBDYINTERSECT') = 'OVERLAPBDYINTERSECT';

Oracle Spatial Operators, Functions, and Procedures.

  • Geometry Functions

    This chapter contains descriptions of the geometry functions, which can be grouped into the following categories:
    • Relationship (True/False) between two objects: RELATE, WITHIN_DISTANCE
    • Validation: VALIDATE_GEOMETRY, VALIDATE_LAYER
    • Single-object operations: SDO_ARC_DENSIFY, SDO_AREA, SDO_BUFFER, SDO_CENTROID, SDO_CONVEXHULL, SDO_LENGTH, SDO_MBR, SDO_POINTONSURFACE
    • Two-object operations: SDO_DISTANCE, SDO_DIFFERENCE, SDO_INTERSECTION, SDO_UNION, SDO_XOR
    The geometry functions are listed Table 11-1, and some usage information follows the table.
    Table 11-1 Geometry Functions
    FunctionDescription
    SDO_GEOM.RELATE  Determines how two objects interact.
    SDO_GEOM.SDO_ARC_DENSIFY  Changes each circular arc into an approximation consisting of straight lines, and each circle into a polygon consisting of a series of straight lines that approximate the circle.
    SDO_GEOM.SDO_AREA  Computes the area of a two-dimensional polygon.
    SDO_GEOM.SDO_BUFFER  Generates a buffer polygon around a geometry.
    SDO_GEOM.SDO_CENTROID  Returns the centroid of a polygon.
    SDO_GEOM.SDO_CONVEXHULL  Returns a polygon-type object that represents the convex hull of a geometry object.
    SDO_GEOM.SDO_DIFFERENCE  Returns a geometry object that is the topological difference (MINUS operation) of two geometry objects.
    SDO_GEOM.SDO_DISTANCE  Computes the distance between two geometry objects.
    SDO_GEOM.SDO_INTERSECTION  Returns a geometry object that is the topological intersection (AND operation) of two geometry objects.
    SDO_GEOM.SDO_LENGTH  Computes the length or perimeter of a geometry.
    SDO_GEOM.SDO_MAX_MBR_ORDINATE  Returns the maximum value for the specified ordinate (dimension) of the minimum bounding rectangle of a geometry object.
    SDO_GEOM.SDO_MBR  Returns the minimum bounding rectangle of a geometry.
    SDO_GEOM.SDO_MIN_MBR_ORDINATE  Returns the minimum value for the specified ordinate (dimension) of the minimum bounding rectangle of a geometry object.
    SDO_GEOM.SDO_POINTONSURFACE  Returns a point that is guaranteed to be on the surface of a polygon.
    SDO_GEOM.SDO_UNION  Returns a geometry object that is the topological union (OR operation) of two geometry objects.
    SDO_GEOM.SDO_XOR  Returns a geometry object that is the topological symmetric difference (XOR operation) of two geometry objects.
    SDO_GEOM.VALIDATE_GEOMETRY  Determines if a geometry is valid.
    SDO_GEOM.VALIDATE_LAYER  Determines if all the geometries stored in a column are valid.
    SDO_GEOM.WITHIN_DISTANCE  Determines if two geometries are within a specified distance from one another.

No comments:

Post a Comment