Extracting Inner Rings Changed Ordinate Ordering: A Trap For Players Who Don’t Read Documentation!

In Developing Some Ideas For The Compression/Decompression Of Sdo_Geometry Objects, I Had Cause To Create Two PL/SQL Functions called Geocompress and Geodecompress. I Have Not Done This For A While And Slapped Myself When I Ran Into something I Should Have Known Would Arise, as I have seen it before, and because it is documentedRead More

PLS-00306: wrong number or types of arguments in call to ‘SDO_GEOMETRY’

At the business I am currently contracted to to provide database modeling, data quality analysis, PLSQL development and spatial expertise, an application was having problems querying a WFS server (MapGuide, using FDO to access an Oracle 11gR2 database) with a WFS filter using a very large polygon. (All the issues seem to be with gettingRead More

How far inside, is inside? Measuring actual distance.

One issue that confuses a lot of spatial database practitioners is that the result of measuring the distance between a geometry object inside a polygon and that polygon’s boundary is zero (0). Here is an example. This looks like: Standard distance determination shows the problem: Here is a trick that will allow for the calculationRead More

Noding and building a polygon from single, overlapping linestrings

The Spatial Companion 4 Oracle (SC4O) package (built using Java Topology Suite components) contains a method called ST_PolygonBuilder that can then form polygons from linestrings. However, ST_PolygonBuilder will not form polygons where it detects an unformed intersection: in this situation ST_PolygonBuilder has to be used with another SC4O method called ST_NodeLinestrings. ST_NodeLinestrings forms all intersectionsRead More

ST_VertexN / ST_PointN – Extracting a specific point from any geometry

I have published a number of times and implementation of functions what would extract a specific point from any geometry object. These appear in my LINEAR PL/SQL package and the T_GEOMETRY object that was published as part of the PACT book I wrote with Dr Siva Ravada. When working for a customer recently I hadRead More

Convert Single Point stored in SDO_ORDINATES to SDO_POINT_TYPE

Oracle Spatial offers two ways of storing a single point: In SDO_POINT_TYPE structure In SDO_ORDINATE_ARRAY Examples include: SDO_GEOMETRY(2001,NULL,SDO_POINT_TYPE(12, 14, NULL),NULL,NULL)) SDO_GEOMETRY(2001,NULL,NULL,SDO_ELEM_INFO_ARRAY(1,1,1),SDO_ORDINATE_ARRAY(12,14)) Oracle recommends the storage of single points using the SDO_POINT_TYPE structure. There are, of course, a number of situations where this is not possible or recommended: Storage using the SDO_POINT_TYPE structure is impossible ifRead More

Analyzing Spatial Query Performance Improvements in Oracle Spatial and Graph 12c Through Cross-Vendor Comparison

I have written an analysis of Oracle 12c’s new spatial performance improvements. The analysis was conducted by comparing what Oracle is offering in Oracle Spatial 12c against two other database types that have a reputation for performance and functionality. The report is available at the following link Accessing the Improvements These spatial performance improvements areRead More

Aggregate APPEND Islands and XOR polygons

For those not on 12cR1, or even perhaps if you are, the following two requirements came about at a customer site recently. Aggregate Append At that site (running 11gR2), there arose a need to aggregate all the islands of Australia into a single multi-polygon sdo_geometry. The first approach was to use SDO_AGGR_UNION (the customer isRead More