gpt4 book ai didi

postgresql - ArcMap Union 的 PostGIS 等价物

转载 作者:行者123 更新时间:2023-11-29 13:12:23 25 4
gpt4 key购买 nike

"Union" 在 PostGIS/PostgreSQL 中的等价物是什么在 ArcMap 中操作?

假设您有两个 shapefile,每个 shapefile 都有两个特征。 (PostGIS 等价物:两张表,两行多边形几何)

enter image description here

那么结果将是 1 个具有 7 个特征的 shapefile。 (PostGIS 等价物:包含 7 行几何图形的表格)

enter image description here

我查看了 ST_Intersect、ST_Union 和 ST_Collect,但找不到正确的组合。非常感谢您的帮助。

最佳答案

这是一个基于来自 gis.stackexchange 的答案的有效查询:

从 a) 读到 d):

-- d) Extract the path number and the geom from the geometry dump
SELECT
(dump).path[1] id,
(dump).geom
FROM
(
-- c) Polygonize the unioned rings (returns a GEOMETRYCOLLECTION)
-- Dump them to return individual geometries
SELECT
ST_Dump(ST_Polygonize(geom)) dump
FROM
(
-- b) Union all rings in one big geometry
SELECT
ST_Union(geom) geom
FROM
(
-- a) First get the exterior ring from all geoms
SELECT
ST_ExteriorRing(geom) geom
FROM
rectangles
) a
) b
) c

结果:

Rectangles

关于postgresql - ArcMap Union 的 PostGIS 等价物,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53283714/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com