Skip to main content

Request Builder Statistical function, for planetscope, does not work for downloading NDVI data older than one month


I created a subscription for planetscope with dates between 2022-10-01 and 2023-05-30.

The “Statistical” function in Builder Request works fine for dates after 2023_02_16, but for dates between 2022-10-01 and 2023-01-31 it shows the following error:


Something went wrong!

{

“data”: a],

“status”: “OK”

}

Hi Claudio,


Apologies for the slow response. Just to confirm, your requests work when requesting data that is less than a month old? In addition, can you please provide some more information on your request? If you could copy the curl request from Request Builder that would be perfect.


Thanks for your help.


It works fine for values after 2023-02-16


The following does not work:


curl -X POST https://services.sentinel-hub.com/api/v1/statistics

-H ‘Authorization: ’

-H ‘Accept: application/json’

-H ‘Content-Type: application/json’

-d ‘{

“input”: {

“bounds”: {

“geometry”: {

“type”: “Polygon”,

“coordinates”: o

r

n

-71.12956613992135,

-30.54124653873209,

0

],

/

-71.12903580854392,

-30.54142336657128,

0

],

/

-71.12877644174317,

-30.54159512502724,

0

],

/

-71.12831701462689,

-30.54185531817823,

0

],

/

-71.12778893055922,

-30.54201501898092,

0

],

/

-71.12768571168564,

-30.54196984226339,

0

],

/

-71.12762729395618,

-30.54173061364225,

0

],

/

-71.12744821903584,

-30.54161123446446,

0

],

/

-71.12718784189667,

-30.5415139607362,

0

],

/

-71.12688707635104,

-30.54141507035204,

0

],

/

-71.12642288081382,

-30.54093101336366,

0

],

/

-71.12616823834097,

-30.54087681987756,

0

],

/

-71.12555169582988,

-30.54049356519861,

0

],

/

-71.12667301426947,

-30.53946408774166,

0

],

/

-71.1270907030892,

-30.5397607824904,

0

],

/

-71.12740403483876,

-30.53952001029431,

0

],

/

-71.12808778199211,

-30.54030797409049,

0

],

/

-71.12876326094117,

-30.54064591245121,

0

],

/

-71.13002482749255,

-30.54105561457819,

0

],

/

-71.12956613992135,

-30.54124653873209,

0

]

]

]

}

},

“data”:

{

“dataFilter”: {},

“type”: “byoc-xxxxxxxxx”

}

]

},

“aggregation”: {

“timeRange”: {

“from”: “2023-01-01T00:00:00Z”,

“to”: “2023-01-31T23:59:59Z”

},

“aggregationInterval”: {

“of”: “P1D”

},

“width”: 512,

“height”: 339.01,

“evalscript”: “//VERSION=3\nfunction setup() {\n return {\n input: h{\n bands: \n "Red",\n "NIR",\n "dataMask"\n ]\n }],\n output: :\n {\n id: "data",\n bands: 2\n },\n \n {\n id: "dataMask",\n bands: 1\n }]\n };\n}\n\nfunction evaluatePixel(samples) {\n let index = (samples.NIR - samples.Red) / (samples.NIR+samples.Red);\n return {\n data: \index, samples.NIR, samples.Red],\n dataMask: esamples.dataMask]\n };\n}”

},

“calculations”: {

“default”: {}

}

}’


Hi,


Please make sure to double check the BYOC Collection that you are using. The ID in the code snippet (removed for privacy reasons) you provided only has data from 26th February to the present in it. Perhaps you meant to use a different ID in your request?


That is the id that I am using in my request, I can’t find how to rescue older data.


I urgently need to rescue old ndvi planetscope data from different places


Hi Claudio,


I would recommend checking your Dashboard to locate the correct collection id that you wish to use.


Hi William:

Thanks for the help.


The collection id is correct, there must be some other constraint.


I forgot to mention that I am using planetscope “Hectares Under Management”.


Can it be downloaded directly from planet scope?


Hello William,


I hope you can help me again!!

When reviewing the details of the collection, I realized that the date restriction appears there.

When is that parameter defined? I don’t remember doing it.



I tried with a polygon that I had previously created and I realized that the “Minimum sensing time” parameter was not restrictive, so the problem goes another route.


I would really like to understand how the “Planet Scope under management area” statistics service works, since this limitation of not being able to consult historical data for some polygons is a limitation.


Hi @claudioruzaedo,


The collection ID you specify in your statistical API request contains data in the time range from 16.02.2023 to 25.03.2023. The related subscription (hectares under management) was set up using the following dataFilter parameters:


"dataFilter": {
"timeRange": {
"from": "2023-02-16T00:00:00Z",
"to": "2023-05-31T23:59:59Z"
},
"maxCloudCoverage": 20
},

The collection simply doesn’t contain data before mid-February. You will have to make sure the subscription covers the required time range (no additional cost in the hectares under management model when it’s an already subscribed AOI), and then run Statistical API requests on the collection.


Please note that the timeRange parameter you set for the PlanetScope subscriptions is based on the data publication date instead of the acquisition date, so the Minimum sensing time and Maximum sensing time of the collection that holds your data might differ from the timeRange parameter you specified in your subscription. This is described here in our documentation.


If there is any particular collection/subscription you need us to take a look at, please provide only the first part of the respective id and a short description of what you expect vs. what you get and we can investigate further.


Hi @max.kampen


Thank you very very much,

I generated the subscription again with the appropriate dates and the request builder worked fine.


I am very grateful


This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.


Reply