Last active
May 11, 2016 15:15
-
-
Save knutole/6114943f8e6e04cb66479ca1f1327b95 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
# second problem | |
select row_to_json(t) from (SELECT rid, pvc FROM file_pszjkuicfjvxvizbygbq, ST_ValueCount(rast,1) AS pvc WHERE st_intersects(st_transform(st_setsrid(ST_geomfromgeojson('{"geometry":{"type":"Polygon","coordinates":[[[9.31640625,60.88770004207789],[9.31640625,61.48075950007598],[10.8984375,61.48075950007598],[10.8984375,60.88770004207789],[9.31640625,60.88770004207789]]]}}'), 4326), 3857), rast) as t; | |
error running query { [Error: ERROR: unknown GeoJSON type | |
# first problem, solved! | |
select row_to_json(t) from ( | |
SELECT rid, pvc FROM file_pszjkuicfjvxvizbygbq, ST_ValueCount(rast,1) | |
WHERE st_intersects( | |
st_transform( | |
st_setsrid( | |
ST_geomfromgeojson( | |
'{"geometry":{"type":"Polygon","coordinates":[[[9.31640625,60.88770004207789],[9.31640625,61.48075950007598],[10.8984375,61.48075950007598],[10.8984375,60.88770004207789],[9.31640625,60.88770004207789]]]}}' | |
), 4326 | |
), 3857 | |
), rast | |
) AS pvc | |
) as t; | |
error running query { [Error: ERROR: syntax error at or near "AS" | |
LINE 1: ...625,60.88770004207789]]]}}'), 4326), 3857), rast) AS pvc) as... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment