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

COGO: Converting Decimal Degrees to Degrees Minutes and Seconds – and back again (PostGIS)

It is useful to have functions for converting from individual degrees, minutes and seconds to a single decimal degree value and back again. Here are some useful plPgSql functions. DMS2DD Firstly, a function to convert individual degrees, minutes and seconds values to a single decimal degree value. Now for some examples…. Result: dms2dd -44.1805555555556 Result:Read More

COGO: Finding centre and radius of a curve defined by three points (PostGIS)

Recently I had need to convert a PL/SQL Oracle Spatial function I created years ago called FindCircle to SQL Server 2008 for use in another project. That function was original work already released to the public domain as part of my free COGO package for Oracle. Here is that function for SQL Server. Note thatRead More

Line Merging or Collecting lines together: ST_LineMerger

One activity that is very common when working with linear data is to be able to take a bunch of linestrings and collect them together into a minimal set of maximum length linestrings. The Java Topology Suite (JTS) has a LineMerger class that does this very nicely. I have integrated this into my Spatial CompanionRead More

3D/4D and SRID aware Conversion functions for SDO_Geometry: WKT and EWKT

Oracle Spatial does not read or write 3D Well-known text (WKT); nor does it read/write measures. Oracle’s SDO_Geometry implementation only supports the OGC Simple Features 1.1 specification which is 2D only. What I have done is expose the Jaspa/JTS implementation of methods more 3D+ aware to PL/SQL and therefore SQL via my Spatial Companion forRead More

Topological vs Non-Topological Simplification/Generalization of Aggregated Area Geometies in Oracle

Oracle has a function, sdo_util.simplify that can simplify (generalize) the vertices describing a geometric object (that is, reduce the number in a way that maintains basic shape). However, that function only operates on a single geometry at a time. Using it on polygonal data that completely covers an area (planar enforced) can and will causeRead More