Bon, je viens de relancer l'import des données. J'ai changé les requetes SQL. Le systeme sera donc bien plus réactif cote overlap du fait du mécanisme que je mets en place. Voila, la commande précédente comparé a la nouvelle:
SELECT DISTINCT f."CLC:id",
MAX(ST_AREA(ST_Intersection(pop.way, f.the_geom)) * 100)
/ ST_Area(f.the_geom)
FROM planet_osm_polygon AS pop
INNER JOIN
water AS f
ON ST_intersects(pop.way, f.the_geom) = true
WHERE pop.landuse IS NOT NULL
OR pop.natural IS NOT NULL
OR pop.wood IS NOT NULL
GROUP BY f."CLC:id", f.the_geom
ORDER BY f."CLC:id";
J'ai remplacée par la commande suivante:
SELECT DISTINCT f."CLC:id",
SUM(ST_AREA(ST_Intersection(pop.way, f.the_geom)) *
100 / ST_Area(f.the_geom))
FROM planet_osm_polygon AS pop
INNER JOIN
water AS f
ON ST_intersects(pop.way, f.the_geom) = true
WHERE pop.landuse IS NOT NULL
OR pop.aeroway IS NOT NULL
OR pop.natural IS NOT NULL
OR pop.wood IS NOT NULL
OR pop.waterway='riverbank'
GROUP BY f."CLC:id", f.the_geom
ORDER BY f."CLC:id";
Bref, ça devrait attraper plus d'overlap!
Je repasserais les fichiers a Pieren des que c'est fini (probablement
demain matin) car ça risque d'être plus lent du fait du SUM et d'une
division supplémentaire par nombre d'intersections.
Emilie Laffray
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Talk-fr mailing list [email protected] http://lists.openstreetmap.org/listinfo/talk-fr

