kapadia / usgs

Client library for interfacing with USGS datasets
http://kapadia.github.io/usgs/
ISC License
110 stars 38 forks source link

Support search by path/row #16

Closed kapadia closed 9 years ago

kapadia commented 9 years ago

Need to look at documentation of the USGS inventory service to see if this search criteria is supported.

/cc @jreiberkyle

kapadia commented 9 years ago

@jreiberkyle looks like the usgs api does support additional search criteria. First i need to implement a test query to make sure the results are reasonable, then I'll incorporate a path/row search in this library.

kapadia commented 9 years ago

@jreiberkyle - search requests now allow for additional criteria to be specified.

Each dataset (e.g. LANDSAT_8, EO1_HYP_PUB) has a list of fields that are supported by additional criteria requests. A dataset_fields request must be made to see supported fields. This can be done on the command-line:

$ usgs dataset-fields EO1_HYP_PUB --node EE

or using the API:

fields = api.dataset_fields(dataset, node)

To search EO1_HYP_PUB by path/row on the command-line:

usgs search EO1_HYP_PUB --node EE --where target-row 43 --where target-path 184

whereas to search LANDSAT_8 by path/row:

usgs search LANDSAT_8 --node EE --where wrs-row 43 --where wrs-path 184