Giter Site home page Giter Site logo

loicdtx / lsru Goto Github PK

View Code? Open in Web Editor NEW
24.0 8.0 9.0 91 KB

:mag: :globe_with_meridians:Query and Order Landsat Surface Reflectance data via ESPA

Home Page: https://lsru.readthedocs.io

Python 100.00%
landsat espa usgs usgs-api remote-sensing multispectral-images download

lsru's People

Contributors

loicdtx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lsru's Issues

More of a comment: 429 Errors

For downloading, if you try to download more than one scene at a time, you get a 429 Error code and a 162 byte download. How does this library handle retry for that situation?

Handle date restricted property in available-products results

The following query to available-products

curl  --user username:password \
                  -X GET \
                  -d '{"inputs":["LE07_L1GT_020049_20160611_20161209_01_T2",
                                      "LE07_L1GT_021049_20200105_20200131_01_T2",
                                      "LE07_L1TP_021049_20200206_20200303_01_T1"]}' \
                        https://espa.cr.usgs.gov/api/v0/available-products

returns

{"etm7_collection": {"products": ["source_metadata", "l1", "toa", "bt", "stats", "pixel_qa", "et"], 
                                "inputs": ["LE07_L1GT_020049_20160611_20161209_01_T2", "LE07_L1GT_021049_20200105_20200131_01_T2", "LE07_L1TP_021049_20200206_20200303_01_T1"]},
                                "date_restricted": {"sr": ["LE07_L1GT_020049_20160611_20161209_01_T2"],
                                                             "sr_ndvi": ["LE07_L1GT_020049_20160611_20161209_01_T2"],
                                                              "sr_evi": ["LE07_L1GT_020049_20160611_20161209_01_T2"],
                                                              "sr_savi": ["LE07_L1GT_020049_20160611_20161209_01_T2"],
                                                              "sr_msavi": ["LE07_L1GT_020049_20160611_20161209_01_T2"],
                                                              "sr_ndmi": ["LE07_L1GT_020049_20160611_20161209_01_T2"],
                                                              "sr_nbr": ["LE07_L1GT_020049_20160611_20161209_01_T2"],
                                                              "sr_nbr2": ["LE07_L1GT_020049_20160611_20161209_01_T2"]}}

A query without date restricted scenes return

curl  --user username:password \
                  -X GET \
                  -d '{"inputs":["LE07_L1GT_021049_20200105_20200131_01_T2", 
                                 "LE07_L1TP_021049_20200206_20200303_01_T1"]}' \
                        https://espa.cr.usgs.gov/api/v0/available-products
{"etm7_collection": {"products": ["source_metadata", "l1", "toa", "bt", "sr", "sr_ndvi", "sr_evi", "sr_savi", "sr_msavi", "sr_ndmi", "sr_nbr", "sr_nbr2", "stats", "pixel_qa", "et"], "inputs": ["LE07_L1GT_021049_20200105_20200131_01_T2", "LE07_L1TP_021049_20200206_20200303_01_T1"]}}

So products appear either in products or in date_restricted, but not in both.
What need to be done is; if any of the products ordered appear in date_restricted, it needs to be removed from the inputs

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.