Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. SELECT row_to_json(fc) FROM (
  2. SELECT 'FeatureCollection' As type, array_to_json(array_agg(f)) As features FROM (
  3. SELECT 'Feature' As type, ST_AsGeoJSON(lg.geom)::json As geometry, row_to_json((id, name)) As properties FROM lines As lg) As f) As fc";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement