GIS buffer value degree to meters with spatiallite

前端 未结 2 416
爱一瞬间的悲伤
爱一瞬间的悲伤 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:09

    temporary transform your geometry to a metric projection (eg UTM) if i assume your current projection is WGS84 try the following statment

     transform (buffer (transform (B.geometry, #projection), #dist), 4326))
    

    -in #projection: your new projection, eg: 32631 for WGS 84 / UTM zone 31N (choose the projection that fits your Zone)

    -in #dist: distance in meters

    (4326 for WGS84)

    0 讨论(0)
  • 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

    0 讨论(0)
提交回复
热议问题