1. Right, you can only use TRUE for the value. Here you have the "positive" version:
SQL> select c.feature_name from topo_states c, topo_states s where s.feature_name='New York' and sdo_touch(c.feature, s.feature)='TRUE';
You have a few options. The simplest solution is to just use a NOT to make it "negative" such as:
SQL> select c.feature_name from topo_states c, topo_states s where s.feature_name='New York' and NOT sdo_touch(c.feature, s.feature)='TRUE';
From the manual:
NOT: Returns TRUE if the following condition is FALSE. Returns FALSE if it is TRUE. If it is UNKNOWN, it remains UNKNOWN.
If that performs poorly, we can give you something more complex.
2. I'm not sure exactly what you are asking. Yes, sdo_touch will shows those that touch, or you can use NOT to show those that do not.
don123 wrote:(2) I want to check whether all vertices shared by two adjacent polygons are same or not so that any gaps in adjacent polygons can be identified. I have tested with sdo_touch, as you said it is showing as touch.
That is because they do TOUCH, if not for all of the sides of the polygon. With the default operators there is no way to find slivers or gaps between polygons (I've searched for this myself). You'll have to analyze the sides yourself (of the top of my head you could try to examine the intersection: if that is one contiguous line then there is no gap, if it consists of two or more lines you are likely to have a gap/sliver).
Or you could turn your polygons into a Topology and use SDO_TOPO_MAP.VALIDATE_TOPOLOGY. I haven't used that myself, but looking at the docs it seems this might do what you want to achieve.
Validate_topology does not report these issues as the topology is valid even if there are gaps between these geometries.
In topology model, these gaps are treated as faces.
You can create one feature geometry for each of the faces in the topology and analyze these feature geometries. If you find very small area polygons
then you know there are gaps. Similarly, you can look for very small edges to see if there are slivers.
FACES tables have MBR geometry as sdo_geometry, i can measure area of these rectangles. Kindly elaborate on the following.
(1) Do I need to create feature geometry from faces before measuring area ?
(2) In analyzing polygons, small area definition varies...any suggestions on this ?
In the case of lines, edges with small length can be analyzed for overshoot, but how to identify if edge is not snapping (or not touching ) with other line or polygon.
Do I need to use the spatial operator TOUCH in this case ? Is there any other way of doing this ?
It all depends on what level of accuracy you want for gap detection.
You can measure the area of the MBR geometry: but you know this is approximate area. So if this is ok for your
application, then you can go with this approach.
If you go with the features for faces, any geometry that has an area close to the tolerance can be considered a small polygon.
Any any polygon with a perimeter close to 4 times the tolerance is also very small.
But this all depends on your application and what is considered a gap by the application.
The loadWindow operation queries the FACE$ table to find the faces that should be loaded into the TopoMap.
That query does a sdo_anyinteract operator call against the MBR_GEOMETRY column.
Since there is no explicit geometry stored for the faces, the MBR_GEOMETRY column is the column we use for spatial queries.