Last active
February 23, 2021 04:31
-
-
Save sixy6e/40e7c7be947c3993aad59b158b83a9dd to your computer and use it in GitHub Desktop.
STAC demo
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
A demo that uses Python to do a little query against a STAC catalogue. |
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
import requests | |
import json | |
from pprint import pprint | |
def main(): | |
url = "https://earth-search.aws.element84.com/v0/search" | |
search = { | |
"bbox": [142.5, -33, 143, -32.5], | |
"datetime": "2021-01-01/2021-01-31", | |
"query": {"eo:cloud_cover": {"lt": "10"}}, | |
"limit": 1, | |
} | |
response = requests.post(url, json=search, headers=None) | |
pprint(json.loads(response.text)) | |
if __name__ == "__main__": | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment