Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
GCP: Limit output to simplify lesson
tmiddelkoop committed May 20, 2022
1 parent d8fd220 commit c8dad21
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion landsat/search.json
@@ -1,5 +1,6 @@
{
"lat": 38.899313,
"lon": -92.464562,
"landsat": "LANDSAT_8"
"landsat": "LANDSAT_8",
"limit": true
}
2 changes: 2 additions & 0 deletions 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

0 comments on commit c8dad21

Please sign in to comment.