Geometry Snapping using JTS in Oracle

In my exploration of the possibilities of using Java Topology Suite’s (JTS) robust algorithms with Oracle SDO_GEOMETRY I have moved to expose three methods within JTS’s GeometrySnapper (com.vividsolutions.jts.operation.overlay.snap) class: snap – Snaps two geometries to each other with both being able to move. snapTo – Snaps the vertices of the source geometry to the verticesRead More

Exposing JTS’s MinimumBoundingCircle functionality

Today I decided to expose the Java Topology Suite’s (JTS) MinimumBoundingCircle functionality via the Spatial Companion For Oracle (SC4O) installer and package. The MinimumBoundingCircle PL/SQL wrappers I have created are: Here are some examples. Now let’s test and visualise some lines and circles. Which look like: 1. Line !http://www.spatialdbadvisor.com/images/134.png! 2. Rectangle !http://www.spatialdbadvisor.com/images/135.png! I hope thisRead More

Using JTS’s Comparison Functions – HausdorffSimilarityMeasure & AreaSimilarityMeasure with SDO_GEOMETRY

There is often a need to compare SDO_GEOMETRYs to see if a geometry has changed or not. The SDO_GEOM.RELATE function is useful in this regards where two geometries are EQUAL but it is not fine-grained enough to help understand how different two things are. The Java Topology Suite (JTS) has two very useful match algorithmsRead More

Handy way of systematically fixing polygon geometries with 13349 and other errors

One often processes sdo_geometry data looking for errors with SQL we get errors in the SQL that stop us seeing what the result is. So, how do we find out what is in error? The following bit of anonymous PL/SQL is helpful in this situation. Note the line: Geometry with ID – 53 – failedRead More

Standalone CENTROID package now available for download

My CENTROID package is very popular but people have to download the spatialdbadvisor_oracle_spatial_types_and_packages.zip package to get it. I have now created a standalone download for the CENTROID package. This is available from the Download Code, Packages and Installers link on the Source Code Documentation / Download on the main page. This package contains: CENTROID_package.sql CENTROID_package_test.sqlRead More

Free Union, Intersection, Xor and Difference Functions for Oracle Locator – Part 4 Processing Geodetic data

As I have indicated in this series, the Java Topology Suite (JTS) collection of algorithms on which this implementation is based, currently does not support geodetic computations. Simply put, if your data is longitude/latitude then the results of any computations will be inaccurate. If you wish this package to work geodetic data and produce correctRead More

Configurable Buffer: JTS and Oracle

In the Version History notes for the latest release 1.12 of the Java Topology Suite is the following: Added ability to compute Single-Sided Buffers (invoked via BufferOp and BufferParameters) Now, this is worth investigating. What I have done is taken the GEOPROCESS package I have been describing recently and exposed both the JTS Buffer capabilityRead More