GIS buffer value degree to meters with spatiallite

前端 未结 2 417
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-16 00:43

I am new to Spatialite. I have following query:

select A.* 
from linka as A, pointa as B 
where Contains(Buffer(B.Geometry, 100), A.Geometry)
2条回答
  •  野的像风
    2021-01-16 01:14

    If You are using SQL server 2008 or later, You should be able to use spatial types

    1. lets assume linka contains geography column, and its name is geo, and it contains Points
    2. dont forget to create spatial index !
    3. try this

      DECLARE @buffer geography = geography::Point( 1.234, 5.678, 4326 ); DECLARE @distance float = 100.0;

      SELECT * from linka WHERE linka.geo.STDistance(@buffer) < @distance

提交回复
热议问题