SHARE
TWEET

Untitled

a guest Oct 1st, 2017 77 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. SELECT row_to_json(fc)
  2.   FROM
  3.     (SELECT 'FeatureCollection' as type, array_to_json(array_agg(feats)) as features
  4.       FROM
  5.          (SELECT 'Feature' as type,
  6.                  st_asgeojson(ST_TRANSFORM((gv).geom,4326))::json as geometry,
  7.                  row_to_json((SELECT props FROM (SELECT (gv).val as value) as props )) as properties  
  8.             FROM
  9.                 (SELECT ST_PixelAsPolygons(
  10.                     (SELECT l.rast FROM jbb2016 j
  11.                
  12.                     LEFT JOIN lerhaltskartan l ON
  13.                     ST_INTERSECTS(j.geom,l.rast)
  14.                        
  15.                     WHERE gid = 82523
  16.                     )
  17.                 ) gv
  18.           ) json
  19.     ) feats
  20. ) fc;
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