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

Buffering one side of a linestring – ST_OneSidedBuffer


Two practical uses of ST_Parallel occur which are not difficult to create. The first is the ability to use the parallel line generated on one side of a line with the original line to create a square buffer on that side. This is done by:

  • Taking the original linestring (or each linestring in a multiline string in turn) and creating a parallel line to the left or right

  • If a parallel line is generated on the left, then reverse that line (SDO_UTIL.Reverse_Linestring) to ensure the correct vertex rotation of the polygon outer ring that is generated

  • Append the reversed parallel line to the original line

  • To close the polygon ring, add the first vertex of the original line on to the appended line

  • Changing the sdo_gtype of the new geometry to that of a polygon

  • If no smoothing has occurred, create SDO_ELEM_INFO_ARRAY containing 1,1003,1 only; otherwise, prefix the appended linestring's sdo_elem_info array that contains circular arcs with 1,1005, n, where...