I have a package that will allow you to convert a single geometry into KML or create a whole KML document from a recordset containing many geometries. It doesn’t do a whole lot, but it has been of interest to some users out there who have improved the original work. Here is an example ofRead More


The GEOM package contains a generic collection of algorithms that work on SDO_GEOMETRY objects. This package needs many TYPES to exist and also depends on other packages such as GF, CONSTANTS etc. If you are interested in this package it is best to download the complete collection of packages and have a good look atRead More


UPDATED: This package of functions underwent a revamp in early July 2012. In that revamp: ST_Locate_Point was overhauled to correctly handle both distance based segmentation of 2D lines as well as Measured geometries (p_value_Type parameter now fully handled). ST prefixes added to public functions._ T_Vector Type enhanced ST_GetVector renamed to ST_Vectorize Bugs fixed in ST_SplitRead More


I have written a PL/SQL package called SDO_ERROR that could be used to visualise geometry errors (specifically validate_geometry_with_context) and elements Additionally it focuses mainly on projected (not long/lat) data, so if you use with geodetic data do so at your own risk. Required Data Types Packaged Header The source code, which is still under activeRead More

Building Lines into Polygons in Oracle Locator / Spatial

The Spatial Companion For Oracle (SC4O) package uses the JTS Topology Suite’s (JTS) geoprocessing/overlay functions to implement free union, intersection, difference and XOR functions for Oracle Locator. SC4O also includes a function called: This function is a wrapper over the JTS’s Polygonizer() class. In essence, this function takes a collection of linestrings/multilinestrings and tries toRead More

Free Union, Intersection, Xor and Difference Functions for Oracle Locator – Part 1

Both the OGC and SQL3/MM Spatial standards for Simple Features include four standard geoprocessing operations as part of the basic type. Here is an extract from the OpenGIS’s Simple Features Specification for SQL, Revision1.1: Methods that support Spatial Analysis … Intersection(anotherGeometry:Geometry):Geometry – Returns a geometry that represents the point set intersection of this GeometryRead More

Effects of Sdo_Geometry Ordinate Precision on Storage

In this article I am going look at the effect ordinate precision has on the storage space occupied by tables containing sdo_geometry data. In a related article I will also look at the effect storage precision may have on performance (ie searching and returning data in SQL). Sdo_Geometry Coordinate Precision There is a little knownRead More

Finding Intersection Points between Line and Polygon

Today, someone emailed me and asked: I’m using sql developer and oracle spatial to develop my prototype database (I’m really a beginner in SQL), one of my task now is to query parcels (polygon) which crossed by utility pipeline (line) [… and …] to query the intersection point between polygon and line… Can you giveRead More