Go to content Go to navigation Go to search

New Version PL/SQL Spatial packages released

Over the past 6 months I have had many contracts all of which contributed and idea to the latest revision of my free PL/SQL packages.

I hope these are of use to fellow Oracle Spatialliers out there.

A number of function in GEOM have been renamed to remove the AsPipelined suffix from their names.

This release includes the following:

  1. Made the packages query and use EE features only when EE is installed
  2. Java functions have been removed partly due to the lack of Java in XE (my main development platform) and partly due to a complete re-write that will include some JTS functions and the ability to write a shapefile directly from the Oracle database.
  3. The TOOLS package has had a lot of work done on it in the area of logging activity such that I will be able to bind its output to Oracle’s excellent Application Express (APEX).
  4. The GEOM package has had had some functions renamed and the following added:
    * Two SDO_Area() functions
    * Two SDO_Length() functions
    * TO_3D() function (with default Z support)
    * Fix_3D_Z() function that replaces NULL Z values with real numbers.
    * ToSdoPoint() that converts a single point whose ordinates are stored in the SDO_ORDINATE_ARRAY to one in which the ordinates are stored in SDO_POINT_TYPE() structure.

    The Distance() function has been moved to the COGO package:

    The TO_KML() function has been moved a new KML package.
  5. New KML package with the following functions:
    * Header()
    * To_KML() – A Procedure and a standalone Function
    * Footer()
    * GetDocument()

    This package can create a KML document via use of Header(), multiple TO_KML procedure calls, followed by Footer() and the GetDocument which will return the completed document to you as a CLOB.
  6. COGO package has had added: * isGeographic() function that, given an SRID, indicates TRUE if the SRID is longitude/latitude (geographic) or not.
    * Distance() overload functions for computing a distance geographic data
    * GreatCircleBearing() which computes a great circle bearing between two longitude/latitude pairs (ellipsoid can be specified).
    * Longitude/Latitude functions to complement DMS2DD
  7. CONSTANTS package has had the following “inspector” functions added:
    FUNCTION PI RETURN NUMBER;
    FUNCTION MaxNumber RETURN NUMBER;
    FUNCTION MinNumber RETURN NUMBER;
    FUNCTION MaxLong RETURN NUMBER;
    FUNCTION MinLong RETURN NUMBER;

    Simon
    October 2007

    New PL/SQL Package Upload

    Tonight I uploaded some changes to my free PL/SQL packages.

    The changes include:

    1. Addition of a NETWORK package that includes some functions for returning the start and end vertex of a linear geometry.
    2. A new TO_3D() function in the GEOM package that converts a 2D geometry to a 3D geometry.
    3. Some fixes to the loader and packages as this was the first time I had tried to load the packages into XE.

    Because of the latter, I have removed the Java function wrappers in GEOM for GML2GEOMETRY until I have done two things.

    1. Made the loader able to detect if XE/SE is the host database rather than EE
    2. I have completed the testing of the original Java version of the centroid function (in progress)
    3. Finished programming a Peano space key function in Java
    4. Modified some code that creates a shapefile from Oracle Spatial (will be called SDO2SHAPEFILE)

    Enjoy!

    regards
    Simon

    Previous