Applying and Extending Oracle Spatial: Source Code Problem

Source Code

The source code for the T_GEOMETRY object which was released with my book “Applying and Extending Oracle Spatial” (co-authored with Dr Siva Ravada) is incorrect. The zip file code for chapters 6,7,8, 10 and 11 is draft code from an earlier stage of the book’s production. The final code (which include the vitally important “common” folder) was not released with the book.

I was made aware of this problem through a reader in Sweden who tried to compile the code from the wrong source.

I have requested an update of the code on the website.

Corrections

The person who made me aware of the code problem can now compile the code and has compared the LRS functions within it with those offered by Oracle’s SDO_LRS package. In doing so a small error with the way the code handled 3D unmeasured lines was identified and corrected. The result is that the LRS code produces identical results to Oracle’s except that my code does not require on to measure the linestring before it is used: it will calculate measures etc based on the slope length of an unmeasured linestring.

Precision Model

The T_GEOMETRY object has a precision model such that one can set the tolerance of a sdo_geometry object and also its ordinate decimal digits of precision. For example, a geodetic/geographic sdo_geometry can have its tolerance set to 0.05 meters (as per the Oracle documentation for use in Oracle functions such as sdo_length) but it can also have its decimal units of precision set to something like 6 or 8 (one for both lat and long). The latter allows two ordinates or length values to be compared. The ST_Locate_Measure method was inconsistent in how it compared two numbers. This has been corrected in the updated source code.

Contact Me

If you think you have found a problem with the T_GEOMETRY code, please contact me directly via this site or my email address and I will examine and correct as required..

Leave a Reply

Your email address will not be published. Required fields are marked *