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
#!/usr/bin/env python | |
# | |
# Copyright 2011 Jante LLC and University of Kansas | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |
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
{ | |
"collection":{ | |
"source":"World Wildlife Fund (WWF)", | |
"type":"Ecoregion", | |
"name":"World Ecoregions", | |
"description":"The WWF's Conservation Science Program (CSP) has developed a biogeographic regionalization of the Earth's terrestrial biodiversity. WWF termed the biogeographic units ecoregions, defined as relatively large units of land or water containing distinct assemblages of natural communities sharing a large majority of species, dynamics, and environmental conditions. Ecoregions represent the original distribution of distinct assemblages of species and communities.", | |
"url":"http://www.worldwildlife.org/science/ecoregions/item1267.html", | |
"agreements":{ | |
"0":"http://www.worldwildlife.org/agreement.html" | |
}, |
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
{ | |
"item":{ | |
"source":"World Wildlife Fund (WWF)", | |
"type":"Ecoregion", | |
"name":"Admiralty Island lowland rain forests", | |
"description":"", | |
"storage":{ | |
"location":"G:/MoL/....", | |
"format":"esri-shape" | |
}, |
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
{ | |
"collection":{ | |
"source":"World Wildlife Fund (WWF)", | |
"type":"Ecoregion", | |
"name":"World Ecoregions", | |
"description":"The WWF's Conservation Science Program (CSP) has developed a biogeographic regionalization of the Earth's terrestrial biodiversity. WWF termed the biogeographic units ecoregions, defined as relatively large units of land or water containing distinct assemblages of natural communities sharing a large majority of species, dynamics, and environmental conditions. Ecoregions represent the original distribution of distinct assemblages of species and communities.", | |
"url":"http://www.worldwildlife.org/science/ecoregions/item1267.html", | |
"agreements":{ | |
"0":{"url": "http://www.worldwildlife.org/agreement.html" | |
"text": "A brief overview of the TOS", |
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
vlsb-4172-1:metadata tuco$ ./iucnranges.py -d /Users/tuco/Data/MoL/mol-data/range/shp/animalia/species/ -u http://localhost:8080/metadataloader | |
INFO:root:Working directory: /Users/tuco/Data/MoL/mol-data/range/shp/animalia/species/ | |
INFO:root:URL: http://localhost:8080/metadataloader | |
Traceback (most recent call last): | |
File "./iucnranges.py", line 199, in <module> | |
response = urllib2.urlopen(req) | |
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py", line 124, in urlopen | |
return _opener.open(url, data, timeout) | |
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py", line 383, in open |
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
if __name__== '__main__': | |
logging.basicConfig(level=logging.DEBUG) | |
options = _getoptions() | |
logging.info('Working directory: %s' %options.datadir) | |
logging.info('URL: %s' %options.url) | |
os.chdir(options.datadir) | |
url = options.url | |
values = dict( | |
payload=simplejson.dumps(newCollection()), | |
key_name='range/mol/animalia/species/1') |
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
{ | |
"source":"International Union for Conservation of Nature (IUCN)", | |
"type":"Range", | |
"name":"Digital Distribution Maps of The IUCN Red List of Threatened Species", | |
"description":"This dataset contains distribution information of species assessed for The IUCN Red List of Threatened Species. The maps are developed as part of a comprehensive assessment of global biodiversity in order to highlight taxa threatened with extinction, and thereby promote their conservation.", | |
"url":"http://www.iucnredlist.org/spatial-data/2010.4/GISData/RLSpatial_metadata_Oct2010.pdf", | |
"agreements":{}, | |
"creationDate": "2009-11", | |
"uploadDate": str(datetime.datetime.now()), | |
"changeDate": "2010-10", |
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
class MultiPolygonLoader(BaseHandler): | |
""" Loads MultiPolygons from scripts in /utilities/metadata. | |
Example: | |
./iucnranges.py -d /Users/tuco/Data/MoL/mol-data/range/shp/animalia/species/ -u http://tuco.mol-lab.appspot.com/multipolygonloader -k MultiPolygon | |
""" | |
def post(self): | |
payload = self.request.get('payload') | |
name=self.request.get('name') | |
subname=self.request.get('subname') | |
source=self.request.get('source') |
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 | |
i_feature_footprint.feature_id, geom_y, geom_x, radius, displayname, | |
i_scheme_term.term, g_collection.name, g_collection.mapaccuracyinmeters, | |
g_collection.coordprecision | |
FROM | |
i_feature_footprint, | |
g_feature, | |
g_feature_displayname, | |
i_scheme_term, | |
i_classification, |
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
WC_ALIAS = dict( | |
tmean1='m1', | |
tmean2='m2', | |
tmean3='m3', | |
tmean4='m4', | |
tmean5='m5', | |
tmean6='m6', | |
tmean7='m7', | |
tmean8='m8', | |
tmean9='m9', |
OlderNewer