Go to content Go to navigation and search

Home

Current Oracle Spatial Blog Articles


Search

Browse

RSS / Atom

Email me

textpattern

Creative Commons License
All Blog Articles, Data Models and Free Source Code by Simon Greener, The SpatialDB Advisor is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.

Announcing the Spatial Companion For Oracle (SC4O)

Friday March 09 2012 at 14:38

KeywordsSpatial Companion for Oracle SC4O geoprocessing delaunay voronoi polyon building union intersect difference xor
Summary

This articles announces the Spatial Companion For Oracle (Sc4O) library.

Over the past 6 months or so I have been developing a set of functions, based on the Java Topology Suite (JTS) and JAvaSPAtial (Jaspa), which complement or extend the Oracle’s proprietary functions that process its SDO_Geometry objects.

These functions were initially released using a PL/SQL package and related Java class called JTS. As the project evolved, it grew to use more than JTS functionality. As such the name was changed to Spatial Companion For Oracle (SC4O). (If you are using the old JTS-named package and Java class, make sure you remove these from your database – using the old uninstaller – because installing the new version.)

SC4O works only with Oracle’s SDO_Geometry. It is NOT meant to be a replacement for the whole Oracle SDO_Geometry type system as is the case with ESRI’s ST_Geometry and Jaspa’s implementation. My use of Jaspa is only to extract and modify for use with SDO_Geometry functionality that is missing in Oracle or needed to complement Oracle.

Some functions are specifically there to provide Locator users with the ability to execute Union/Intersection/Difference and XOR geoprocessing functions without having to consider a Spatial license. These types of functions are free for all other database Spatial implementations (PostGIS, SQL Server 2008+ etc) but not Oracle.

There are also a set of useful construction functions. Functions to delaunay triangulate a set of points, create voronoi polygons, or build polygons from linestrings.

The provided text conversion functions, eg ST_GeomFromText() etc, are all 3D and 4D aware whereas Oracle’s are not. Again, they can be used with Oracle or instead of its functions.

Finally, the SC4O functions cannot fully replace Oracle’s as these functions are for planar data only (not long/lat geodetic/geographic data) and do not support circular arcs. But often they can be used alongside Oracle’s functions where particular use cases are handled better by one or the other.

I hope these functions are useful to someone out there.

Creative Commons License

post this at del.icio.uspost this at Diggpost this at Technoratipost this at Redditpost this at Farkpost this at Yahoo! my webpost this at Windows Livepost this at Google Bookmarkspost this to Twitter

Comment [4]

Downloaded the package,
Installed,
“select codesys.SC4O.ST_GeomFromText(‘POINT (10 5)’,null) as geom from dual”

ORA-29532: Java call terminated by uncaught Java exception: java.lang.ExceptionInInitializerError
ORA-06512: at “CODESYS.SC4O”, line 738

Is something missing?

Oracle Database 11g Release 11.2.0.1.0 – 64bit Production

Regards
Carlos Garcia

— CARLOS GARCIA · 24 October 2012, 04:36 · #

Carlos,

Ensure that the Java classes have been loaded:

select name from user_java_classes order by 1;

Should be around 1100 classes.

If they are not there you need to make sure that they are loaded. You may not have the right permissions (though these are checked when you run the install script).

If they are there you need to ensure that you have the right Java execute permissions. See the permissions.sql. I don’t set these for you and especially for cross-schema execution.

Let me know if this doesn’t work for you.

regards
Simon

— Simon Greener · 24 October 2012, 09:50 · #

Is it posible to install SC4O in Oracle Database 10g Enterprise Edition Release 10.2.0.4.0?
thanks

— Jorge · 7 March 2013, 22:11 · #

Yes.
It is compiled with the JDK from the 10.2.0.x database and so is Java 1.4 compliant.
It has been tested on 10.2.0.1
Simon

— Simon Greener · 8 March 2013, 09:33 · #