Book Image

Applying and Extending Oracle Spatial

Book Image

Applying and Extending Oracle Spatial

Overview of this book

Spatial applications should be developed in the same way that users develop other database applications: by starting with an integrated data model in which the SDO_GEOMETRY objects are just another attribute describing entities and by using as many of the database features as possible for managing the data. If a task can be done using a database feature like replication, then it should be done using the standard replication technology instead of inventing a new procedure for replicating spatial data. Sometimes solving a business problem using a PL/SQL function can be more powerful, accessible, and easier to use than trying to use external software. Because Oracle Spatial's offerings are standards compliant, this book shows you how Oracle Spatial technology can be used to build cross-vendor database solutions. Applying and Extending Oracle Spatial shows you the clever things that can be done not just with Oracle Spatial on its own, but in combination with other database technologies. This is a great resource book that will convince you to purchase other Oracle technology books on non-spatial specialist technologies because you will finally see that "spatial is not special: it is a small, fun, and clever part of a much larger whole".
Table of Contents (20 chapters)
Applying and Extending Oracle Spatial
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Table Comparing Simple Feature Access/SQL and SQL/MM–Spatial
Index

Functions for processing two geometries


In the previous example, we constructed a Java function that processed a single Geometry object to buffer a geometry using a number of styles. In this section, we will introduce a number of functions that will process two converted SDO_GEOMETRY objects.

Spatially (Topological) comparing two geometries – ST_Relate

Oracle Spatial contains a special licensed function called SDO_GEOM.RELATE that examines two SDO_GEOMETRY objects to determine their spatial relationship.

This functionality is something that is often required when processing geometry objects and is often something Locator users look for.

The chosen PL/SQL call interface mimics the Oracle equivalent:

/**
  * ST_Relate
  * Implements a license free version of SDO_GEOM.RELATE.
  * @note Supports JTS named topological relationships and 
  *       not Oracle specific keywords like OVERLAPBDYDISJOINT
  * @param p_geom1 : SDO_GEOMETRY : Geometry compared to second
  * @param p_mask  : varchar2    : Mask...