[postgis-users] ST_Intersection

Mehmet Sirin m.sirin07 at googlemail.com
Fri May 21 06:54:28 PDT 2010


hi,
why don't you merge both operations into one sql-command?
In this case it's less difficult without using views.



2010/5/21 <jj.wag at gmx.de>

> Hi,
>
> I have a polygon table (alk_flurstuecke) and create a view with a 40-meter
> buffer on an object:
>
> CREATE VIEW buffer_flur_40 AS
> SELECT gid, ST_SetSRID(st_buffer(the_geom,40), 31466 )
> AS the_geom FROM alk_flurstuecke WHERE fkz = '0726900330002300000';
>
> No problem, Ican see it in QGIS.
> Now I try to make an intersection on this buffer-view with my table:
>
> CREATE VIEW intersect_flur_40 (gid, flur, zaehler, nenner, the_geom) AS
> SELECT p.gid, p.flur, p.zaehler, p.nenner,
> ST_SetSRID(ST_Intersection(p.the_geom, b.the_geom) ,31466)
> AS the_geom FROM alk_flurstuecke AS p, buffer_flur_40 AS b
> WHERE p.fkz <> '0726900330002300000' AND IsEmpty
> (ST_Intersection(p.the_geom, b.the_geom) ) = FALSE;
>
> This view is created without errors too but there is no result. If I try to
> load the view in QGIS it diapears.
> Any idea?
>
> Jo
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20100521/40746a5e/attachment.html>


More information about the postgis-users mailing list