Respected Sir/Ma’am,
I am trying to get NDVI for my study area but the issue is the bounding box is too large for the data. Is there a way I can get data for the whole area? My area is about 672472.44 km2. Further attesting the image and script:
curl -X POST https://services.sentinel-hub.com/api/v1/process
-H ‘Content-Type: application/json’
-H ‘Authorization: Bearer my-token’
-d ‘{
“input”: {
“bounds”: {
“geometry”: {
“type”: “Polygon”,
“coordinates”: [
[
[
-155.63424,
67.028205
],
[
-160.262603,
66.237243
],
[
-160.40941,
64.221812
],
[
-161.20485,
63.093609
],
[
-161.663525,
61.498408
],
[
-140.734505,
61.705222
],
[
-140.431903,
68.596849
],
[
-155.806529,
68.108271
],
[
-155.63424,
67.028205
]
]
]
},
“properties”: {
“crs”: “http://www.opengis.net/def/crs/EPSG/0/4326”
}
},
“data”: [
{
“type”: “S2L1C”,
“dataFilter”: {
“timeRange”: {
“from”: “2018-04-09T00:00:00Z”,
“to”: “2018-04-09T23:59:59Z”
},
“maxCloudCoverage”: 4
}
}
]
},
“output”: {
“width”: 512,
“height”: 360.322,
“responses”: [
{
“identifier”: “default”,
“format”: {
“type”: “image/tiff”
}
}
]
},
“evalscript”: “//VERSION=3\nfunction setup() {\n return {\n input: [“B04”, “B08”],\n output: { bands: 1, sampleType: “UINT16” }\n };\n}\n\nfunction evaluatePixel(sample) {\nlet ndvi = index(sample.B08, sample.B04);\nreturn [10000 * ndvi + 10000];\n}”
}’
EVALSCRIPT:
//VERSION=3
function setup() {
return {
input: [“B04”, “B08”],
output: { bands: 1, sampleType: “UINT16” }
};
}
function evaluatePixel(sample) {
let ndvi = index(sample.B08, sample.B04);
return [10000 * ndvi + 10000];
}
Another issue is after going through this query NDVI values from SentinelHub different from the ones calculates in Qgis
these are the values I was looking for in the data I needed rather than values between 0-255. But as suggested ndvi_float = (ndvi - 10000.)/10000. has to be followed after downloading the image. I will be using daily data meaning I have to repeat this process for every image. Is there a way of directly downloading values within the range [-1 to1 ] for NDVI.
If I try to download Sentinel 3 SLSTR L1B data using the area of my study as kml file I can download it but the resolution is 500m thus I was trying for Sentinel 2.
Thank you in advance and any help will be highly appreciated.