bonjour,

dans la série j'apprend a utiliser sql,

avec une base osm2pgsql, j'ai utilisé cette requete avec pgadmin et cela
fonctionne
SELECT 
        b1.osm_id AS id1,
        b2.osm_id AS id2,
        st_area(ST_Intersection(b1.way, b2.way)) as SurfaceInt,
        st_area(b1.way) as Surface1,
        st_area(b2.way) as Surface2
FROM 
        planet_osm_polygon AS b1,
        planet_osm_polygon AS b2 
WHERE 
        st_isvalid(b1.way)='t' and st_isvalid(b2.way)='t' and 
        b1.building<>'no' and b2.building<>'no' and
        b1.osm_id>b2.osm_id AND
        st_intersects(b1.way, b2.way)='t' AND
        st_area(ST_Intersection(b1.way, b2.way))<>0;

(merci a l'equipe osmose...)

j'ai enregistré la requete dans un fichier mais quand j'utilise
psql -d osm -U didier -f monfichier.sql
j'ai un message erreur : erreur de syntaxe sur ou près de « SELECT »

cela doit etre une erreur de débutant ... mais la je seche !

merci d'avance
didier


_______________________________________________
dev-fr mailing list
dev-fr@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev-fr

Répondre à