• Stars
    star
    651
  • Rank 69,175 (Top 2 %)
  • Language
    JavaScript
  • License
    Creative Commons ...
  • Created about 7 years ago
  • Updated 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A repository of custom scripts to be used with Sentinel Hub

Sentinel Hub Custom Script Repository

Examples of visualizations

This repository contains a collection of custom scripts for Sentinel Hub, which can be fed to the services via the URL.

Custom scripts are a piece of Javascript code, used to visualize satellite imagery and to control what values the Sentinel Hub services will return. Any visualization of any constellation (e.g. Sentinel-2 satellite), even a simple true color composite, is dictated by a custom script.

See here for more information on how to write your own evalscript.

Contribute to Custom Scripts

Have a look at the template for an example of how a script page can be structured.

You can also have a look at other scripts to see how they are structured.

For instructions on how custom scripts are structured have a look at this tutorial, or at the official documenation.


How to publish your own product

  • Fork the repository to get your own copy of the custom-scripts
    It is easiest to fork the repository on GitHub, but as some of you might not have GitHub account, or don't want to bother with all this versioning and collaboration tools, you can also just download the whole repository as Zip file and work from there.
  • Create a new directory entry for your custom script
    Copy the example directory to proper directory, based on which datasource (satellite) you are publishing the product for, to something that describes what the product is about, say my_algorithm.
    Preferably use "snake_case" (underscores instead of spaces) if more than one word is used.
  • Fill in the details about the project in the README.md file.
    Obviously, you'll want to remove this chapter, but use the rest of the file as a template.
    Have a look around at other README.md files to see how to include images, format the text and generally use the GitHub markdown (e.g. here for mathematical formulas or here for adding images).
  • Implement the product in the script.js file.
    The most work is of course the JavaScript implementation of the product. The example folder includes an empty custom script with comments that will hopefully help you build your own custom script. Of course the easiest is to do the custom script building/testing on Sentinel Playground.
  • Add an entry pointing to your script to the top level markdown file (i.e. if adding a script for Sentinel 2 add the link to sentinel-2.md in the folder sentinel-2).
    A link and a short description will do.
  • And create a pull request :). There is extensive help on creating pull requests on GitHub help, but if you feel overwhelmed by this step and would still like to contribute, send us the folder you've created and we will take care of it for you.

Publishing your product should be easy, nevertheless, any feedback and ideas how to improve or make the process simpler is very appreciated.

Test your changes locally

This is optional but makes Pull Requests quicker to handle since they should have less mistakes.
Before you create the PR you can check if everything looks right on the website. To do this follow these steps which are based on Testing your GitHub Pages site locally with Jekyll page:

Linux
  • In the root directory of your fork open a terminal
  • Install ruby
    • Ubuntu: sudo apt install ruby ruby-dev
  • Install bundler
    • gem install bundler
    • On Ubuntu you might have to add sudo
  • Create a Gemfile
    • In the root folder of the repository (where the _config.yml file is) create a new file Gemfile.
    • i.e touch Gemfile
    • and add the following content:
source 'https://rubygems.org'
gem "github-pages", "~> GH_VERSION", group: :jekyll_plugins
gem "just-the-docs"

Replace GH_VERSION with the version number that is displayed next to github-pages here.

  • Serve the page
    • First install all necessary gems with bundle install
    • then the site can be built with bundle exec jekyll serve
    • The site should then be visible on 127.0.0.1:4000
macOS
  • In the root directory of your fork open a terminal

  • Install ruby

    • brew install chruby ruby-install xz

      • If homebrew hasn't been installed yet, intall homebrew
      /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
      
    • ruby-install ruby 3.1.3

    • After installation run the following codes:

    echo "source $(brew --prefix)/opt/chruby/share/chruby/chruby.sh" >> ~/.zshrc
    echo "source $(brew --prefix)/opt/chruby/share/chruby/auto.sh" >> ~/.zshrc
    echo "chruby ruby-3.1.3" >> ~/.zshrc # run 'chruby' to see actual version
    
    • Quit and relaunch Terminal, then check that everything with ruby -v
    • It should show ruby 3.1.3p185 (2022-11-24 revision 1a6b16756e) or a newer version
  • Install Jekyll

    • gem install jekyll
  • Install bundler

    • gem install bundler
  • Following the Create a Gemfile step in the Linux section

  • Serve the page

    • First install all necessary gems with bundle install

    • Add the missing webrick package with bundle add webrick

      • Run this command again when the following error message pops out:
      bundler: failed to load command: jekyll
      
    • then the site can be built with bundle exec jekyll serve

    • The site should then be visible on 127.0.0.1:4000

