Open krishnaglodha opened 1 month ago
.Looks like a few variables in your snippet aren't defined, so I can't reproduce it (start_date, end_date, ms)
Do you know offhand whether the values from Sentinel Hub are L1C or L2A, and which processing baseline it's using? It might be better to compare just the raw values (from before the NDVI calculation).
here are the variables
polygon = {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {},
"geometry": {
"coordinates": [
[
[
79.06776796168413,
19.043044385618458
],
[
79.06776796168413,
19.041761558038218
],
[
79.06973122024931,
19.041761558038218
],
[
79.06973122024931,
19.043044385618458
],
[
79.06776796168413,
19.043044385618458
]
]
],
"type": "Polygon"
}
}
]
}
start_date = '2024-01-01'
end_date = '2024-01-06'
PS: I also tested out result in comparison with agromonitoring.com , and got similar differences
vs microsoft
.Looks like a few variables in your snippet aren't defined, so I can't reproduce it (start_date, end_date, ms)
Do you know offhand whether the values from Sentinel Hub are L1C or L2A, and which processing baseline it's using? It might be better to compare just the raw values (from before the NDVI calculation).
when we download raw data from pc
the range is between thousands, whereas sentinel-hub data range is betweek 0-255, what might be going wrong ?
In terms of data, we are using L2A
everywhere
when we download raw data from pc the range is between thousands, whereas sentinel-hub data range is betweek 0-255, what might be going wrong ?
That might be to the baseline or units I mentioned in https://github.com/microsoft/PlanetaryComputer/issues/350#issuecomment-2127350480.
when we download raw data from pc the range is between thousands, whereas sentinel-hub data range is betweek 0-255, what might be going wrong ?
That might be to the baseline or units I mentioned in #350 (comment).
how do we use this units ?
I tried replicating same results with 'https://earth-search.aws.element84.com/v1'
and surprisingly I got correct result ( similar to sentinel hub ) with earth search STAC link.
how do we use this units ?
Sorry, I don't understand the question.
I'm not an expert, but my understanding is that bands like "B04" are provided as "digital numbers" and are typically in the range 0-4000.
I tried replicating same results with
'https://earth-search.aws.element84.com/v1'
and surprisingly I got correct result ( similar to sentinel hub ) with earth search STAC link.
@TomAugspurger , what is your comment on this ?
I’m not sure, I haven’t used that data before.
From: Krishna Lodha @.> Sent: Monday, May 27, 2024 10:19:13 AM To: microsoft/PlanetaryComputer @.> Cc: Mention @.>; Comment @.>; Subscribed @.***> Subject: Re: [microsoft/PlanetaryComputer] change in the NDVI value when compared to sentinel hub (Issue #349)
I tried replicating same results with 'https://earth-search.aws.element84.com/v1' and surprisingly I got correct result ( similar to sentinel hub ) with earth search STAC link.
@TomAugspurgerhttps://github.com/TomAugspurger , what is your comment on this ?
— Reply to this email directly, view it on GitHubhttps://github.com/microsoft/PlanetaryComputer/issues/349#issuecomment-2133684634 or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAKAOIXUF4WHAHVJFVIFCM3ZENFHFBFKMF2HI4TJMJ2XIZLTSOBKK5TBNR2WLJDUOJ2WLJDOMFWWLO3UNBZGKYLEL5YGC4TUNFRWS4DBNZ2F6YLDORUXM2LUPGBKK5TBNR2WLJDUOJ2WLJDOMFWWLLTXMF2GG2C7MFRXI2LWNF2HTAVFOZQWY5LFUVUXG43VMWSG4YLNMWVXI2DSMVQWIX3UPFYGLLDTOVRGUZLDORPXI6LQMWWES43TOVSUG33NNVSW45FGORXXA2LDOOJIFJDUPFYGLKTSMVYG643JORXXE6NFOZQWY5LFVEZTCNZUGAYTKMZUQKSHI6LQMWSWS43TOVS2K5TBNR2WLKRSGMYTENBYGUYTQNVHORZGSZ3HMVZKMY3SMVQXIZI. You are receiving this email because you were mentioned.
Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
@TomAugspurger @krishnaglodha For things that are specific to xrspatial.multispectral.ndvi
happy to help as we have this issue that was setup..https://github.com/makepath/xarray-spatial/issues/802
Just a thought, the other sources might be applying the offset automatically, see https://github.com/microsoft/PlanetaryComputer/issues/134. Maybe try a date before the offset was added and see if the values match?
I tried replicating same results with
'https://earth-search.aws.element84.com/v1'
and surprisingly I got correct result ( similar to sentinel hub ) with earth search STAC link.
They seem to apply the offset to there COG assets. I ran into a similar problem and documented it. here
the confusing part is that they use the STAC raster extension to provide the values for offset and scale.
"raster:bands": [
{
"nodata": 0,
"data_type": "uint16",
"bits_per_sample": 15,
"spatial_resolution": 10,
"scale": 0.0001,
"offset": -0.1
}
However the offset is still "-0.1". IMHO it should be "0" since the values are already harmonized. but this is another story....
the deviations you have observed can also be caused by the other DEM used by PC
Hi, I'm trying to create NDVI based on
sentinel-2-l2a
, bit I see difference in values on pixels when compared with sentinel hubHere is the image from sentinel hub
we can see that it ranges from 18 to 61 i.e. 0.07 to 0.23 ( divided by 255 )
and here is the image from planetary
where values are ranging between 0.04 to 0.15
my code looks like