Even old dogs like me forget things and have to learn them again. You know, I am sure that I knew that SDO_GEOM.RELATE was a Spatial licensed feature and not available in Locator, but I clean forgot until a situation with a customer required me to look at an alternative.
The reason is because this customer is trying to reduce their Oracle license costs (as part of a future migration to SQL Server) by dropping their Enterprise license and going back to Standard Edition. As part of this, an audit of Spatial feature usage showed that a limited number of functions were being used eg SDO_UNION and one or two SDO_LRS functions but what I had forgotten about was the use of SDO_GEOM.RELATE.
Now my SC4O wrapper over the Java Topology Suite 1.12 has been a great success but did not include a replacement for RELATE. Dipping in to the JTS toolkit I have found, and now exposed, the relevant components to be able to release a “replacement” for SDO_GEOM.RELATE.
I put “replacement” in inverted commas as it does not replace SDO_GEOM.RELATE exactly as it is implemented. To do so would require another 3 or 4 days work or testing but I can see little value in doing so. If anyone is interested in what this work might entail please contact me.
Anyway, here is the SC4O function wrapper:
/**
* ST_Relate
* Implements a license free version of sdo_geom.RELATE.
* @note Supports JTS named topological relationships and not Oracle specific keywords like OVERLAPBDYDISJOINT
* @param p_geom1 : sdo_geometry : geometry which will be compared to second
* @param p_mask : varchar2 : Mask containing DETERMINE, ANYINTERACT or a list of comma separated topological relationships
* @param p_geom2 : sdo_geometry : geometry which will be compared to first.
* @param p_precision : number of decimal places of precision of a geometry
* @return String : Result of processing
* @throws SQLException
* @history Simon Greener, November 2011, Original coding.
ST_Relate is downloadable as part of the C4O package.
I hope this is of interest to someone.
Comment [2]
Hello I have found you web site when googling about oracle spatial.It helped us a lot we learned so much from this site.
In our company we have a small GIS project we were using oracle sdo_relate operator for free but now we have to use sdo_geom.relate which is not free .Today our only the thing that we have to use sdo_geom.relate function and we do not want to pay to oracle.
So we are interested with your sdo_geom.relate replacement.Now how can we test your PL/sql package.I checked it’s not in the download section.
I have one more question we are reaching you from Turkey do you have any partner in Turkey that we could get support or training?Sometimes we really need it but we do have any option.
Again thank you for these sharings.
Best regards
Ümit KÖSE
Deputy IT Manager at Yurtiçikargo Servisi A.Ş
contact 0090 212 365 28 57
> Comment: Hello I have found you web site when googling about oracle spatial.It helped us a lot we learned so much from this site.
I am pleased as that is what it was set up to do: help real practitioners apply spatial solutions to their business problems in a cost effective manner.
> In our company we have a small GIS project we were using oracle sdo_relate operator for free but now we have to use sdo_geom.relate which is not free .Today our only the thing that we have to use sdo_geom.relate function and we do not want to pay to oracle. So we are interested with your sdo_geom.relate replacement.Now how can we test your PL/sql package.I checked it’s not in the download section.
The Relate function is actually now called ST_Relate (I will modify the posting as it was from before the releae of SC4O) and is a part of my Spatial Companion 4 Oracle (SC4O) PL/SQL Package + Java. If you are running XE this approach will not work because of the Java requirement: you have to run a minimum of Standard Edition.
So, I suggest you download the SC4O package from my website and install using the appropriate install script.
> I have one more question we are reaching you from Turkey do you have any partner in Turkey that we could get support or training? Sometimes we really need it but we do have any option.
No I do not have any partner in Turkey as the “products” on my website – including the GeoRaptor extension for SQL Developer 3.x – are all open source and free. I am linked to companies in Turkey via my LinkedIn account. I can ask them if you are interested? If not, I can provide remote mentoring services in which I guide one of your staff (must speak English I am afraid as I am rather mono-lingual) in the application of specific functionality to your problems.
> Again thank you for these sharings.
My pleasure. I hope they are useful.
BTW I do provide services to improve or extend any of the free code on my website. I would prefer to charge for major functional work (very reasonable rates) but normally do not charge for fixing existing functionality.
Comment [2]
Hello I have found you web site when googling about oracle spatial.It helped us a lot we learned so much from this site.
In our company we have a small GIS project we were using oracle sdo_relate operator for free but now we have to use sdo_geom.relate which is not free .Today our only the thing that we have to use sdo_geom.relate function and we do not want to pay to oracle.
So we are interested with your sdo_geom.relate replacement.Now how can we test your PL/sql package.I checked it’s not in the download section.
I have one more question we are reaching you from Turkey do you have any partner in Turkey that we could get support or training?Sometimes we really need it but we do have any option.
Again thank you for these sharings.
Best regards
Ümit KÖSE
Deputy IT Manager at Yurtiçikargo Servisi A.Ş
contact 0090 212 365 28 57
— ümit köse · 11 September 2012, 03:51 · #
Ümit,
> Comment: Hello I have found you web site when googling about oracle spatial.It helped us a lot we learned so much from this site.
I am pleased as that is what it was set up to do: help real practitioners apply spatial solutions to their business problems in a cost effective manner.
> In our company we have a small GIS project we were using oracle sdo_relate operator for free but now we have to use sdo_geom.relate which is not free .Today our only the thing that we have to use sdo_geom.relate function and we do not want to pay to oracle. So we are interested with your sdo_geom.relate replacement.Now how can we test your PL/sql package.I checked it’s not in the download section.
The Relate function is actually now called ST_Relate (I will modify the posting as it was from before the releae of SC4O) and is a part of my Spatial Companion 4 Oracle (SC4O) PL/SQL Package + Java. If you are running XE this approach will not work because of the Java requirement: you have to run a minimum of Standard Edition.
So, I suggest you download the SC4O package from my website and install using the appropriate install script.
> I have one more question we are reaching you from Turkey do you have any partner in Turkey that we could get support or training? Sometimes we really need it but we do have any option.
No I do not have any partner in Turkey as the “products” on my website – including the GeoRaptor extension for SQL Developer 3.x – are all open source and free. I am linked to companies in Turkey via my LinkedIn account. I can ask them if you are interested? If not, I can provide remote mentoring services in which I guide one of your staff (must speak English I am afraid as I am rather mono-lingual) in the application of specific functionality to your problems.
> Again thank you for these sharings.
My pleasure. I hope they are useful.
BTW I do provide services to improve or extend any of the free code on my website. I would prefer to charge for major functional work (very reasonable rates) but normally do not charge for fixing existing functionality.
regards
Simon
— Simon Greener · 11 September 2012, 09:24 · #