More Repositories

1

eo-learn

Earth observation processing framework for machine learning in Python
Python
1,111
star
2

sentinelhub-py

Download and process satellite imagery in Python using Sentinel Hub services.
Python
804
star
3

sentinel2-cloud-detector

Sentinel Hub Cloud Detector for Sentinel-2 images in Python
Python
422
star
4

field-delineation

Field delineation with Sentinel-2 data from Sentinel-Hub and a ResUnet-a architecture.
Jupyter Notebook
149
star
5

eo-flow

Collection of TensorFlow 2.0 code for Earth Observation applications
Python
91
star
6

water-observatory-backend

Monitoring water levels of lakes and reservoirs using satellite imagery
Jupyter Notebook
79
star
7

EOBrowser

The Earth Observation Browser is a search tool for Sentinel-1, -2, -3, Landsat 5, 7, 8, Modis and Envisat satellite imagery
JavaScript
78
star
8

SentinelPlayground

Simple application for using Sentinel-2 WMS service
JavaScript
73
star
9

multi-temporal-super-resolution

Multi-temporal Super-Resolution on Sentinel-2 Imagery using Deimos
Jupyter Notebook
57
star
10

time-lapse

Python scripts for creating time lapse videos and gifs from Sentinel-2 images
Jupyter Notebook
55
star
11

sentinelhub-js

Download and process satellite imagery in JavaScript or TypeScript using Sentinel Hub services.
TypeScript
52
star
12

eo-learn-workshop

Bridging Earth Observation data and Machine Learning in Python
Jupyter Notebook
42
star
13

sentinelhub-qgis-plugin

QGIS Plugin for Sentinel Hub
Python
37
star
14

eo-grow

Earth observation framework for scaled-up processing in Python
Python
37
star
15

eo-learn-examples

Examples of Earth observation workflows that extract valuable information from satellite imagery, giving you hints and ideas how to use the EO data.
Jupyter Notebook
36
star
16

natural-color

Natural color representation of Sentinel-2 data
JavaScript
29
star
17

water-observatory-frontend

Frontend React app for https://water.blue-dot-observatory.com/
JavaScript
27
star
18

collections

Repository with information about openly available collections
JavaScript
26
star
19

example-notebooks

Miscellaneous notebooks to use with Sentinel Hub
Jupyter Notebook
18
star
20

education

Worked out examples for common eo topics, meant to facilitate learning and encourage curiosity.
Jupyter Notebook
16
star
21

hiector

A Python package for hierarchical building detection developed under Query Planet CCN3
Python
13
star
22

code-snippets

Jupyter Notebook
12
star
23

byoc-tool

Tool that prepares your data for use in Sentinel Hub
Java
7
star
24

cv4a-iclr-2020-starter-notebooks

Starter notebooks using eo-learn for the CV4A workshop at ICLR 2020
Jupyter Notebook
6
star
25

pin-library

HTML
5
star
26

classification-app-frontend

JavaScript
5
star
27

global-timelapse

Interact with our planet and observe global-level data in the form of different layers
JavaScript
4
star
28

odc-sh

Sentinel plugin for Open data cube https://www.opendatacube.org/
Jupyter Notebook
3
star
29

classification-app-backend

Code to reproduce the back-end service for ClassificationApp
Python
3
star
30

requests-builder

JavaScript
2
star
31

digital-twin-of-news

Jupyter Notebook
2
star
32

eo-grow-examples

Earth Observation framework for scaled-up processing `eo-grow` in action.
Jupyter Notebook
2
star
33

bids-cdse-jupyter

Workshop content for using Jupyter Notebooks on the Copernicus Data Space Ecosystem. Workshop held at the Big Data from Space 2023 conference.
Jupyter Notebook
2
star
34

sentinel-hub-code-editor

JavaScript
1
star
35

stac-ml-example

A repository demonstrating an example ML workflow with the usage of STAC
Jupyter Notebook
1
star