Spatialite cookbook r #14 - not st_disjoint

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Spatialite cookbook r #14 - not st_disjoint

Beppe
This post was updated on .
Salve a tutti,
perdonate la mia inesperienza ma sto scervellandomi  senza arrivare a capo della funzione st_disjoint nel contesto della ricetta #14:

SELECT lc1.lc_name AS "Local Council",
  c.county_name AS County,
  r.region_name AS Region
FROM local_councils AS lc1
JOIN counties AS c ON (
  c.county_id = lc1.county_id)
JOIN regions AS r ON (
  r.region_id = c.region_id)
LEFT JOIN local_councils AS lc2 ON (
  lc1.lc_id <> lc2.lc_id
  AND NOT ST_Disjoint(lc1.geometry, lc2.geometry)
  AND lc2.ROWID IN (
    SELECT ROWID
    FROM SpatialIndex
    WHERE f_table_name = 'local_councils'
      AND search_frame = lc1.geometry))
GROUP BY lc1.lc_id
HAVING Count(lc2.lc_id) = 0
ORDER BY lc1.lc_name;

Io (sbagliando) al posto di
NOT ST_Disjoint(lc1.geometry, lc2.geometry)
avrei messo
ST_Disjoint(lc1.geometry, lc2.geometry),
qualcuno può spiegarmi perchè invece va aggiunto "NOT"?

Grazie
Beppe