Divergent data sources

Different pixel value between the same band downloaded by sentinelhub and scihub

Annex 1 comes from the scihub and represents the red band (B04) of the Sentinel 2 L2A satellite

Annex 2 comes from the EO Browser of the same band on the same date.

When comparing the two bands we have numerical divergences.

What could cause this?

Thank you for your attention.
T22KHC_20220514T132229_B04_10m_scihub.tiff (4.6 KB)
2022-05-14-00_00_2022-05-14-23_59_Sentinel-2_L2A_B04_(Raw).tiff (2.4 KB)

Dear @thiagoquinaia,

looking at the shared tiffs they seem to be in a different CRS (Coordinate reference system) as well as having a different pixel size. Both attribute to the numerical divergence and explain what you are observing.

When downloading raw data with EO Browser the pixel resolution is determined depending on the zoom level you are on (see screenshot) and the Image resolution you selected. This gives you some limited control over the downloaded resolution but depending on the location you are at, you might be not able to get exactly 10 m/px.

image

If you have a Sentinel Hub account, I recommend you to take a look at our request builder, where you can exactly specify the resolution you want to get returned and have much more control over the downloaded data.

Best,
Daniel

Using this EVALSCRIPT just changing the band name.

//VERSION=3

function setup() {
  return {
    input: [
      {
        bands: ["B08"],      
        units: "REFLECTANCE",            
      }
    ],
    output: [
      {
        id: "default",
        bands: 1,
        sampleType: "UINT16",        
      },    
    ],
    mosaicking: "SIMPLE",
  };
}


function evaluatePixel(samples) {
    // Your javascript code here
    return {
      default: [10000*samples.B08],
    };
  }

b08_requestbuilder_32722.tiff (5.4 KB)
b04_requestbuilder_32722.tiff (5.4 KB)

and yet the divergence remains.

Dear @thiagoquinaia,

two more things after which you will get the same data (a slight shift in pixel due to the bbox).

  • set the same date (set it in the request builder to 14.05.2022) as you have downloaded data from scihub
  • use “harmonizeValues”: false in the input.data.processing (you can read more on this here)

Below a request you can parse in the request builder to get the same data (note that you need to put your own Authentication Token still in):

curl -X POST https://services.sentinel-hub.com/api/v1/process 
 -H 'Content-Type: application/json'
 -H 'PASTE YOUR TOKEN HERE' 
 -d '{
  "input": {
    "bounds": {
      "bbox": [
        883869.359953,
        7712967.296511,
        884415.772198,
        7713439.152739
      ],
      "properties": {
        "crs": "http://www.opengis.net/def/crs/EPSG/0/32722"
      }
    },
    "data": [
      {
        "dataFilter": {
          "timeRange": {
            "from": "2022-05-14T00:00:00Z",
            "to": "2022-05-14T23:59:59Z"
          }
        },
        "type": "sentinel-2-l2a",
        "processing": {
           "harmonizeValues": false
        }
      }
    ]
  },
  "output": {
    "resx": 10,
    "resy": 10,
    "responses": [
      {
        "identifier": "default",
        "format": {
          "type": "image/tiff"
        }
      }
    ]
  },
  "evalscript": "//VERSION=3\n\nfunction setup() {\n  return {\n    input: [\n      {\n        bands: [\"B04\"],      \n        units: \"DN\",            \n      }\n    ],\n    output: [\n      {\n        id: \"default\",\n        bands: 1,\n        sampleType: \"UINT16\",        \n      },    \n    ],\n    mosaicking: \"SIMPLE\",\n  };\n}\n\n\nfunction evaluatePixel(samples) {\n    // Your javascript code here\n    return {\n      default: [samples.B04],\n    };\n  }"
}'

Best,
Daniel

Hi @dthiex,

I followed your instructions when using the request builder and read the link you sent however I saw no difference when using harmonized values ​​"False".

I share this data so it can help me understand what might be causing this difference.

Attachment 1: B04 - scihub
T22KHC_20220514T132229_B04_10m_scihub.tiff (4.6 KB)

Attachment 2: B08 - scihub
T22KHC_20220514T132229_B08_10m_scihub.tiff (4.6 KB)

Attachment 3: ndvi_20220514_scihub
ndvi_20220514_sci_hub.tiff (8.8 KB)

Attachment 4: B04 - requestbuilder_harmonizedFalse
B04_20220514_requestbuilder_harmonizedFalse.tiff (3.9 KB)

Attachment 5: B08 - requestbuilder_harmonizedFalse
B08_20220514_requestbuilder_harmonizedFalse.tiff (4.3 KB)

Attachment 6: ndvi_20220514_requestbuilder_harmonizedFalse
ndvi_request_builder_harmoFalse.tiff (10.1 KB)

Best,
Thiago

Dear @thiagoquinaia,

can you make sure that the request including the harmozeValue info is send. From the results you shared here I see it wasn’t included.

Adding this is still a bit tricky as it’s not yet part of the request builder UI. We will add this soon but until then every time you change something in the interface the part disappears again. I suggest you add

"processing": {
           "harmonizeValues": false
        }

last to your request right after "type": "sentinel-2-l2a" and if you hit “send edited request” you should get the same results.

Best,
Daniel

Edit: The harmonizeValues option is now also available in the Request Builder in the graphical interface (under advanced options).