});

custom-scripts

A repository of custom scripts that can be used with Sentinel-Hub services.

Enhanced true color visualization

Show script or download it.

Evaluate and visualize

Description

This script offers different true color visualizations, a NIR visualization, and the ability to easily add more visualizations. Variables allow you to influence the resulting image regarding, brightness, contrast, and saturation.
More info here: https://pierre-markuse.net/2019/03/26/sentinel-3-data-visualization-in-eo-browser-using-a-custom-script/

Contributors:

Pierre Markuse (@pierre_markuse, https://pierre-markuse.net/)

License

CC BY 4.0 International - https://creativecommons.org/licenses/by/4.0/

Examples

Mozambique floods 2019 https://apps.sentinel-hub.com/eo-browser/?lat=-19.898&lng=35.109&zoom=9&time=2019-03-25&preset=CUSTOM&datasource=Sentinel-3%20OLCI&layers=B01,B02,B03&evalscript=Ly8gU2VudGluZWwtMyBkYXRhIFZpc3VhbGl6YXRpb24gVjEuMC4wCi8vIFR3aXR0ZXI6IFBpZXJyZSBNYXJrdXNlIChAcGllcnJlX21hcmt1c2UpCi8vIENDIEJZIDQuMCBJbnRlcm5hdGlvbmFsIC0gaHR0cHM6Ly9jcmVhdGl2ZWNvbW1vbnMub3JnL2xpY2Vuc2VzL2J5LzQuMC8KZnVuY3Rpb24gc3RyZXRjaCh2YWwsIG1pbiwgbWF4KSB7cmV0dXJuICh2YWwgLSBtaW4pIC8gKG1heCAtIG1pbik7fQpmdW5jdGlvbiBibGVuZChiQXJyMSwgYkFycjIsIG9wYTEsIG9wYTIpIHsKICAgIHJldHVybiBiQXJyMS5tYXAoZnVuY3Rpb24obnVtLCBpbmRleCkgewogICAgICAgIHJldHVybiAobnVtIC8gMTAwICogb3BhMSArIGJBcnIyW2luZGV4XSAvIDEwMCAqIG9wYTIpOwogICAgfSk7Cn0KCnZhciBOYXR1cmFsQ29sb3JzMSA9IFsxLjAgKiBCMDcgKyAxLjQgKiBCMDkgLSAwLjEgKiBCMTQsIDEuMSAqIEIwNSArIDEuNCAqIEIwNiAtIDAuMiAqIEIxNCwgKDIuNiAqIEIwNCAtIEIxNCAqIDAuNikqMS4wMF07CnZ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