atlanhq / rLandsat

R Package to make Landsat8 data accessible
GNU General Public License v3.0
96 stars 21 forks source link

persistent error : Invalid product selection. Please check the 'product_available' dataframe #13

Open saberioon opened 4 years ago

saberioon commented 4 years ago

When I try espa_order function, it gives me Invalid product selection. Please check the 'product_available' datagram.

Expected Behavior

Current Behavior

Possible Solution

Steps to Reproduce

1. 2. 3. 4.

Context (Environment)

Detailed Description

Possible Implementation

robinh92 commented 4 years ago

I've also been having the same issue and have been unable to find a solution. Debugging the espa_order() function it looks like it's returning an error in the first step when it's checking (sum(product %in% colnames(valid)) != length(product)).

product_id <- c("LC08_L1TP_145049_20180605_20180615_01_T1")
prod_order <- espa_order(product_id, product = "sr")

valid = espa_products(input_ids = input_ids, host = host, 
    username = username, password = password)
  if (!is.null(valid)) {
    valid = valid$master
    if (sum(product %in% colnames(valid)) != length(product)) {
      cat("Invalid product selection. Please check the 'product_available' dataframe\n")
      return(list(order_details = list(), response = NA, 
        product_available = valid))
    }
...
...

For the above example (and every attempt I've made), valid$master is a matrix with the product_id(s) as BOTH row and column headers. So when it checks the product (i.e. "sr") in column names it can't find a match despite the product being available. I haven't dug into espa_products() to see how it's creating valid. Maybe there's been a slight change in the format of the API output?

fishish1 commented 4 years ago

I'm seeing this as well

zhayuan87 commented 4 years ago

me too...

fishish1 commented 4 years ago

After some digging, there is a discrepancy between what is available via NASA Earth Explorer and AWS. I'm seeing a dataset from 2020-08-03 which still isn't on AWS.

fishish1 commented 4 years ago

Pretty much everything I've seen accesses data via aws rather than directly.

ErikKusch commented 3 years ago

Exact same issue here. Even when running the Example code off the front page for the project here on github:

result = landsat_search(min_date = "2018-01-01", max_date = "2018-01-16", country = "India") espa_creds("yourusername", "yourpassword") prods = espa_products(result$product_id) prods = prods$master result_order = espa_order(result$product_id, product = c("sr","sr_ndvi"), projection = "lonlat", order_note = "All India Jan 2018") order_id = result_order$order_details$orderid

This results in order_id == NULL and I am sure it should not

erdavis1 commented 3 years ago

Chiming in as well-this issue is still occurring with the example code (as noted by Erik Kusch). Any chance this will be fixed?