Guest User


a guest
Nov 19th, 2019
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,, 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 = '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