Gis Buffer Value Degree To Meters With Spatiallite
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) I actually want to create 100 meters
Solution 1:
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)
Solution 2:
If You are using SQL server 2008 or later, You should be able to use spatial types
- lets assume linka contains geography column, and its name is geo, and it contains Points
- dont forget to create spatial index !
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
Post a Comment for "Gis Buffer Value Degree To Meters With Spatiallite"