[postgis-users] Clip a table using a donut geometry

Júlio Almeida julio.augusto.almeida at gmail.com
Mon May 16 07:31:23 PDT 2011


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20110516/212d79ac/attachment.html>


More information about the postgis-users mailing list