lsru.Usgs.search¶
-
Usgs.
search
(collection, bbox, begin=None, end=None, max_cloud_cover=100, months=None, starting_number=1, max_results=50000)[source]¶ Perform a spatio temporal query on Landsat catalog
Parameters: - collection (str) – Landsat collection to query. Use LANDSAT_8_C1, LANDSAT_ETM_C1 and LANDSAT_TM_C1 for OLI, ETM+, and TM respectively
- bbox (tuple) – A bounding box in the form of a tuple (left, bottom, right, top)
- begin (datetime.datetime) – Optional begin date
- end (datetime.datetime) – Optional end date
- max_cloud_cover (int) – Cloud cover threshold to use for the query
- months (list) – List of month indices (1,12) for only limiting the query to these months
- max_results (int) – Maximum number of scenes to return
- starting_number (int) – Used to determine the result number to start
returning from. Is meant to be used when the total number of hits
is higher than
max_results
, to return results in a paginated fashion
Example
>>> from lsru import Usgs >>> import datetime >>> usgs = Usgs() >>> usgs.login() >>> scene_list = usgs.search(collection='LANDSAT_8_C1', >>> bbox=(3.5, 43.4, 4, 44), >>> begin=datetime.datetime(2012,1,1), >>> end=datetime.datetime(2016,1,1)) >>> print(scene_list)
Returns: List of scenes with complete metadata Return type: list