From c8dad219bdc39bfc2aab91e033110c24fca64430 Mon Sep 17 00:00:00 2001 From: Timothy Middelkoop Date: Fri, 20 May 2022 09:57:20 -0500 Subject: [PATCH] GCP: Limit output to simplify lesson --- landsat/search.json | 3 ++- landsat/search.py | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/landsat/search.json b/landsat/search.json index ef3afa4..45ee70e 100644 --- a/landsat/search.json +++ b/landsat/search.json @@ -1,5 +1,6 @@ { "lat": 38.899313, "lon": -92.464562, - "landsat": "LANDSAT_8" + "landsat": "LANDSAT_8", + "limit": true } diff --git a/landsat/search.py b/landsat/search.py index a23421b..7b5c446 100644 --- a/landsat/search.py +++ b/landsat/search.py @@ -8,6 +8,7 @@ config=json.load(open("search.json")) lat,lon=config['lat'],config['lon'] landsat=config['landsat'] +limit=config['limit'] reader=csv.reader(sys.stdin) header=next(reader) # skip header @@ -17,3 +18,4 @@ north,south=float(NORTH_LAT),float(SOUTH_LAT) if SPACECRAFT_ID==landsat and north >= lat and south <= lat and west <= lon and east >= lon: print(BASE_URL) # output BASE_URL + limit and sys.exit(0) # limit results