A selection of visualisations created with the custom scripts submitted to the second round of the Sentinel Hub Custom Script Contest.

Step into the Beautiful World of Custom Scripts

Introducing scripts from the second round of the Sentinel Hub Custom Script Contest

Sabina Dolenc
Mar 24, 2020 · 14 min read

We are pleased to present the custom scripts submitted to the second round of the Custom Script Contest. The Contest started on October 15th 2019 and ended on January 31st 2020. We have received 23 beautiful and useful remote sensing scripts that you can try globally in EO Browser. Entries were judged by a jury of experts on functionality and usefulness, as well as possible commercial potential. The results are published on the official Contest web page and the entries are available on our Custom Scripts repository.

Making a Difference

We would like to believe that our contribution to the remote sensing community provides many the right tools to make a difference. To spread awareness of the free tools’ availability and showcase the simplicity of their usage, we have initiated a series of Sentinel Hub Custom Script Contests, starting with the first one in Spring 2019. The contests give everyone the opportunity to share their knowledge and contribute innovative ideas and scripts to the remote sensing community.

About the Second Round of the Contest

The scripts cover wide array of topics: from water (water mapping, water quality, flood mapping, soil moisture) to agriculture (vegetation, crop monitoring), land use and land cover classification, and finally visualisation and art. It is safe to say that all submissions contribute to the remote sensing community which can greatly benefit from them. So, we invite you to check them out and test them on your own use-cases.

Awarded Scripts

Our distinguished jury of seven remote sensing experts and Earth observation enthusiasts judged the submissions and awarded first three prizes to:

  1. “Ulyssys Water Quality Viewer (UWQV)” created by András Zlinszky and Gergely Padányi-Gulyás,
  2. “SAR-Ice: a Sea Ice RGB composite” by Martin Raspaud and Mikhail Itkin,
  3. “Satellite Derived Bathymetry Mapping (SDBM) script” by Mohor Gartner.

The interesting thing which binds all the winning scripts is that they all fall under the same topic — marine or other water bodies algorithms.

🏆 Ulyssys Water Quality Viewer

“The UWQV can provide qualitative information from all the inland waters of the world where water quality monitoring is not available. This includes remote locations but also zones of conflict or humanitarian crisis where clean water is especially precious and information difficult to obtain.”

To learn more about the UWQV we recommend to also read the Water Quality Information for Everyone guest blog post by the authors of the winning script, explaining it in detail.

