Created
January 30, 2015 10:19
-
-
Save knutole/5dca257d530cf50827ea to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT row_to_json(fc) FROM ( | |
SELECT ST_AsGeoJSON(ST_Transform(ST_Intersection(lg.geometry, bbox.geom), 4326))::json As geometry, ( | |
SELECT row_to_json(t) FROM ( | |
SELECT "name","type","area","z_order") t ) As properties FROM osm_landusages As lg, ( | |
SELECT ST_Transform(ST_MakeEnvelope(-2.8125,38.82259097617711,25.312499999999986,57.326521225217064, 4326),3857) | |
as geom) as bbox | |
WHERE ST_Intersects(lg.geometry, bbox.geom) | |
AND (area > 200000000) ) fc; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment