Free version of sdo_length

For users of 10gR2 Locator not licensed for Spatial, the use of sdo_geom.sdo_length is forbidden. So is use of sdo_geom.sdo_length. However, use of sdo_geom.sdo_distance is allowed for Locator users. The sdo_geom.sdo_distance function can be used to construct an sdo_length alternative function that is fully licensed. Here is one such attempt: A quick and simple test.Read 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

EXPORTER

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

String Tokenizer for Oracle

UPDATED FUNCTION AT END OF ARTICLE RETURNS SEPARATORS We often have need of string tokenizers in applications. Here is one for Oracle based on work by Pawel Barut. Here are my, simple, tests. Result. token LineString MultiLineString MultiPoint MultiPolygon Point Polygon Result. token The rain in spain stays mainly on the plain Updated Function SometimesRead 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

Reducing 5 Vertex Polygon to Optimized Rectangle

I had occasion to convert a set of 5 vertex polygons that defined grid squares to their optimized rectangle equivalent. To do this I created a simple function as follows. Which can then used as follows: Update On the basis of the excellent comments made by Farid Cheraghi, I have included his rectangle check (whichRead More