[Gfoss] SpatiaLite Cookbook: SQL error: no such function: RTreeIntersects

cesare gerbino cesaregerbino a gmail.com
Dom 5 Gen 2014 11:08:35 CET


Ciao a tutti,

ho ripreso per approfondire una cosa SpatialLite Cookbook e sto usando
l'ultima versione di spatialite_gui.

Provando ad eseguire la ricetta 12 "Dintorni" che è quella che mi
interesserebbe ho notato che provando ad eseguirla ottengo un errore che è
il seguente:

SQL error: no such function: RTreeIntersects

Cercando un po nella rete sembra che sia dovuto al fatto che la funzione in
questione sia "deprecata" se non ho inteso male.

Vista quindi la select riportata nel manuale ......

SELECT lc1.lc_name AS "Tuscan Local Council",
c1.county_name AS "Tuscan County",
lc2.lc_name AS "Neighbour LC",
c2.county_name AS County,
r2.region_name AS Region
FROM local_councils AS lc1,
local_councils AS lc2
JOIN counties AS c1
ON (c1.county_id = lc1.county_id)
JOIN counties AS c2
ON (c2.county_id = lc2.county_id)
JOIN regions AS r1
ON (r1.region_id = c1.region_id)
JOIN regions AS r2
ON (r2.region_id = c2.region_id)
WHERE r1.region_name LIKE 'toscana'
AND r1.region_id <> r2.region_id
AND ST_Touches(lc1.geometry, lc2.geometry)
AND lc2.ROWID IN (
SELECT pkid
FROM idx_local_councils_geometry
WHERE pkid MATCH RTreeIntersects(
MbrMinX(lc1.geometry),
MbrMinY(lc1.geometry),
MbrMaxX(lc1.geometry),
MbrMaxY(lc1.geometry)))
ORDER BY c1.county_name, lc1.lc_name;

come posso modificarla per ottenere lo stesso risultato?

Grazie mille anticipatamente

 Cesare


Cesare Gerbino

http://cesaregerbino.wordpress.com/
http://www.facebook.com/cesare.gerbino
http://www.facebook.com/pages/Cesare-Gerbino-GIS-Blog/246234455498174?ref=hl
https://twitter.com/CesareGerbino
http://www.linkedin.com/pub/cesare-gerbino/56/494/77b
-------------- parte successiva --------------
Un allegato HTML è stato rimosso...
URL: <http://lists.gfoss.it/pipermail/gfoss/attachments/20140105/810eaf3f/attachment-0001.html>


Maggiori informazioni sulla lista Gfoss