Skip to content

Instantly share code, notes, and snippets.

View eightysteele's full-sized avatar

Aaron Steele eightysteele

View GitHub Profile
[[[[97.27517700195341, 5.170501232147274], [97.27518463134794, 5.169960975646973], [97.27241516113287, 5.170225143432731], [97.27462768554682, 5.171059131622371], [97.27517700195341, 5.170501232147274]]], [[[96.87304687500006, 5.252779960632495], [96.88083648681646, 5.249169826507682], [96.88083648681646, 5.248060226440373], [96.86916351318376, 5.251665115356673], [96.87304687500006, 5.252779960632495]]], [[[96.8538360595706, 5.255243778228817], [96.85416412353521, 5.255000114441202], [96.85415649414068, 5.25474023818964], [96.8538360595706, 5.255243778228817]]], [[[96.97778320312506, 5.262540817260856], [96.9755172729495, 5.118659973144531], [97.00924682617193, 5.101820945739746], [97.01476287841803, 5.054989814758414], [97.051010131836, 4.997011184692383], [97.09883117675798, 5.035748958587874], [97.1601181030274, 5.147384166717586], [97.23561859130865, 5.151420116424617], [97.4868621826173, 5.244060039520377], [97.50253295898466, 5.211801052093449], [97.48826599121094, 5.211161136627254], [97.4896774291992
{
"type":"Polygon",
"coordinates":[
[
[
16.171875,
-53.4357192066942
],
[
-165.5859375,
SELECT SUM(count) as value, 'FORMA' as name,
'alerts' as unit, '500 meters' as resolution
FROM
(SELECT COUNT(*) AS count
FROM forma_api
WHERE date <= now() - INTERVAL '1 Months'
AND ST_INTERSECTS(ST_SetSRID(ST_GeomFromGeoJSON('{"coordinates": [[[["22.5000", "3.3380"], ["21.9727", "-7.8851"], ["32.8711", "1.7575"]]]], "type": "MultiPolygon"}'), 4326),
the_geom)
GROUP BY date, iso
ORDER BY iso, date) AS alias
# Global Forest Watch API
# Copyright (C) 2013 World Resource Institute
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
$ ogrinfo --version
GDAL 1.10.1, released 2013/08/26
$ ogrinfo sad_polygons_fixed_130823.kml
ERROR 4: ERROR Parseing kml sad_polygons_fixed_130823.kml :junk after document element on line 821498 at offset 6
ERROR 4: ERROR Parseing kml sad_polygons_fixed_130823.kml :junk after document element on line 821498 at offset 6
FAILURE:
Unable to open datasource `sad_polygons_fixed_130823.kml'
def trimmer(rec):
keep_keys = ['class', 'country']
for key in rec.keys():
if key not in keep_keys:
rec.pop(key)
return rec
{
"higherclassification":"Animalia; Chordata; Aves; Ciconiiformes; Laridae",
"family":"Laridae",
"stateprovince":"Oregon",
"catalognumber":"91774",
"networks":"ORNIS",
"lifestage":"adult",
"rank":8,
"month":"6",
"decimallongitude":"-124.03817",
{
"rows":[
{
"sum":406623,
"iso":"IDN"
}
],
"total_rows":1,
"sql":"SELECT iso,sum(alerts) FROM forma_gadm_50 WHERE iso='IDN' GROUP BY iso",
"time":0.041
{:dc:publisher
"Janet Hinshaw University of Michigan Museum of Zoology<jhinshaw@umich.edu>",
:link "http://ipt.vertnet.org:8080/ipt/resource.do?r=ummz_birds",
:ipt:dwca "http://ipt.vertnet.org:8080/ipt/archive.do?r=ummz_birds",
:author "larussell@vertnet.org",
:guid
{:content "be5507b9-7abf-4b69-afe1-5ca2b7561734", :isPermaLink false},
:dc:creator
"Janet Hinshaw University of Michigan Museum of Zoology<jhinshaw@umich.edu>",
:title "UMMZ Birds Collection",
eightysteele:cascalog(develop)$ lein sub install
Retrieving lein-sub/lein-sub/0.2.1/lein-sub-0.2.1.pom from clojars
Retrieving codox/codox/0.6.4/codox-0.6.4.pom from clojars
Retrieving codox/codox.leiningen/0.6.4/codox.leiningen-0.6.4.pom from clojars
Retrieving leinjacker/leinjacker/0.4.1/leinjacker-0.4.1.pom from clojars
Retrieving org/clojure/core.contracts/0.0.1/core.contracts-0.0.1.pom from central
Retrieving org/clojure/pom.contrib/0.0.26/pom.contrib-0.0.26.pom from central
Retrieving org/sonatype/oss/oss-parent/5/oss-parent-5.pom from central
Retrieving org/clojure/core.unify/0.5.3/core.unify-0.5.3.pom from central
Retrieving org/clojure/clojure/1.4.0/clojure-1.4.0.pom from central