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

Free Union, Intersection, Xor and Difference Functions for Oracle Locator – Part 3

Here as some test on data other than just polygons. Union of two points These are two representations of the same thing. Now if we replace SDO_GEOM.RELATE with SC4O.ST_RELATE we do not get equals. The reason for this is that the SDO_Geometry to JTS Geometry converter supplied by GeoTools does not handle the sdo_elem_info_array –Read More

Free Union, Intersection, Xor and Difference Functions for Oracle Locator – Part 2

In this blog we will execute the four overlay types on two simple rectangular polygons. In addition, I have not tested “real world” polygon data using multiple projections. I am just showing what is possible. Here is the SQL that I use to create two test polygon geometries. Here are what they look like. HereRead More