Thanks Ralf for your suggestion.

I solved it by doing it in two steps.
First, I created a temporary table with the donut geometry:

EXECUTE 'create table tempdonut as SELECT
ST_Difference(st_buffer(the_geom,buffer_radius), the_geom) as the_geom
      from designprocess.dp_zn_boundaries
      where type = site_name);

Second, I did de Intersects query:

EXECUTE 'INSERT INTO  tempdonut SELECT
      r.the_geom, r.gid FROM urbanenvironment.ue_ms_crossings_wegdeel_punt
AS r,  tempdonut as m
      WHERE ST_Intersects(r.the_geom, m.the_geom)';

Thanks again,

júlio almeida
_______________________________________________
postgis-users mailing list
[email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users

Reply via email to