Recently, like many before me, I had need to create a function that converted a single SDO_GEOMETRY object to GeoJSON. The function I created is below. Note that this function: Does not support attributes (it could do via passing in a refCursor or table of record); Nor does nor does it address how to createRead More

Alternative to my SQL based GetNumRings function

When creating a new PL/SQL procedure or function, where possible, I write the algorithm in SQL first. Once the SQL is done, it then becomes comparatively easy to encapsulate the SQL in a PL/SQL procedure or function for generic use. This declarative approach is wonderful as the SQL statement can be developed independently of anyRead More


For many years now, I have had an in-database based solution to the exportation of shapefiles. It was this code that provided a base for the work I did on exporting shapefiles from the recently released GeoRaptor 3.0. This exporter package uses GeoTools and JTS, with custom code to enable the exportation of any SQLRead More

layer_gtype keyword issue when indexing linear data on 11g

I always recommend the setting of the layer_gtype property in the parameters of an mdsys.spatial_index. I have entered some details on this in a previous blog article. There has been a change to the supported layer_gtype keywords in 11g with the keywords… LINESTRING MULTILINESTRING … no longer being supported. Now, for linestrings and multi-linestrings (xx02,Read More

Free Aggregate Method for Concatenating 2D Lines in Oracle Locator 10g

The SDO_AGGR_CONCAT_LINES function in Oracle 10g and above allows for linestrings to be concatenated via GROUP BY SQL clauses. However, this function is only available for Spatial users on Enterprise Edition of the Oracle database 10g (it can be used on 11g). Locator users can, however, use the mdsys.sdo_util.concat_lines function to append two linestrings together.Read More