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 | |
############################################################################### | |
# $Id$ | |
# | |
# Project: GDAL2Tiles, Google Summer of Code 2007 & 2008 | |
# Global Map Tiles Classes | |
# Purpose: Convert a raster into TMS tiles, create KML SuperOverlay EPSG:4326, | |
# generate a simple HTML viewers based on Google Maps and OpenLayers | |
# Author: Klokan Petr Pridal, klokan at klokan dot cz | |
# Web: http://www.klokan.cz/projects/gdal2tiles/ |
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
[ | |
200, | |
{ | |
"preview_layer_api_url": "https://market.weogeo.com/datasets/topo-usgs-drg-topo-felton-ca/preview_layers.json", | |
"rating": 0.0, | |
"supported_customizations": { | |
"layer": false, | |
"file_format": true, | |
"projection_datum": true, | |
"geocrop": true, |
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
Jamess-MacBook-Pro:Desktop james$ python submitjob.py | |
making jobs | |
Submitting your jobs... | |
Here is your order info: | |
{ | |
"job": { | |
"dataset_token": "f1bca22c-013e-4e57-a78b-f9bbb3a918e8", |
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 | |
from bs4 import BeautifulSoup | |
import urllib2 | |
url = "http://www.spatiallyadjusted.com/blog/archives/" | |
page = urllib2.urlopen(url) | |
soup = BeautifulSoup(page.read()) | |
file = open('out.txt', 'w') |
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 | |
""" see previous example on how to submit jobs to be ordered (https://gist.github.com/4356165) | |
For this example we take a job create and submit it to WeoGeo to generate an order. Looking at the | |
token field in the JSON, I've picked this TOPO Raster token "a32957481fde138c22c38a680f2ec65". | |
The dataset can be viewed here: http://market.weogeo.com/datasets/a32957481fde138c22c38a680f2ec65 """ | |
print "\nConnecting to WeoGeo...\n" | |
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 | |
""" see previous example on how to an order for a dataset (https://gist.github.com/4355769) | |
For this example we take a job create and submit it to WeoGeo to generate an order. Looking at the token | |
field in the JSON, I've picked this TOPO Raster token "a32957481fde138c22c38a680f2ec65". The dataset | |
can be viewed here: http://market.weogeo.com/datasets/a32957481fde138c22c38a680f2ec65 """ | |
print "\nConnecting to WeoGeo...\n" | |
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
{ | |
"layers": null, | |
"status": "Not Processed", | |
"events_api_url": "https://market.weogeo.com/jobs/4870e9c5-7292-4592-b873-4f53bf5ff6b2/events.json", | |
"order_url": "https://market.weogeo.com/jobs/4870e9c5-7292-4592-b873-4f53bf5ff6b2/order", | |
"job_edit_page_url": "https://market.weogeo.com/datasets/topo_usgs_drg_topo_four_peaks_az?job_id=4870e9c5-7292-4592-b873-4f53bf5ff6b2", | |
"api_url": "https://market.weogeo.com/jobs/4870e9c5-7292-4592-b873-4f53bf5ff6b2.json", | |
"parameters": { | |
"job_geocrop": "Clip", | |
"job_east": -12386121.607448, |
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 | |
""" see previous example on how to get a dataset (https://gist.github.com/4355190) | |
For this example we take a dataset found previously and order it from WeoGeo. Looking at the token | |
field in the JSON, I've picked this TOPO Raster token "a32957481fde138c22c38a680f2ec65". The dataset | |
can be viewed here: http://market.weogeo.com/datasets/a32957481fde138c22c38a680f2ec65 """ | |
import WeoGeoAPI |
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 | |
""" see previous example on how to get a dataset (https://gist.github.com/4355190) | |
For this example we take a dataset found previously and get more information about it. Looking | |
at the token field in the JSON, I've picked this TOPO Raster token "a32957481fde138c22c38a680f2ec65". | |
The dataset can be viewed here: http://market.weogeo.com/datasets/a32957481fde138c22c38a680f2ec65 """ | |
print "\nConnecting to WeoGeo...\n" | |
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 | |
""" This sample code will allow you to connect to the WeoGeo Market and get a list of datasets. | |
You'll need the WeoGeo Python API that can be acquired by "pip install WeoGeoAPI". """ | |
print "\nConnecting to WeoGeo...\n" | |
# Import Needed Libraries | |
import WeoGeoAPI |