ST_Densify for Object PLSQL

The Java Topology Suite (JTS) has a linestring densifier function that is available in my Spatial Companion for Oracle (SC4O) solution. See here for documentation. For those who aren’t able to install SC4O (some DBAs don’t like it), there was a PL/SQL function in my the old GEOM Package implemetation on this website that allowsRead More

Optimized Rectangle to 5 Point Polygon

Here is a function that takes a any polygon whose elements are defined by an optimized rectangle and converts all elements to 5 vertex polygons. Polygon may be multi; may have non-optimized rectangle components. Does NOT process geometries with compound elements. Now let’s test the function: Results are as follows: DESCRIPTION VALIDORIGINALGEOM VGEOM POLY SingleRead 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

Circular Arcs in Geodetic Polygons

A customer presented me with an interesting problem. For some reason, a geodetic polygon object (4283) had been created within their database. (Probably an external application that supports circular arcs in geodetic polygons – SQL Server 2012 does.) The problem then was that the polygon needed to be transformed (projected) to a planar SRID. ValidatingRead More

Useful Package of Wrapper Functions for Sdo_Util.AffineTransforms

—————————————————————————————- UPDATE (21 Mar 2018): Wrapper functions have been added to the AFFINE package to provide easier access to the SDO_UTIL.AFFINETRANSFORMS function. The AFFINE package now supports three different implementations of most of its functions: Original PL/SQL functions ST_AFFINE based on SYS.UTL_NLA_ARRAY_DBL SDO_UTIL.AFFINETRANSFORMS Improved testing of the AFFINE functions has also been implemented. The AFFINERead More