PostGIS:删除重叠的多边形

发布于 2025-01-20 07:15:39 字数 150 浏览 3 评论 0原文

我有四个不同的多边形 shapefile,需要从多边形“a”中删除与多边形“b、c 和 d”相交的多边形,只留下“a”中不与任何其他图层相交的多边形的表。有没有办法在 PostGIS 中做到这一点?

一个(id,几何) b(id,几何) c(id,几何) d(id,几何)

I have four different polygon shapefiles and need to delete the polygons from polygon "a" that intersect polygons "b,c and d" leaving a table with only polygons in "a" that don't intersect any of the other layers. Is there a way to do this in PostGIS?

a(id,geom)
b(id,geom)
c(id,geom)
d(id,geom)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

不知在何时 2025-01-27 07:15:39

使用 extists()

DELETE 
  FROM <table_a> a
 WHERE EXISTS
     ( SELECT 1
         FROM <table_b> b
        WHERE ST_Intersects(a.geom,b.geom)
     )
    or EXISTS
     ( SELECT 1
         FROM <table_c> c
        WHERE ST_Intersects(a.geom,c.geom)
     )
    or EXISTS
     ( SELECT 1
         FROM <table_d> d
        WHERE ST_Intersects(a.geom,d.geom)
     )

Use EXISTS() expression, e.g.:

DELETE 
  FROM <table_a> a
 WHERE EXISTS
     ( SELECT 1
         FROM <table_b> b
        WHERE ST_Intersects(a.geom,b.geom)
     )
    or EXISTS
     ( SELECT 1
         FROM <table_c> c
        WHERE ST_Intersects(a.geom,c.geom)
     )
    or EXISTS
     ( SELECT 1
         FROM <table_d> d
        WHERE ST_Intersects(a.geom,d.geom)
     )
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文