My CENTROID package is a very popular download from my website. In this article I want to expose a couple of issues that catch new users of my package. These issues are documented in the header of the relevant functions but because there is no separate end user documentation (other than the blog articles onRead More
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
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
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
One of the geoprocessing functions that seems to be poorly implemented is the ability to clip a polygon using one or more linestrings such that the result is a number of polygons. Here is an example of someone asking for help on the Oracle Technology Network’s Spatial forum: I have a task where i haveRead More
I have just added to my Java Spatial For Oracle (JS4O) project exposure of the JTS/Jaspa functions for: ST_IsValid ST_IsSimple ST_Dimension ST_CoordDim Here are the type signatures in the JTS PL/SQL package. Here is a test of these functions. I hope this is helpful to someone.
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
I have exposed the JTS/Jaspa coordinate editing functionality via the ST_DeleteVertex function within my Spatial Companion For Oracle (SC4O). Here are some examples: I hope this is useful to someone.
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
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