Example Queries - SpotScore/spotscore GitHub Wiki
Example 1
Returns buildings that are at max 200 meters distance from a point with coordinates lon: 26.74010 lat: 58.39770
SELECT
*
FROM
planet_osm_polygon pop
WHERE
pop.building = 'yes'
AND ST_DWithin(
Geography(
ST_Transform(
pop.way,
4326
)
),
ST_GeographyFromText('SRID=4326;POINT(26.74010 58.39770)'),
200
);