[postgis-users] Delete lines with other lines
Martin Fafard
martin.fafard at geoprojection.com
Thu Feb 2 07:17:25 PST 2012
Hi
I'm looking for a way to deletes lines (table_A) with others lines
(table_B).
I attach an image.
I'm near the final result with the following query but "more than one
row returned by a subquery...")
delete from table_A a WHERE o.the_geom IN
(select st_linemerge (ST_Difference(a.the_geom, b.the_geom))
FROM table_B b, (SELECT distinct (st_union
(ST_Intersection(b.the_geom, a.the_geom))) as the_geom
FROM table_A a, table_B b
WHERE
(ST_Intersects(a.the_geom, b.the_geom) ) ) b);
MartinF
-------------- next part --------------
A non-text attachment was scrubbed...
Name: delete_line.jpg
Type: image/jpeg
Size: 89256 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20120202/3138eb6c/attachment.jpg>
More information about the postgis-users
mailing list