Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

My spatial database is Oracle. We are wondering if we can use basic Oracle Locator or need to get the more expensive, full, Oracle Spatial.

My application's requirements include having to be able to query "which geometries in the spatial db intersect this geometry X".

The whole locator / spatial issue is a bit confusing since it looks like Oracle initially installs all Oracle Spatial features even if you are just using basic Oracle db and do not have license for full Oracle Spatial. And you may end up using the Spatial features by mistake: http://www.spatialdbadvisor.com/oracle_spatial_tips_tricks/55/oracle-locator-vs-enterprise-licensing-the-sdogeom-package

What I understand of Oracle documentation http://docs.oracle.com/cd/E11882_01/appdev.112/e11830/sdo_locator.htm#SPATL340 is that geometry function SDO_GEOM.SDO_INTERSECTION is not supported by Oracle Locator.

So does this mean that we really need full Oracle Spatial license to fulfill the requirements? Or is there some other way then "SDO_GEOM.SDO_INTERSECTION" of finding about whether areas intersect?

We are using GeoServer on top of Oracle (and accessing the geometries with WFS-T). Does this change anything, will the intersection be somehow calculated in GeoServer (doubt it?) or will the intesection-calculation have to be done in Oracle (probably?)?

share|improve this question
    
I merged your two accounts, Janne. –  whuber Oct 15 '12 at 13:52
    
this is a truly bizarre issue, I had no idea that Oracle was shipping XE with unlicensed features that I'm not supposed to use. Whose dumb idea was this? –  tomfumb Oct 15 '12 at 18:28
add comment

2 Answers

up vote 1 down vote accepted

The Oracle Spatial 10gR1 user guide lists supported Locator functionality here. This page links to another page that describes functions supported by Locator.

This list includes SDO_RELATE, which is another approach to checking for geometry intersections.

e.g. (from the SDO_RELATE section)

  SELECT c.mkt_id, c.name
  FROM cola_markets c
  WHERE SDO_RELATE(c.shape,
    SDO_GEOMETRY(2003, NULL, NULL,
      SDO_ELEM_INFO_ARRAY(1,1003,3),
      SDO_ORDINATE_ARRAY(4,6, 8,8)),
    'mask=anyinteract') = 'TRUE';

The intersection query will be handled by Oracle, not GeoServer. I once had to trace a GeoServer WMS query in Oracle and I'm pretty sure it used the SDO_RELATE approach, but you might want to verify this using your own trace, scanning through the GeoServer source, or posting a question on the GeoServer users mailing list

share|improve this answer
    
Thanks! I guess I need to experiment with that. 11g documentation states that SDO_GEOM.RELATE is not included in Locator. It also states that SDO.RELATE is included in Locator. Being a SDO newbie, I have no idea about the differences between those two methods. I found out milesjordan.com/index.php/2009/11/10/… which hints that difference is how spatial indexes are used. This is consistent with 11g doc "Locator includes...Spatial operators (described in Chapter 19) that use the spatial index for performing spatial queries" –  Janne Mattila Oct 16 '12 at 6:27
    
do you have a link for the 11g docs that explain the licensing of SDO_GEOM.RELATE and SDO_RELATE? This seems totally bizarre. AFAIK all spatial operations use the spatial index, but I have no idea how different functions would use the index differently, or why that would be the deciding factor in licensing. –  tomfumb Oct 16 '12 at 16:25
    
docs.oracle.com/cd/E11882_01/appdev.112/e11830/… states "Locator includes: All SDO_GEOM package subprograms except for the following: SDO_GEOM.RELATE,...". Also it states "Locator includes Spatial operators (described in Chapter 19) that use the spatial index for performing spatial queries" and chapter 19: docs.oracle.com/cd/E11882_01/appdev.112/e11830/… includes SDO_RELATE –  Janne Mattila Oct 19 '12 at 5:40
    
right, I think the difference between SDO_GEOM.RELATE and SDO_RELATE is that .RELATE is more sophisticated - it tells you the spatial relationship between any number of geometries and 1 test geometry. _RELATE only returns a yes/no indicating if any number of features match the relationship you explicitly identifed, e.g. 'anyinteract'. Compare the results provided for the docs' examples on each function and you can see the difference. The problem you originally described only requires _RELATE so it's Locator friendly –  tomfumb Oct 19 '12 at 14:43
add comment

There is the big difference between SDO_GEOM.RELATE and SDO_RELATE.

The first argument of SDO_RELATE specifies a geometry column in a table. So, at least one geometry object must be located in a table. It is the limitation. On the other hand SDO_RELATE can use the spatial index, so it works fast.

SDO_GEOM.RELATE doesn’t care about the geometry location. Imagine, you created an application that don’t use Oracle table at all but uses another geometry sources, like user UI input or geometry created by application itself. Then you can use SDO_GEOM.RELATE directly, you don’t need to save the geometry in a temporally table and then run SDO_RELATE.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.