[OSM-talk-fr] Import corine (sisi ça se rapproche !)
Emilie Laffray
emilie.laffray at gmail.com
Sam 12 Sep 19:18:35 UTC 2009
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
-------------- section suivante --------------
Une pièce jointe autre que texte a été nettoyée...
Nom: signature.asc
Type: application/pgp-signature
Taille: 195 octets
Desc: OpenPGP digital signature
URL: <http://lists.openstreetmap.org/pipermail/talk-fr/attachments/20090912/5c4fea72/attachment.sig>
Plus d'informations sur la liste de diffusion Talk-fr