Introduction to

Geospatial Analysis in the Cloud

Why in the Cloud?

Data Explosion

Paradigm Shift

Which EO Platform?

  • Google Earth Engine (GEE)
  • Sentinel Hub
  • Open Data Cube (ODC)
  • SEPAL
  • JEODPP
  • pipsCloud
  • ...
  • openEO

openEO develops an open API to connect R, Python,
JavaScript and other clients to big Earth observation
cloud back-ends in a simple and unified way.

Carbon footprint?

cloudcarbonfootprint.org

Google Earth Engine

  • Image: band math, clip, convolution, neighborhood, selection ...
  • Image Collection: map, aggregate, filter, mosaic, sort ...
  • Feature: buffer, centroid, intersection, union, transform ...
  • Feature Collection: aggregate, filter, flatten, merge, sort …
  • Filter: by bounds, within distance, date, day-of-year, metadata ...
  • Reducer: mean, linearRegression, percentile, histogram ….
  • Join: simple, inner, outer, inverted ...
  • Kernel: square, circle, gaussian, sobel, kirsch …
  • Machine Learning: CART, random forests, bayes, SVM, kmeans, cobweb …
  • Projection: transform, translate, scale …
(a very brief)

Introduction to Javascript

Todays evaluation metric: # of javascript code
  1. Open a browser window
  2. Press F12 to open the developer tools
  3. Go to the console tab
  4. Follow along! (Demo time)

Recap

Variable declaration

							// Variables are used to store objects, and are defined 
							// using the keyword var.
							var the_answer = 42;

							// String objects start and end with double quotes.
							var my_variable = "I am a string";
						

							// there are other ways to delare variables in js
							let the_answer = 42;
							const the_answer = 42;
							// we will ignore these
						
Statements

							// Statements *should* end in a semi-colon
							var test = 'I feel incomplete...'

							var test = 'I feel complete...';
							
							
  1. Open a plain text editor (e.g. Notepad on Windows, TextEdit or RStudio )
  2. Create a file with the extension .html
  3. Create a script tag
  4. 
    								
    							
  5. Open this file in the browser
  6. Follow along! (Demo time)
Task:
  1. Create a variable myname with your name
  2. Create a variable myage with your age
  3. Calculate your age in days and store it in myage_days
  4. Print to the console: Hi, my name is ... and I am ... days old
Demo continues...
Task:
  • Create a function that converts a number of years to a number of days
  • Name the function years2days

						// this is the syntax for creating a function:
						function say_something(what){
							console.log(what)
						};
					
Demo continues...

Recap

Comments

								// Line comments start with two forward slashes. 
								// Like this line.

								/* 
								Multi line comments start with a forward slash 
								and a star,
								and end with a star and a forward slash. 
								*/
							
Functions

								// Parentheses are used to pass parameters to functions.
								// the function below is console.log
								console.log("this is the parameter");
							
Arrays

								// Square brackets are used to create a list of items
								var my_list = ['eggplant', 'apple', 'wheat'];

								// Square brackets are also used for selecting items within 
								// a list. 0 refers to the first item in the list.
								my_list[0];

								
							
Dictionaries

								// Curly brackets are used to define "dictionaries"
								var my_dict = {'food':'bread', 'color':'red', 'number':42};

								// Square brackets are used to access items (by key).
								my_dict['color'];

								// Or you can use the dot notation to get the same result.
								my_dict.color;
							
Functions

								// Functions can be defined as a way to reuse code and 
								// make it easier to read.
								function years2days(years){
									return years*365
								};

								years2days(34);
							
						
Functions

								// Functions can be defined as a way to reuse code and 
								// make it easier to read.
								var say_hello = function(string) {
									return 'Hello ' + string + '!';
								};

								say_hello('world');
							
						

Javascript in websites

Javascript is part of a trinity that defines most of the web

Let's take this opportunity to explore and understand this.

(Demo time)


						
						
					

						
						
					

						
						
					
Challenge:

Create an application that takes your name as an input and returns the name backwards.


Tipp: use the methods split, reverse and join.

First steps in Google Earth Engine

Instructions

  1. Go to code.earthengine.google.com
  2. Play around with the Code Editor (create variables, dictionaries, lists...)
  3. Navigate to the location "Visp" using the search bar
  4. Look for a dataset in the search bar (e.g. NASA SRTM Digital Elevation 30m)
Demo 1 (SRTM)
Demo 2 (Sentinel RBG)
Demo 3 (Sentinel NDVI)
Demo 4 (Sentinel NDVI ΔT)
Demo 5 (Sentinel NDVI ΔT, no clouds)
Demo 6 (Forest Cover change)
Demo 7 (Land use classification)

Importing Data

(hit Ctr + Enter to run the script)


							var srtm = ee.Image("USGS/SRTMGL1_003")
						

Importing Data

(hit Ctr + Enter to run the script)


							var srtm = ee.Image("USGS/SRTMGL1_003")

							console.log(srtm)
						

Importing Data

(hit Ctr + Enter to run the script)


							var srtm = ee.Image("USGS/SRTMGL1_003")

							console.log(srtm)

							Map.addLayer(srtm);
						

Importing Data

(hit Ctr + Enter to run the script)


							var srtm = ee.Image("USGS/SRTMGL1_003")

							console.log(srtm)

							Map.addLayer(
								srtm
								);
						

Importing Data

(hit Ctr + Enter to run the script)


							var srtm = ee.Image("USGS/SRTMGL1_003")

							console.log(srtm)

							Map.addLayer(
								srtm, 
								{min:0, max:3000}            // min & max elevation vals
								);
						

Importing Data

(hit Ctr + Enter to run the script)


							var srtm = ee.Image("USGS/SRTMGL1_003")

							console.log(srtm)

							Map.addLayer(
								srtm, 
								{min:0, max:3000}            // min & max elevation vals
								palette: "blue, yellow, red" // or your own colours
								);