Presenter: Machiel Jansen Organisation: SURFsara Date: Thursday, September 29, 2016 - 11:30
Overview:
Presenter: Machiel Jansen Organisation: SURFsara Date: Thursday, September 29, 2016 - 11:30
Overview:
Types of API documentation: http://nordicapis.com/difference-api-documentation-specification-definition/
RESTful design: http://restful-api-design.readthedocs.io/en/latest/methods.html
Difference between REST and CRUD: https://softwareengineering.stackexchange.com/questions/120716/difference-between-rest-and-crud
What is an API? REST vs RPC https://apigility.org/documentation/api-primer/what-is-an-api
PUT or POST https://stormpath.com/blog/put-or-post
This will resolve issues with GDAL on OS X in your virtualenv:
brew install gdaldeactivate), run this command to find your system site-packages directory: python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"
/Library/Python/2.7/site-packagespip install ... packages are placedgdal-XXX.pth file to the site-packages directory of your virtual environment.python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())", from inside an activated virtualenv.| https://coderwall.com/p/lt2kew/python-creating-your-project-structure | |
| + bin | |
| - project | |
| + project | |
| - main.py | |
| + lib | |
| + tests | |
| ''' | |
| Use Case 2 | |
| Find the most recently acquired image in imagery published in the last 48 hours: | |
| Get all products in Grid-UTM catalog intersecting a rectangular AOI defined by the upper left and lower right | |
| coordinates (a field in United States, Iowa) published within the last 48 hours. Download the most recently | |
| acquired analytic asset regardless of provider. | |
| ''' | |
| ''' | |
| Use case 1 | |
| Scrape the catalog for an AOI/TOI: Filter the RapidEye Grid-UTM catalog for products in an AOI | |
| (United States in Iowa) with an acquisition period between "2014-04-01" and "2014-09-15" with a maximum | |
| cloud cover value of "20%." Download all of the analytic assets. | |
| ''' | |
| import requests | |
| from datetime import datetime | |
| import pytz |