Configuration problem with the 8 band planet imagery

Hi,

We are trying to create a new BYOC collection for 8-band planet imagery but getting an error as bad request as below. We think it could be a problem due to wrongly configured data_mask. Please help.

{
“error”: {
“status”: 400,
“reason”: “Bad Request”,
“message”: “Band mismatch. Ordered [band ‘blue’ (source = ‘image’, bandIndex = 2 and bitDepth = 16), band ‘clear’ (source = ‘udm2’, bandIndex = 1 and bitDepth = 8), band ‘cloud’ (source = ‘udm2’, bandIndex = 6 and bitDepth = 8), band ‘coastal_blue’ (source = ‘image’, bandIndex = 1 and bitDepth = 16), band ‘confidence’ (source = ‘udm2’, bandIndex = 7 and bitDepth = 8), band ‘green’ (source = ‘image’, bandIndex = 4 and bitDepth = 16), band ‘green_i’ (source = ‘image’, bandIndex = 3 and bitDepth = 16), band ‘haze_heavy’ (source = ‘udm2’, bandIndex = 5 and bitDepth = 8), band ‘haze_light’ (source = ‘udm2’, bandIndex = 4 and bitDepth = 8), band ‘nir’ (source = ‘image’, bandIndex = 8 and bitDepth = 16), band ‘red’ (source = ‘image’, bandIndex = 6 and bitDepth = 16), band ‘rededge’ (source = ‘image’, bandIndex = 7 and bitDepth = 16), band ‘shadow’ (source = ‘udm2’, bandIndex = 3 and bitDepth = 8), band ‘snow’ (source = ‘udm2’, bandIndex = 2 and bitDepth = 8), band ‘udm1’ (source = ‘udm2’, bandIndex = 8 and bitDepth = 8), band ‘yellow’ (source = ‘image’, bandIndex = 5 and bitDepth = 16)] but collection contains [band ‘blue’ (source = ‘image’, bandIndex = 2 and bitDepth = 16), band ‘clear’ (source = ‘udm2’, bandIndex = 1 and bitDepth = 8), band ‘cloud’ (source = ‘udm2’, bandIndex = 6 and bitDepth = 8), band ‘coastal_blue’ (source = ‘image’, bandIndex = 1 and bitDepth = 16), band ‘confidence’ (source = ‘udm2’, bandIndex = 7 and bitDepth = 8), band ‘data_mask’ (source = ‘data_mask’, bandIndex = 9 and bitDepth = 8), band ‘green’ (source = ‘image’, bandIndex = 4 and bitDepth = 16), band ‘green_i’ (source = ‘image’, bandIndex = 3 and bitDepth = 16), band ‘haze_heavy’ (source = ‘udm2’, bandIndex = 5 and bitDepth = 8), band ‘haze_light’ (source = ‘udm2’, bandIndex = 4 and bitDepth = 8), band ‘nir’ (source = ‘image’, bandIndex = 8 and bitDepth = 16), band ‘red’ (source = ‘image’, bandIndex = 6 and bitDepth = 16), band ‘rededge’ (source = ‘image’, bandIndex = 7 and bitDepth = 16), band ‘shadow’ (source = ‘udm2’, bandIndex = 3 and bitDepth = 8), band ‘snow’ (source = ‘udm2’, bandIndex = 2 and bitDepth = 8), band ‘udm1’ (source = ‘udm2’, bandIndex = 8 and bitDepth = 8), band ‘yellow’ (source = ‘image’, bandIndex = 5 and bitDepth = 16)]”,
“code”: “COMMON_BAD_PAYLOAD”
}
}

Thanks,
James

Hi,

if I understand correctly, you are trying to create a new order or subscription and ingest the data into an existing BYOC collection. As the error message says, the collection is not compatible because it contains an extra band “data_mask”. We recommend to either use another, compatible collection, or to create the order/subscription without a collectionId so that a new collection will be created (which can be later reused for other orders/subscriptions).

It is also possible to use the BYOC API to delete the data_mask band from the collection. However, I suspect this collection was created in error and contains no ingested tiles, so is best deleted.

we have just created this new collection because our team need an extra band(data_mask) in the 8band. we tried the old but the old one didn’t allow us to add an extra band so had to create a new one.

Please could you help to understand how to configure the data_mask?

The bands of the data you are ordering/subscribing to cannot be customized (beyond choosing 4-band vs 8-band), so the collection cannot have the data_mask band.

Nevertheless, when you use the data (in Process API, Statistical API etc), the dataMask band will be available (see documentation). This band is not stored explicitly as a raster and therefore not listed among the BYOC collection’s bands.

Check your data_mask configuration and make sure it matches the collection setup. Double-check the band ordering too.

Hi,

Thanks for responding. Here is the configuration we have for 8-band imagery. Please could you guide me to set up or add a data mask to it?

I’m able to download the first 8 bands but not the data mask bands. Here is my script. Please correct me for what I’m doing wrong.


I have received only the first 8 band data but not other 8 bands data mask data

Hi James,

There is no need to add a datamask layer to your data collection.

It should be a simple fix on your side: in the evalscript, make sure that the number of bands specified in the output in the setup() function matches the number of bands your are returning in the evaluatePixel() function.

Currently, you have 8 bands you wish to return, however, you are attempting to return more than this in your evaluatePixel() function. This should fix your error.

Thank you so much, @william.ray . Now, I’m able to download extra bands after specifying the count of bands in the output.

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