Dynamic layer data processing from web application

For standard use of WMTS, the layer data processing is available on configuration utility. Is this configurations of layer data processing also available from browsers via the web application? If there are any convenient ways of reconfiguration by JavaScript or user operation, that would be helpful.

Time span (start and end date) that is used for data processing can be passed to WMTS service using TIME parameter.
The actual implementation in the web application (e.g. opening a calendar widget, choosing a date and adding it to WMTS end-point) is up to the developer.

You might also want to look into our JS library, which integrates many of these functionalities:

EO Browser uses it, for example. And talking about EO Browser, it is open-source, so you can take parts of the code you want and re-use it:

1 Like

What I need to know is the way of using EVALSCRIPT parameter in the WMTS URL. How can I include the following evalscript into the URL?


function evaluatePixel(samples) {
let val = index(samples.B08, samples.B04);
return [val, samples.dataMask];

function setup() {
return {
input: [{
bands: [
output: {
bands: 2

Hi @h-ohno,

The Evalscript needs to be BASE64-encoded if you want to pass it to the additional request parameter EVALSCRIPT in the request URL. You can convert your evalscript on a website like this one.

Then you just pass it to the EVALSCRIPT parameter in your URL and it should work. See this example that I edited from the OGC API examples on our website:


Note: You still need to specify the LAYER parameter because the layer in your collection actually defines the data source (e.g. Sentinel-2 L1C) you are requesting data from. The EVALSCRIPT parameter in the URL is prioritised and will be displayed, not the one from the layer.

If you don’t really need to define the Evalscript in your request URL, you can easily create a configuration in your dashboard and configure a layer with your evalscript as described here.

Cheers, Max

1 Like