gpt4 book ai didi

postgresql - ST_Overlaps 和 ST_intersects

转载 作者:行者123 更新时间:2023-11-29 12:57:04 26 4
gpt4 key购买 nike

我有以下查询:-

SELECT 
ST_Overlaps(a,b) AS a_overlap_b
FROM
(SELECT ST_GeomFromText
('LINESTRING(-118.291686 34.018886,-118.292677 34.022562,-118.291231 34.025650,-118.2906224 34.0244091,-118.286493 34.020362)')
AS a,
ST_GeomFromText
('LINESTRING(-118.282340 34.018824,-118.289132 34.020923,-118.287198 34.023338,-118.282791 34.021858,-118.280270 34.022503)')
AS b)
AS Foo)

当我使用 ST_Overlaps 运行此查询时,它会给出 false,而 ST_Intersects 会给出 true。但是当我构建 KML 文件并在谷歌地球中可视化它时,我也看到两个多边形重叠。谁能告诉我为什么?

最佳答案

将 Geometry 更改为多边形而不是线串。

关于postgresql - ST_Overlaps 和 ST_intersects,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40346523/

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