Evalscript (custom script)
An evalscript (or "custom script") is a piece of Javascript code which defines how the satellite data shall be processed by Sentinel Hub and what values the service shall return. It is a required part of any process, batch processing or OGC request.
Evalscripts can use any JavaScript function or language structures, along with certain utility functions we provide for your convenience. For running evalscripts we use the Chrome V8 JavaScript engine.
In the Evalscript V3 section you will find a technical documentation with detailed explanations of parameters and functions you can use in your evalscripts.
Examples
Examples of various evalscritps can be found on our Custom Scripts Repository.
Tutorials and Other Related Materials
- A PDF tutorial on writing simple evalscripts for beginners: Custom scripts tutorial
- A webinar on writing evalscripts for beginners: Custom Scripts, September 28, 2020
- A webinar on multi-temporal scripts and data fusion: Multi-temporal Scripts and Data Fusion, March 3, 2021
- A blog on good scripting practices: Custom Scripts: Faster, Cheaper, Better!, November 18, 2019
- A blog post on color maps: PUCK - Perceptually Uniform Color Maps in Satellite Imagery, January 28, 2021
- A blog post on sampleType: SampleType: what’s all the fuss about?, February 15, 2022
- More blog posts and useful links can be found on our Sentinel Hub website.