SHARE
TWEET

Untitled

a guest Nov 19th, 2019 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. select json_build_object(
  2.                'type', 'FeatureCollection',
  3.                'features', json_agg(ST_AsGeoJSON(t.*)::json)
  4.            )
  5. FROM (SELECT parking.osm_id, parking.access, parking.name, st_transform(parking.way::geometry, 4326), ST_Distance(parking.way, point.way) distance FROM planet_osm_point point CROSS JOIN planet_osm_polygon parking WHERE point.name = 'Cortlandt Town Center (Walmart)' AND parking.amenity = 'parking' AND ST_DWithin(parking.way, point.way, 10000) ORDER BY distance ASC LIMIT 5)
  6. AS t(id, access, name, geom, distance);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top