Hi,
I am trying to request both true color image as well as firemask data for a specific time period for a specific bounding box. I tried with CustomUrlParam.EVALSCRIPT and it gives an error when requesting for get_data.
Program works fine, when accessing using the single layer configured at sentinel-hub.
Objective is to get the timelapse images for a specific bounding box, but with various layers in one call to minimize the API calls.
If possible, I also would like to to get some metadata about the images (e.g. date taken, cc etc.) and access bot S2L1C and S2L2A in one API request.
What can I do to get the images downloaded for this period, in a most effective way ? Should I be using different API?
with HTTPError:
400 Client Error: Bad Request for url: https://services.sentinel-hub.com/ogc/wms/27c25b84-xxx?SERVICE=wms&WARNINGS=False&MAXCC=100.0&Quality=60&ShowLogo=False&EvalScript=CiAgICAvL1ZFUlNJT049MwogICAgZnVuY3Rpb24gc2V0d&BBOX=41.8682%2C-123.90931%2C41.8882%2C-123.88931&FORMAT=image%2Fpng&CRS=EPSG%3A4326&TIME=2023-08-25T17%3A13%3A01Z%2F2023-08-25T21%3A13%3A01Z&WIDTH=512&HEIGHT=512&LAYERS=1_TRUECOLOR&REQUEST=GetMap&VERSION=1.3.0
Server response: “Output default requested but missing from function setup()”
This is my WMSRequest
request = WmsRequest(
layer=layer,
bbox=bbox,
data_collection=data_collection,
time=time_interval,
width=img_size[0],
height=img_size[1],
image_format=mime_type,
config=config,
custom_url_params={CustomUrlParam.QUALITY: 60,
CustomUrlParam.SHOWLOGO: False,
CustomUrlParam.EVALSCRIPT: evalscript
},
time_difference=time_difference
)
I tried even with one layer, as below. As soon as I add non-default “id” to the layer, it fails.
//VERSION=3
function setup() {
return {
input: ["B02", "B03", "B04", "dataMask"],
output: { id: "truecolor", bands: 4 }
};
}
function evaluatePixel(sample) {
return {
"truecolor": [sample.B04, sample.B03, sample.B02, sample.dataMask],
}
}
