espa_inventory_hits: espa_inventory_hits

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

R wrapper for USGS/EROS Inventory Service Scene Search Hits API.

Usage

1
2
3
4
espa_inventory_hits(datasetName, lowerLeft = "", upperRight = "",
  startDate = "1920-01-07", endDate = Sys.Date(), months = "",
  includeUnknownCloudCover = T, minCloudCover = 0, maxCloudCover = 100,
  additionalCriteria = "", apiKey, node = "EE", verbose = F)

Arguments

datasetName

Character. Used as a filter with wildcards inserted at the beginning and the end of the supplied value. See https://mapbox.github.io/usgs/reference/catalog/hdds.html for a list of valid datasetNames.

lowerLeft

List. When used in conjunction with upperRight, creates a bounding box to search spatially. Should be a list of form list(latitude=XX,longitude=XX)

upperRight

List. When used in conjunction with lowerLeft, creates a bounding box to search spatially. Should be a list of form list(latitude=XX,longitude=XX)

startDate

Character. Used to search datasets temporally for possible dataset coverage. ISO 8601 Formatted Date. Time portion is ignored. Default is "1920-01-01".

endDate

Character. Used to search datasets temporally for possible dataset coverage. ISO 8601 Formatted Date. Time portion is ignored.Default is today's date.

months

Numeric. Used to limit results to specific months.

includeUnknownCloudCover

Logical. Used to determine if scenes with unknown cloud cover values should be included in the results. Default is TRUE.

minCloudCover

Numeric. Used to limit results by minimum cloud cover (for supported datasets). Range 0 to 100. Default is 0.

maxCloudCover

Numeric. Used to limit results by maximum cloud cover (for supported datasets). Range 0 to 100. Default is 100.

additionalCriteria

List. Used to filter results based on dataset specific metadata fields. Use datasetFields request to determine available fields and options.

apiKey

Character. Users API Key/Authentication Token, obtained from espa_inventory_login request.

node

Character. Determines the dataset catalog to use. Default="EE", probably never needs to be changed.

verbose

Logical. Verbose execution? Default=F.

Details

This method is used in determining the number of hits a search returns. Because a hits request requires a search, this request takes the same parameters as the search request, with exception to the non-search-field parameters; maxResults, startingNumber, and sortOrder.

Value

A list contains the results of the search.

Author(s)

Jonathan A. Greenberg (espa-tools@estarcion.net) (wrapper) and USGS ESPA Developers (API and documentation)

References

https://earthexplorer.usgs.gov/inventory/documentation/json-api#hits

See Also

espa_inventory_login,espa_inventory_get_api

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run:  
# Get API KEY (required EROS username/password): 
apiKey=espa_inventory_login("myusername","mypassword")
# Standard search:
espa_inventory_hits(datasetName="GLS2005",
		"lowerLeft"=list(latitude=75,longitude=-135),
		"upperRight"=list(latitude=90,longitude=-120),
		startDate="2006-01-01",endDate="2007-12-01",
		node="EE",
		apiKey=apiKey)

## End(Not run)

espa.tools documentation built on May 2, 2019, 5:54 p.m.