Le lundi 19 mars 2012 à 17:01 +0100, sly (sylvain letuffe) a écrit :
On lundi 19 mars 2012, didier2020 wrote:
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 »
Tu peux nous faire passer ton fichier monfichier.sql ?
Peut-être a-t-il été éditer avec un éditeur de texte foireux
pgadmin !
j'ai fait un copier coller du contenu vers gedit et ça fonctionne.
pgadmin met un . en debut du fichier
merci a vous 2.
didier
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_idb2.osm_id AND
st_intersects(b1.way, b2.way)='t' AND
st_area(ST_Intersection(b1.way, b2.way))0;
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_idb2.osm_id AND
st_intersects(b1.way, b2.way)='t' AND
st_area(ST_Intersection(b1.way, b2.way))0;
___
dev-fr mailing list
dev-fr@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev-fr