An Introduction
Read more here
https://developers.google.com/earth-engine/tutorial_js_01
and
https://datadrivenlab.org/big-data-2/google-earth-engine-tutorial/
Software as a Service
Click anywhere in the map pane and then
look in the Inspector window
keep what works
I like to use https://www.sublimetext.com/3
there are many ways to do this...
Text
Text
Text
var image = ee.Image('CGIAR/SRTM90_V4');
Map.setCenter(-112.8598, 36.2841, 9);
Map.addLayer(image);
// Instantiate an image with the Image constructor.
var image = ee.Image('CGIAR/SRTM90_V4');
// Center on the Grand Canyon and zoom there.
Map.setCenter(-112.8598, 36.2841, 9);
// Display the image on the map.
Map.addLayer(image);
Google Earth Engine and run it!
// Instantiate an image with the Image constructor.
var image = ee.Image('NOAA/NGDC/ETOPO1');
//visualize the data in some way - set the visualization parameters. First you need to explore the properties to see what would make sense //here.
var visParams = {bands: ['ice_surface'], min: -10000, max: 500, palette: ['blue', 'green', 'orange']};
// Display the image on the map.
Map.addLayer(image, visParams);
//printing properties will help you decide what to visualize and how.
print('ETOPO1 image', image);
then more change parameters
cut paste - what happens?
//// Load a Landsat 8 image and display the thermal band.
var image = ee.Image('LANDSAT/LC08/C01/T1_TOA/LC08_044034_20140318');
Map.setCenter(-122.1899, 37.5010, 13); // SF Bay
Map.addLayer(image, {bands: ['B10'], min: 270, max: 310}, 'image');
// Load a Landsat 5 image collection.
var collection = ee.ImageCollection('LANDSAT/LT05/C01/T1_TOA')
// Tacoma area.
.filter(ee.Filter.eq('WRS_PATH', 46))
.filter(ee.Filter.eq('WRS_ROW', 27))
//render the map
Map.addLayer(collection);
// Load a Landsat 5 image collection.
var collection = ee.ImageCollection('LANDSAT/LT05/C01/T1_TOA')
// Tacoma area.
.filter(ee.Filter.eq('WRS_PATH', 46))
.filter(ee.Filter.eq('WRS_ROW', 27))
// Filter cloudy scenes.
.filter(ee.Filter.lt('CLOUD_COVER', 30))
// Get 20 years of imagery.
.filterDate('1991-01-01','2011-12-30')
// Need to have 3-band imagery - trying to highlight urban areas
.select(['B7', 'B5', 'B3'])
// Need to make the data 8-bit.
.map(function(image) {
return image.multiply(512).uint8();
});
//get the map to render in the map pane
Map.addLayer(collection);
// Normalized Difference example.
//
// Compute Normalized Difference Vegetation Index over MOD09GA product.
// NDVI = (NIR - RED) / (NIR + RED), where
// RED is sur_refl_b01, 620-670nm
// NIR is sur_refl_b02, 841-876nm
var img = ee.Image('MOD09GA/MOD09GA_005_2012_03_09');
var ndvi = img.normalizedDifference(['sur_refl_b02', 'sur_refl_b01']);
var palette = ['FFFFFF', 'CE7E45', 'DF923D', 'F1B555', 'FCD163', '99B718',
'74A901', '66A000', '529400', '3E8601', '207401', '056201',
'004C00', '023B01', '012E01', '011D01', '011301'];
Map.setCenter(-94.84497, 39.01918, 8);
Map.addLayer(img.select(['sur_refl_b01', 'sur_refl_b04', 'sur_refl_b03']),
{gain: '0.1, 0.1, 0.1'}, 'MODIS bands 1/4/3');
Map.addLayer(ndvi, {min: 0, max: 1, palette: palette}, 'NDVI');
I need the following
I need the following
//calling landsat 8 images - only looking for imagery that covers a single point. Searching for images between these dates
var tonga = ee.ImageCollection('LANDSAT/LC08/C01/T1')
.filterBounds(ee.Geometry.Point(-175.2312, -21.1612))
.filterDate('2014-01-01', '2019-12-31');
// Sort by a cloud cover property, get the least cloudy image. The print statements means I can use the console and inspector window to read metadata
var image = ee.Image(tonga.sort('CLOUD_COVER').first());
print('Least cloudy image: ', image);
//only show me the following bands represetned as a true color composite in the map display
var trueColor432 = image.select(['B4', 'B3', 'B2']);
var trueColor432Vis = {
min: 0.0,
max: 30000.0,
};
//Centered on Tonga and show me in the map
Map.setCenter(-175.2312, -21.1612, 6);
Map.addLayer(trueColor432, trueColor432Vis, 'True Color (432)');
LANDSAT/LC08/C01/T1/LC08_069075_20190705
make false color composite
what is possible?
examples
https://gisgeography.com/landsat-8-bands-combinations/
This band combination is also called the near infrared (NIR) composite. It uses near-infrared (5), red (4) and green (3). Because chlorophyll reflects near infrared light, this band composition is useful for analyzing vegetation. In particular, areas in red have better vegetation health. Dark areas are water and urban areas are white.
//calling landsat 8 images - only looking for imagery that covers a single point. Searching for images between these dates
var tonga = ee.ImageCollection('LANDSAT/LC08/C01/T1')
.filterBounds(ee.Geometry.Point(-175.2312, -21.1612))
.filterDate('2014-01-01', '2019-12-31');
// Sort by a cloud cover property, get the least cloudy image.
var image = ee.Image(tonga.sort('CLOUD_COVER').first());
print('Least cloudy image: ', image);
//only show me the following bands to highlight vegitation NIR composite in the map display - notice I change the variable names
var NIR = image.select(['B5', 'B4', 'B3']);
var NIRColor543Vis = {
min: 0.0,
max: 30000.0,
};
//Centered on Tonga and show me in the map changed variable names
Map.setCenter(-175.2312, -21.1612, 6);
Map.addLayer(NIR, NIRColor543Vis, 'veg (543)');
Calculate NDVI for this specific image
lots of options!
https://developers.google.com/earth-engine/exporting
You may want to export data to use in ArcGIS/QGIS
Make a map for your wall
share on social media...
lots of options!