USGS Payloads¶
-
usgs.payloads.
clear_bulk_download_order
(dataset, node, api_key=None)[source]¶ This method is used to clear bulk download order information from the item basket.
Parameters: - dataset –
- node –
- api_key – API key is required.
-
usgs.payloads.
clear_order
(dataset, node, api_key=None)[source]¶ This method is used to clear order information from the item basket.
Parameters: - dataset –
- node –
- api_key – API key is required.
-
usgs.payloads.
dataset_fields
(dataset, node, api_key=None)[source]¶ This request is used to return the metadata filter fields for the specified dataset. These values can be used as additional criteria when submitting search and hit queries.
Parameters: - dataset –
- node –
- api_key – API key is not required.
-
usgs.payloads.
datasets
(dataset, node, ll=None, ur=None, start_date=None, end_date=None, api_key=None)[source]¶ This method is used to find datasets available for searching. By passing no parameters except node, all available datasets are returned. Additional parameters such as temporal range and spatial bounding box can be used to find datasets that provide more specific data. The dataset name parameter can be used to limit the results based on matching the supplied value against the dataset name with assumed wildcards at the beginning and end. All parameters are optional except for the ‘node’ parameter.
Parameters: - dataset – Dataset Identifier
- ll –
Lower left corner of an AOI bounding box - in decimal form Longitude/Latitude dictionary
e.g. { “longitude”: 0.0, “latitude”: 0.0 }
- ur –
Upper right corner of an AOI bounding box - in decimal form Longitude/Latitude dictionary
e.g. { “longitude”: 0.0, “latitude”: 0.0 }
- start_date – Used for searching scene acquisition - will accept anything that the PHP strtotime function can understand
- end_date – Used for searching scene acquisition - will accept anything that the PHP strtotime function can understand
- node – The requested Catalog
- api_key – API key is not required.
-
usgs.payloads.
download
(dataset, node, entityids, products, api_key=None)[source]¶ The use of this request will be to obtain valid data download URLs.
Parameters: - dataset –
- entityIds – list
- products – list
- node –
- api_key – API key is required.
-
usgs.payloads.
download_options
(dataset, node, entityids, api_key=None)[source]¶ The use of the download options request is to discover the different download options for each scene. Some download options may exist but still be unavailable due to disk usage and many other factors. If a download is unavailable it may need to be ordered.
Parameters: - dataset –
- node –
- entityIds –
- api_key – API key is not required.
-
usgs.payloads.
get_bulk_download_products
(dataset, node, entityids, api_key)[source]¶ Retrieve bulk download products on a scene-by-scene basis.
Parameters: - dataset –
- node –
- entityid – String or list of strings.
- api_key – API key is required.
-
usgs.payloads.
get_order_products
(dataset, node, entityids, api_key=None)[source]¶ Retrieve orderable products on a scene-by-scene basis.
Parameters: - dataset –
- node –
- entityid –
- api_key – API key is required.
Todo
Support multiple scene request.
-
usgs.payloads.
item_basket
(api_key=None)[source]¶ Returns the current item basket for the current user.
Parameters: api_key – API key is required.
-
usgs.payloads.
login
(username, password)[source]¶ This method requires SSL be used due to the sensitive nature of users passwords. Upon a successful login, an API key will be returned. This key will be active for one hour and should be destroyed upon final use of the service by calling the logout method. Users must have “Machine to Machine” access based on a user-based role in the users profile.
Parameters: - username –
- password –
-
usgs.payloads.
logout
(api_key)[source]¶ Remove the users API key from being used in the future.
Parameters: api_key – API key is required.
-
usgs.payloads.
metadata
(dataset, node, entityids, api_key=None)[source]¶ The use of the metadata request is intended for those who have acquired scene IDs from a different source. It will return the same metadata that is available via the search request.
Parameters: - dataset –
- node –
- sceneid –
- api_key –
-
usgs.payloads.
search
(dataset, node, lat=None, lng=None, distance=100, ll=None, ur=None, start_date=None, end_date=None, where=None, max_results=50000, starting_number=1, sort_order='DESC', api_key=None)[source]¶ Parameters: - dataset –
- node –
- lat –
- lng –
- ll –
- distance –
- ur –
- start_date –
- end_date –
- where – Specify additional search criteria
- max_results –
- starting_number –
- sort_order –
- api_key – API key is not required.