ERROR: lwgeom_difference: GEOS Error: TopologyException: Input geom 0 is invalid: Too few points in

本文探讨了在PostGIS中使用ST_Difference函数时遇到的错误,重点是TopologyException:输入几何对象在120.125613附近存在问题。提供了针对缓冲区操作和解决方案的案例,帮助开发者理解并修复这类几何错误。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

ERROR:  lwgeom_difference: GEOS Error: TopologyException: Input geom 0 is invalid: Too few points in geometry component at or near point 120.125613752384 31.665662179977399 at 120.125613752384

select ST_Difference(
    (
        select geom from table where id=1  -- sqlA
    ),
    (
        select geom from table where id=2  -- sqlB
    )
) as boundar
select ST_Difference(
    (
        select ST_buffer(geom, -0.00) from table where id=1  -- sqlA
    ),
    (
        select ST_buffer(geom, -0.00) from table where id=2  -- sqlB
    )
) as boundar
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值