Applied-GeoSolutions / gips

Geospatial Image Processing System
GNU General Public License v3.0
17 stars 5 forks source link

usgs module search doesn't work with cloud cover parameter #400

Closed naterubin closed 6 years ago

naterubin commented 6 years ago

The usgs module, which is now used for querying landsat tiles, consistently returns 0 results if the cloud cover parameter is specified, regardless of the value. This currently renders the pclouds argument of landsat's filter method useless.

ircwaves commented 6 years ago

Looks like we DIY by fetching the metadataUrl. Also, we should probably emit a warning if the API version changes from what we're writing this to match.

{u'access_level': u'approved',
 u'api_version': u'1.3.0',
 u'data': {u'firstRecord': 1,
           u'lastRecord': 1,
           u'nextRecord': 1,
           u'numberReturned': 1,
    [ snip ]
                         u'metadataUrl': u'https://earthexplorer.usgs.gov/metadata/xml/12864/LC80120302017213LGN00/'
 [ snip ]
ircwaves commented 6 years ago

We need this to stop downloading cloudy scenes, especially for any co-registration, where we want to get the nearest cloud-free scene for registration.

naterubin commented 6 years ago

TODO: Wire this into the filter method.