-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Debug LS and S2 STAC iteration (#50)
* Debug LS and S2 STAC iteration * Update deps * Dry run Sentinel and Landsat with smaller queries * Trigger CI * Fix typo * Improved workflow * Start parellelizing * Fix type annotations * Move func * Use __main__ guard * Use executor.map * Pass dry_run * More debug printing * Iterate directly over Landsat S3 bucket * Lint * Set AWS_REQUEST_PAYER * Update ingest Action
- Loading branch information
1 parent
4b2f7b9
commit 951d029
Showing
8 changed files
with
148 additions
and
84 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,16 @@ | ||
from watch_helpers import post_stac_items_from_s3_iter | ||
|
||
bucket = 'kitware-smart-watch-data' | ||
prefix = 'processed/ta1/drop1/coreg_and_brdf/' | ||
collection = 'drop1/coreg_and_brdf' | ||
region = 'us-west-2' | ||
post_stac_items_from_s3_iter(bucket, prefix, collection, region=region) | ||
if __name__ == '__main__': | ||
bucket = 'kitware-smart-watch-data' | ||
prefix = 'processed/ta1/drop1/coreg_and_brdf/' | ||
collection = 'drop1/coreg_and_brdf' | ||
region = 'us-west-2' | ||
print(collection) | ||
post_stac_items_from_s3_iter(bucket, prefix, collection, region=region) | ||
|
||
bucket = 'kitware-smart-watch-data' | ||
prefix = 'processed/ta1/drop1/mtra/' | ||
collection = 'drop1/mtra' | ||
region = 'us-west-2' | ||
post_stac_items_from_s3_iter(bucket, prefix, collection, region=region) | ||
bucket = 'kitware-smart-watch-data' | ||
prefix = 'processed/ta1/drop1/mtra/' | ||
collection = 'drop1/mtra' | ||
region = 'us-west-2' | ||
print(collection) | ||
post_stac_items_from_s3_iter(bucket, prefix, collection, region=region) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,39 @@ | ||
from watch_helpers import post_stac_items_from_server | ||
from watch_helpers import post_stac_items_from_s3_iter | ||
|
||
host_url = 'https://landsatlook.usgs.gov/stac-server/collections/landsat-c2l1/items' | ||
collection = 'landsat-c2l1' | ||
post_stac_items_from_server(host_url, collection) | ||
if __name__ == '__main__': | ||
# min_date = datetime(2013, 1, 1) # Arbitrarily chosen | ||
# max_date = datetime.today() | ||
# host_url = 'https://landsatlook.usgs.gov/stac-server/' | ||
# | ||
# collection = 'landsat-c2l1' | ||
# print(collection) | ||
# post_stac_items_from_server(host_url, collection, min_date=min_date, max_date=max_date) | ||
# | ||
# collection = 'landsat-c2l2-sr' | ||
# print(collection) | ||
# post_stac_items_from_server(host_url, collection, min_date=min_date, max_date=max_date) | ||
|
||
host_url = 'https://landsatlook.usgs.gov/stac-server/collections/landsat-c2l2-sr/items' | ||
collection = 'landsat-c2l2-sr' | ||
post_stac_items_from_server(host_url, collection) | ||
# host_url = 'https://api.smart-stac.com/' | ||
# collection = 'smart-landsat-c2l1' | ||
# post_stac_items_from_server(host_url, collection, min_date=min_date, max_date=max_date) | ||
# | ||
# collection = 'smart-landsat-c2l2-sr' | ||
# post_stac_items_from_server(host_url, collection, min_date=min_date, max_date=max_date) | ||
|
||
host_url = 'https://api.smart-stac.com/collections/landsat-c2l1/items' | ||
collection = 'smart-landsat-c2l1' | ||
post_stac_items_from_server(host_url, collection) | ||
bucket = 'usgs-landsat' | ||
region = 'us-west-2' | ||
include_regex: str = r'^.*stac\.json' | ||
|
||
host_url = 'https://api.smart-stac.com/collections/landsat-c2l2-sr/items' | ||
collection = 'smart-landsat-c2l2-sr' | ||
post_stac_items_from_server(host_url, collection) | ||
prefix = 'collection02/level-1/' | ||
collection = 'landsat-c2l1' | ||
print(collection) | ||
post_stac_items_from_s3_iter( | ||
bucket, prefix, collection, include_regex=include_regex, region=region | ||
) | ||
|
||
prefix = 'collection02/level-2/' | ||
collection = 'landsat-c2l2-sr' | ||
print(collection) | ||
post_stac_items_from_s3_iter( | ||
bucket, prefix, collection, include_regex=include_regex, region=region | ||
) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
boto3 | ||
mock | ||
pystac-client |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,16 @@ | ||
from datetime import datetime | ||
|
||
from watch_helpers import post_stac_items_from_server | ||
|
||
host_url = 'https://earth-search.aws.element84.com/v0/collections/sentinel-s2-l1c/items' | ||
collection = 'sentinel-s2-l1c' | ||
post_stac_items_from_server(host_url, collection) | ||
if __name__ == '__main__': | ||
min_date = datetime(2015, 12, 31) # First available found | ||
max_date = datetime.today() | ||
host_url = 'https://earth-search.aws.element84.com/v0/' | ||
|
||
collection = 'sentinel-s2-l1c' | ||
print(collection) | ||
post_stac_items_from_server(host_url, collection, min_date=min_date, max_date=max_date) | ||
|
||
host_url = 'https://earth-search.aws.element84.com/v0/collections/sentinel-s2-l2a/items' | ||
collection = 'sentinel-s2-l2a' | ||
post_stac_items_from_server(host_url, collection) | ||
collection = 'sentinel-s2-l2a' | ||
print(collection) | ||
post_stac_items_from_server(host_url, collection, min_date=min_date, max_date=max_date) |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
from watch_helpers import post_stac_items_from_s3_iter | ||
|
||
bucket = 'smart-imagery' | ||
prefix = 'worldview-nitf/' | ||
collection = 'WorldView' | ||
region = 'us-west-2' | ||
if __name__ == '__main__': | ||
bucket = 'smart-imagery' | ||
prefix = 'worldview-nitf/' | ||
collection = 'WorldView' | ||
region = 'us-west-2' | ||
|
||
post_stac_items_from_s3_iter(bucket, prefix, collection, region=region) | ||
print(collection) | ||
post_stac_items_from_s3_iter(bucket, prefix, collection, region=region) |