Tsimlyansk Reservoir, Russia (the UWQV applied to the Sentinel-2 image, acquired on September 5th, 2019 (🌐 EO Browser).

🏆 SAR-Ice: a Sea Ice RGB composite

Martin Raspaud and Mikhail Itkin have developed a new composite, proposing a way to combine both co- and cross-polarization data into one single image, not only keeping the ice features easily distinguishable, but also showing clearly different states of the sea and sea-ice that are difficult to see in single band images.

If you have a need to discriminate various features and state of the water and sea ice, you really have to check out this script. ℹ️ GitHub

Chosha bay in Barents sea in February 2018 (🌐 EO Browser) — Image shows a polynya formation, ice thickens with brine rejection on top, and frost flowers.

🏆 Satellite Derived Bathymetry Mapping (SDBM) script

With the SDBM script the author offers identification of shallow water depths (up to 18 meters) for selected area and specific scene on the Sentinel-2 data. For some locations, bathymetry data can be found online or one could make in-situ measurements. The script is simplified compared to the usual scientific approach on SDB as it does not include pre-processing of the scene (atmospheric correction, water reflectance, tide offset). ℹ️ GitHub

San Luis Obispo Bay, USA (Sentinel L1C, acquired on February 16th, 2018 and with applied SDBM script) — The script is globally applicable in the coastal zones of reservoirs, ponds, lakes, seas and oceans. It is recommended to use scenes with higher illumination and no or low presence of cloud coverage (<10%), shadow areas, turbidity, waves, wind. 🌐 EO Browser

Enhanced True Color Visualisation Scripts

Tonemapped Natural Color Script

The author of the script, Gregory Ivanov, took inspiration and his experience from real-time 3D graphics in modern video games, as most of them now use High dynamic range for lighting calculations. ℹ️ GitHub

The script was added to the Education mode in EO Browser, which can be switched on by clicking on the little hat icon in the right up corner. You can find the script under the Snow and Glaciers theme. For more details on that we recommend reading the New Themes, Multi-Temporal Scripting and Other Improvements in EO Browser blog post.

Manfredonia, Province of Foggia, Italy (Sentinel-2 L1C, acquired on December 14th, 2019 with applied Tonemapped Natural Color Script) 🌐 EO Browser

TOA Ratio B09-B8A ColorMap Blue-Red & Natural Colors Script

A blue color indicates a dry atmosphere like in desert area or high mountainous regions whereas red color indicates a very wet atmosphere like in the Amazonian forest, summer in Japan or India during monsoon. ℹ️ GitHub

The images illustrate described different conditions, the first one at continental scale showing the difference of atmosphere above Australia from the wet shores to the dry desert central areas. The second image shows the high contrast region of Himalaya that creates a sharp boundary between wet Northern India and very dry Tibetan plateau.

Selective Enhancement Based on Indices

Left comparison: Pucara de Oroncota, Bolivia on November 2nd, 2019 — The script highly enhances geology differentiation, while selectively enhancing waterways (left) — 🌐EO Browser. True Color shows not much differentiation in geology itself, and with waterways, all in similar colors (right). Right comparison: Gulf of Venice, Italy on November 10th, 2019 — Using selection as an artistic blackout mask to enhance water turbidity alone (left). True Color with much less differentiation of clear water and turbidity (right).

Marine and Other Water Bodies Environment Algorithms

Aquatic Plants and Algae Custom Script Detector

The most useful application of the script is to monitor the distribution of invasive species in water bodies such as lakes or lagoons. The script also identifies turbid water. The areas with a large amount of sediment in suspension are painted in brown and red to purple colors. ℹ️ GitHub

The output of the script (left) shows the presence of aquatic plants and algae in Victoria Lake (Africa) in bright green color while the turbid water is displayed in red (acquired on October 4th, 2019). Algae and turbid water (right) in Taihu Lake, near Shanghai, China (acquired on December 10th, 2019).

Water in Wetlands Index (WIW)

Use of WIW with Sentinel-2 sensors can help track short-term changes in water areas relative to rainfalls or floods. Considering the high temporal resolution of Sentinel 2 (every 5 days), cumulative water maps built using WIW can further be used for detecting a wide range of wetlands which are either periodically or permanently inundated. ℹ️ GitHub

The Barotse floodplain is in the Zambezian flooded grasslands ecoregion. The flood provides aquatic habitats for fish such as tigerfish and bream, crocodiles, hippopotamus, waterbirds, fish-eating birds, and lechwe, the wading antelope found in wetlands of south central Africa. The peak of the flood occurs on the floodplain about 3 months after the peak of the rainy season in January-February. 🌐 EO Browser

Use of WIW with Landsat sensors can be used to collect long-term data (back to 1984) for monitoring wetland evolution. ℹ️ GitHub

WIW timelapse with Landsat 8 data at the largest reed marsh in southern France — ChaSca — from July 2013 through June 2014 (monthly interval).

Se2WaQ — Sentinel-2 Water Quality Script

  • the concentration of Chlorophyll a (Chl_a),
  • the density of cyanobacteria (Cya),
  • turbidity (turb),
  • colored dissolved organic matter (CDOM),
  • dissolved organic carbon (DOC), and
  • water color (Color).

These indicators are used to define the trophic state on inland waters, which is particularly important when these waters are used for human consumption or leisure activities, for agriculture or industrial purposes. The script allows the user to explore the results as the values of the scales are changed, and to discover more structures on the images. ℹ️ GitHub

Distribution of Cya in the Alqueva Lake, in Portugal, on October 12th, 2017, during a particular dry Autumn. The lake is showing a high density of cyanobacteria, specially in the northern region.

Water Bodies’ Mapping — WBM Script

The script is in general globally applicable inland and coastal zones. It is recommended to use scenes with higher illumination, low cloud coverage and no/low presence of shadow areas. It works better in flat areas than in hilly and mountainous areas. Nevertheless, false detection of water bodies in mountainous areas can be usually filtered with the script or at least visually differentiated from true water bodies, as later have nucleated (lakes, reservoirs, etc.) or thin line shape (rivers). ℹ️ GitHub

Southern Australia, part of Lake Alexandrina on the coastline (Sentinel-2 data, acquired on October 24th, 2019). Almost all water bodies are appropriately detected, from ocean and Lake Alexandria, to smaller ponds. 🌐 Sentinel Playground Temporal

Disaster Management and Prevention Algorithm

Flood Mapping with Sentinel-1

Flood mapping in Aghghala, Iran — Sentinel-1 image during the flood on March 23rd, 2019 and a reference image before the flood on March 11th, 2019 (R=2019/03/11 and G,B=2019/03/23). To separate flooded from unflooded, a threshold is selected on the difference values between the before and during flood backscatters. The second and third image show the acquired maps with thresholds 0.05 and 0.08. Low values correspond to the less affected areas (black), and high values correspond to the more affected areas (red color). 🌐 Sentinel Playground Temporal

Land Use Algorithm

Land Use Visualisation for Sentinel-2 using Linear Discriminant Analysis

Madrid, Spain (Sentinel-2 data with applied Land Use Visualisation using LDA script, acquired on September 26th, 2019) 🌐 EO Browser

The authors of the script have used Linear Discriminant Analysis (LDA) to create a visualisation where each image channel (red, green and blue) codes the maximum information to identify respectively urban, crop and water related classes. Input class labels were taken from Spanish SIOSE land use classification.

The script for EO Browser is specifically designed to visualise Sentinel-2 13 band data in a way that facilitates differentiation of urban areas (red channel), vegetation areas (green channel) and water areas (blue channel). ℹ️ GitHub

Custom Scripts as Art

Homage to Mondrian

Flevoland province in the Netherlands 🌐 EO Browser

This is an artistic script to pay tribute to Dutch painter Piet Mondrian. It takes normalized difference vegetation index (NDVI) and paints pixels in 5 different colors depending on its value. Colors are chosen to match those in the most popular Mondrian’s paintings.

The script is universally applicable but the best artistic effects are reached in locations with repetitive and geometrically uniform landscape, for example in large agricultural fields. It can be further improved by manually adjusting limits of NDVI for each color, depending on geographic location and personal taste. ℹ️ GitHub

Vegetation and Agriculture Algorithms

Tracking Radar Vegetation Index (Agriculture Development) Change

Agriculture fields around Yeya river, Krasnodar region, Russia (Sentinel-1 data with applied multi-temporal RVI script). 🌐 EO Browser

Soil Moisture Estimation Script

Since we are considering 3-year of data in calculating the sensitivity of backscatter fluctuations, it is resistant to seasonal fluctuations. It is capable of masking urban and permanent water bodies to reduce false results. ℹ️ GitHub

Manitoba, Canada (Sentinel-1 data with applied multi-temporal Soil Moisture Estimation script). 🌐 Sentinel Playground Temporal

Radar Vegetation Index for Sentinel-1 (RVI4S1) SAR Data

Time-lapse shows the start of the season on May 11th to high vegetative growth condition on July 22nd of summer 2019 in Manitoba province, Canada. This region is dominating by cereal crops (wheat, oats, barley), corn, canola and soybean. Throughout the growth season changes in RVI4S1 values are observed. The index changes from almost 0 to close to 1 as crop advanced. 🌐 EO Browser

Radar Vegetation Index Code for Dual Polarimetric Script

The time-lapse shows Vijayawada, India region in the period from June 24th, 2019 to December 27th, 2019. During this period, rice is majorly sown over all the fields in this area. Also, the monsoon cloudy climatic condition creates hindrance in ground data collection by optical satellites. In this regard, the Sentinel-1 SAR satellite could be an alternative way to monitor the rice phenological stages. It can be seen from the representative images that the RVI for Sentinel-1 visually correlates the changes in the crop phenological stages to a great extent. 🌐 EO Browser

SAR for Deforestation Detection

Borneo (Sentinel-1 data with applied SAR for Deforestation Detection script) — image shows areas affected by palm oil deforestation. 🌐 EO Browser

Agricultural Crop Monitoring from Space

The acquired images during the period from April 20th, 2018 to July 17th, 2018 in the region of Ferrara, Italy. The image acquired on April 20th, 2018 was used as the master image. 🌐 EO Browser

Other Scripts

OLCI Natural Colors with Sigmoid

The image of California acquired on January 24th, 2020 used Lambda = 7 as a compromise. Lambda value can be adjusted to lower values (e.g. 3, 4, 5) to catch more of clouds brightness dynamic. Higher values of Lambda (e.g. 8, 9, 10) will result in brighter images more adapted to dark vegetated areas. Note that in this case clouds brightness will saturate. 🌐 EO Browser

Index Visualisation

Liptov, Slovakia (Sentinel-2 data with applied NDVI visualisation, acquired on July 4th, 2019). 🌐 EO Browser

NDVI on L2A Vegetation and Natural Colors

The two images of forest of Compiègne, France acquired 6 months apart (early summer on July 5th, 2019 vs. early winter on January 6th, 2020) show the difference of forest NDVI depending on the season. 🌐 EO Browser

To get an impression of how easy it is to write a simple and useful script and what it takes to participate in the next Contest, we also invite you to read one of our previous blog posts, “Why join the next Sentinel Hub Custom Script Contest”. Check out also the list of some useful information on processing images using the custom scripting in EO Browser. You never know, you might just get the motivation to submit your own script in the third round of the Contest in the coming months and win some cool prizes.

Sentinel Hub Blog

Stories from the next generation satellite imagery platform

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store