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

Some SDO_GEOMETRY/DIMINFO handling functions

While at my current contract employer, two functions were required to handle the conversion of DIMINFO SDO_LB/SDO_UB ranges to optimised rectangles (SDO_GEOMETRY) and the reverse. Note: GeoRaptor provides such capability for selected DIMINFO objects or to convert a map extent to its equivalent DIMINFO structure. The functions, written in PL/SQL are: ST_Diminfo2Rectangle ST_Geom2Diminfo The definitionRead 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

Announcing the Spatial Companion For Oracle (SC4O)

Over the past 6 months or so I have been developing a set of functions, based on the Java Topology Suite (JTS) and JAvaSPAtial (Jaspa), which complement or extend the Oracle’s proprietary functions that process its SDO_Geometry objects. These functions were initially released using a PL/SQL package and related Java class called JTS. As theRead More

STVertices: Wrapper over STDumpPoints

Oracle’s point dumping function, mdsys.sdo_util.getVertices is most useful. When swapping between platforms sometimes I look first for such a function in SQL Server Spatial forgetting that I named it DumpPoints Here is a “wrapper” function for STDumpPoints. Testing it…. Result x y 148 -44 148 -43 147 -43 147 -44 148 -44 147.4 -43.6 147.2Read More

CENTROID package use with ESRI’s sde.st_geometry

I have been emailed by someone who is using ESRI’s sde.st_geometry in preference to Oracle’s SDO_GEOMETRY or ST_GEOMETRY for their spatial data storage in Oracle, wanting a version of my CENTROID pl/sql package that would allow for its use with ESRI’s spatial data type. This is what I was asked: First off love your blog,Read More