Skip to main content

We have been conducting tests with your Third-Party API and Process API to import images from Planet Scope into our Sentinel Hub account. We import multiple collections of various dates for two different polygons, but when we use the Process API to download the RGB image, the downloaded .TIFF contains a blue-filled polygon. This polygon is extracted is a farm, it seemed strange to us, so we downloaded several more, but the results are the same. To create the RGB image we used 2 evalscripts, but they all end up downloading an image with blue-filled pixels of the polygon.


This are the evalscripts we use:


//VERSION=3
//True Color

function setup() {
return {
input: ["B1", "B2", "B3", "dataMask"],
output: { bands: 4 }
};
}

function evaluatePixel(sample) {
return [sample.B3/3000,
sample.B2/3000,
sample.B1/3000,
sample.dataMask];
}


//VERSION=3

function setup() {
return {
input: [{
bands: ["B2", "B3", "B4"]
}],
output: {
bands: 3
}
};
}

function evaluatePixel(sample) {
return [sample.B04, sample.B03, sample.B02];
}


We are wondering if you could help us understand what we are doing wrong or if there is something we are missing.

Hi @javier.soto ,


Looking at the imagery you ordered, the PlanetScope scenes from 2021-07-13 and 2021-07-14 were acquired in cloudy conditions (probably cirrus layer), which causes the blueish tone in the normal visualisation evalscripts.


So the first evalscript is correct and should return a proper True Color image in good conditions, whereas the second evalscript you provided uses the band combination 4,3,2 for a False Color Infrared image composite.

I would correct the second evalscript as shown below:


//VERSION=3
//False Color

function setup() {
return {
input: ["B2", "B3", "B4", "dataMask"],
output: { bands: 4 }
};
}

function evaluatePixel(sample) {
return [sample.B4/3000,
sample.B3/3000,
sample.B2/3000,
sample.dataMask];
}

Hi @max.kampen ,


We ordered a few images for different dates using the first evalscript we posted, but sadly the results are still the same, except for one image which was full gray and not blue.


This is the collection id of another blueish image: 3130f4c1-5005-42b5-MASKED

And this one is for the grey one: 33527ec1-53a1-4c5e-97a3-MASKED


Hi @javier.soto ,


I masked a part of the collection ids from your previous post. If you don’t want people to gain access to your purchased data, I would advise you to not post full ids on the forum.


Let’s switch to PMs to figure out what is going wrong.


Reply