<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: geedevsnairobi</title>
    <description>The latest articles on DEV Community by geedevsnairobi (@geedevsnairobi).</description>
    <link>https://dev.to/geedevsnairobi</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F995547%2F61f4a1e6-3ba2-4f84-8416-7cc9b64c4bc8.png</url>
      <title>DEV Community: geedevsnairobi</title>
      <link>https://dev.to/geedevsnairobi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/geedevsnairobi"/>
    <language>en</language>
    <item>
      <title>A Standard Exploration of Google Earth Engine Feature Collections</title>
      <dc:creator>geedevsnairobi</dc:creator>
      <pubDate>Thu, 23 Nov 2023 18:22:02 +0000</pubDate>
      <link>https://dev.to/geedevsnairobi/a-deep-delve-into-google-earth-engine-feature-collections-4ca</link>
      <guid>https://dev.to/geedevsnairobi/a-deep-delve-into-google-earth-engine-feature-collections-4ca</guid>
      <description>&lt;p&gt;In Google Earth Engine, a &lt;code&gt;Feature&lt;/code&gt; is an object with a &lt;code&gt;geometry&lt;/code&gt; property storing a Geometry object and a properties property storing a dictionary of other properties. &lt;br&gt;
A &lt;code&gt;FeatureCollection&lt;/code&gt; is a &lt;a href="https://developers.google.com/earth-engine/guides/feature_collections"&gt;Groups of combined related features&lt;/a&gt;. &lt;br&gt;
FeatureCollection objects contains features. Naturally, &lt;code&gt;FeatureCollections&lt;/code&gt; contain geometry and properties, and can also contain other collections.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;GeoJSON&lt;/strong&gt; is a data format for encoding a range of geospatial data structures. It supports &lt;em&gt;Point&lt;/em&gt;, &lt;em&gt;Polygon, LineString, MultiLineString&lt;/em&gt; and &lt;em&gt;MultiPolygon&lt;/em&gt; geometries. &lt;/p&gt;

&lt;p&gt;As a &lt;a href="https://earthengine.google.com/"&gt;Google Earth Engine&lt;/a&gt; Developer you might wish to combine features. The feature combining operation, allows for additional geospatial operations on the entire set such as filtering, sorting and rendering. &lt;br&gt;
Individual geometries can also be turned into a &lt;code&gt;FeatureCollection&lt;/code&gt; a single Feature. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Ways to Create a FeatureCollection in GEE&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;&lt;em&gt;1.Geometry Points&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
A FeatureCollection can be created using individual geometries. The geometries can be turned into can a FeatureCollection of just one Feature. An example is the code below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Make a feature with some properties.
var feature = ee.Feature(ee.Geometry.Point([37.393616042129715, -0.012801305697836253]))
  .set('County', 'Meru').set('Meru1', 'Settings');
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;*&lt;em&gt;2. GeometryPolygons *&lt;/em&gt;&lt;br&gt;
Another way to create a &lt;code&gt;FeatureCollection&lt;/code&gt; in GEE is using GeometryPolygons. This technique calls for drawing a Polygon on the map then convert the polygon into a Geometry using the &lt;code&gt;ee.Geometry.Polygon&lt;/code&gt; with Geometries put in a dictionary format. The code prints the geometry properties using the &lt;code&gt;print()&lt;/code&gt; function the adds the polygon into a map using the &lt;code&gt;Map.addLayer()&lt;/code&gt; method. &lt;/p&gt;

&lt;p&gt;The code below plots th polygon of Nairobi county..&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Creating Nairobi Polygon with Geometries
var Nairobi = 
ee.Geometry.Polygon(
        [[[36.668518385879715, -1.2396225227250073],
          [36.695984206192215, -1.354380436474334],
          [36.822326979629715, -1.3928215346108865],
          [36.915710768692215, -1.359872059659389],
          [36.978882155410965, -1.313192869399109],
          [36.976135573379715, -1.2829882209698302],
          [37.028320631973465, -1.2994635284940157],
          [37.075012526504715, -1.3077011420427207],
          [37.105224928848465, -1.2610209794600944],
          [37.061279616348465, -1.2061020716359079],
          [36.998108229629715, -1.2390535525537143],
          [36.970642409317215, -1.2170859434783168],
          [36.918457350723465, -1.2115940131238145],
          [36.885498366348465, -1.1841341953591218],
          [36.836059889785965, -1.2061020716359079],
          [36.792114577285965, -1.1951181554616812],
          [36.745422682754715, -1.228069770585397],
          [36.701477370254715, -1.2610209794600944]]]);
print (Nairobi)
Map.addLayer(Nairobi)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Featurecollection can be added to a map directly with &lt;code&gt;Map.addLayer()&lt;/code&gt; function.&lt;br&gt;
By default, map visualization displays the vectors with a solid black lines and semi-opaque black fill. However, it is possible to render the vectors in a color by specifying the &lt;code&gt;.color&lt;/code&gt; parameter. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Using Shapefile&lt;/strong&gt;&lt;br&gt;
A &lt;strong&gt;shapefile&lt;/strong&gt; is a simple, non-topological format for storing the geometric location and attribute information of geographic features. Within a shapefile geographic features can be represented by lines, points, or polygons/areas. The workspace containing shapefiles may also contain dBASE tables, which can store additional attributes that can be joined to a shapefile's features. &lt;br&gt;
A geographic location-based shapefile can be imported into Earth Engine and be used as a &lt;code&gt;FeatureCollection&lt;/code&gt;. Boundary or administrative shapefile is a good example to demonstrate how to use shapefile as shapefile. &lt;a href="https://data.apps.fao.org/map/catalog/static/search?format=shapefile"&gt;Global Administrative Areas (GADM) 3.6&lt;/a&gt; vector dataset series which includes distinct datasets representing administrative boundaries for all countries in the world. The code below demonstrates how to import FAO’s - GADM 3.6 - Country boundaries (level 0) into Google Earth Engine and use it as a FeatureCollection. The Country boundaries are positioned at level 0 in the GADM 3.6 dataset. In this regard, our code below will focus on Kenya.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;///////////////////Creating FeatureCollection from Dataset /////////////
var admin0 = ee.FeatureCollection('FAO/GAUL_SIMPLIFIED_500m/2015/level2');
var Kenya = admin0.filter(ee.Filter.eq('ADM0_NAME', 'Kenya'));
print(Kenya)
Map.centerObject(Kenya)
Map.addLayer(Kenya)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Visualizing FeatureCollections&lt;/strong&gt;&lt;br&gt;
Once all the operations are completed, it is time to visualize our &lt;code&gt;FeatureCollection&lt;/code&gt;. Like images, geometries and features, FeatureCollections can be visualized on a map using the &lt;code&gt;Map.addLayer()&lt;/code&gt; function. While images are visualized based on the pixel values, feature collections use feature properties/attributes. Vector layers are added on map by assigning a value to the &lt;em&gt;red, green&lt;/em&gt; and &lt;em&gt;blue&lt;/em&gt; channels for individual pixel on the screen based on the geometry and attributes of the features.&lt;/p&gt;

&lt;p&gt;The following functions are used to visualize a vector on map:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;Map.addLayer&lt;/code&gt;: As with raster layers, you can add a FeatureCollection to the Map by specifying visualization parameters. This method supports only one visualization parameter: color. All features are rendered with the specified color.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;draw&lt;/code&gt;: This function supports the parameters &lt;em&gt;pointRadius&lt;/em&gt; and &lt;em&gt;strokeWidth&lt;/em&gt; in addition to color. It renders all features of the layer with the specified parameters.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;paint&lt;/code&gt;: This is a more powerful function that can render each feature with a different color and width based on the values in the specified property.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;style&lt;/code&gt;: This is the most versatile function. It can apply a different style to each feature, including &lt;em&gt;color&lt;/em&gt;, &lt;em&gt;pointSize, pointShape, width, fillColor,&lt;/em&gt; and &lt;em&gt;lineType&lt;/em&gt;.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Filtering a FeatureCollection&lt;/strong&gt;&lt;br&gt;
FeatureCollection filtering techniques resembles that used in ImageCollections. We can filter by Date(), Bounds() among other filtering techniques. While filtering, we use the &lt;code&gt;featureCollection.filter()&lt;/code&gt; method. &lt;/p&gt;

&lt;p&gt;The code below shows how to apply the filtering technique&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/////////////////////Filtering FeatureCollection///////////////
// Load watersheds from a data table.
var sheds = ee.FeatureCollection('USGS/WBD/2017/HUC06')
//  Convert 'areasqkm' property from string to number.
  .map(function(feature){
    var num = ee.Number.parse(feature.get('areasqkm'));
    return feature.set('areasqkm', num);
  });

// Define a region roughly covering the continental US.
var continentalUS = ee.Geometry.Rectangle(-127.18, 19.39, -62.75, 51.29);

// Filter the table geographically: only watersheds in the continental US.
var filtered = sheds.filterBounds(continentalUS);

// Check the number of watersheds after filtering for location.
print('Count after filter:', filtered.size());

// Filter to get only larger continental US watersheds.
var largeSheds = filtered.filter(ee.Filter.gt('areasqkm', 25000));
// Check the number of watersheds after filtering for size and location.
print('Count after filtering by size:', largeSheds.size());
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Extracting Metadata from a FeatureCollection&lt;/strong&gt;&lt;br&gt;
It is possible to extract information from a FeatureCollection like count of features, statistical description, or even perform  mathematical computations on a FeatureCollection.&lt;br&gt;
Let’s say we want to extract for information/metadata from a FeatureCollection using a code in Earth Engine..&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;//////////////////////Extracting FeatureCollection Metadata/////////////
// Load watersheds from a data table.
var Kenya = admin0.filter(ee.Filter.eq('ADM0_NAME', 'Kenya'));
var sheds = ee.FeatureCollection('USGS/WBD/2017/HUC06')
  // Filter to the continental US.
  //.filterBounds(RoI)
  .filterBounds(ee.Geometry.Rectangle(-127.18, 19.39, -62.75, 51.29))
  // Convert 'areasqkm' property from string to number.
  .map(function(feature){
    var num = ee.Number.parse(feature.get('Areasqkm'));
    return feature.set('Areasqkm', num);
  });

// Display the table and print its first element.
Map.addLayer(sheds, {}, 'watersheds');
print('First watershed', sheds.first());

// Print the number of watersheds.
print('Count:', sheds.size());

// Print stats for an area property.
print('Area statistic:', sheds.aggregate_stats('Areasqkm'));
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We have done some of the critical operations required on a FeatureCollection and I believe this helps..any question or comment regarding this topic can be shared in the commend section..&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Getting Started With Google Earth Engine Functions</title>
      <dc:creator>geedevsnairobi</dc:creator>
      <pubDate>Tue, 21 Nov 2023 06:38:36 +0000</pubDate>
      <link>https://dev.to/geedevs-nairobi/earth-engine-functions-2c5d</link>
      <guid>https://dev.to/geedevs-nairobi/earth-engine-functions-2c5d</guid>
      <description>&lt;p&gt;&lt;a href="https://unsplash.com/photos/black-flat-screen-computer-monitor-ZS67i1HLllo?utm_content=creditShareLink&amp;amp;utm_medium=referral&amp;amp;utm_source=unsplash"&gt;Image Credits&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Welcome to GEE Functions in Javascript API.&lt;br&gt;
In Google Earth engine in one way or another you will find yourself using functions either built-in or user-defined.&lt;br&gt;
In this article we will be delving into using both and explore the examples in each of them. &lt;/p&gt;
&lt;h2&gt;
  
  
  What’s a Function?
&lt;/h2&gt;

&lt;p&gt;A function is a set of instructions to perform a specific task. In Google Earth Engine,functions are blocks of code that perform specific operations on geospatial data.They&lt;br&gt;
enable users to process and analyze large-scale earth observation datasets for tasks like image processing, data extraction and spatial analysis.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Code:&lt;/strong&gt; &lt;br&gt;
This refers to a set of instructions written in a programming language (in this case, JavaScript) that tells the computer what operations to perform.&lt;br&gt;
&lt;strong&gt;Function:&lt;/strong&gt; &lt;br&gt;
A function is a block of code that performs a specific task. It takes input(s),processes them, and returns an output.&lt;br&gt;
&lt;strong&gt;Name_of_function:&lt;/strong&gt;&lt;br&gt;
This is a user-defined name given to the function. It helps identify and call the function in the code.&lt;br&gt;
&lt;strong&gt;Input parameters:&lt;/strong&gt;&lt;br&gt;
These are the values or data that you provide to the function for it to work on. They act as "inputs" to the function.&lt;br&gt;
&lt;strong&gt;Call the function:&lt;/strong&gt; &lt;br&gt;
This is where you actually use the function in your code. You provide the required input parameters and execute the function.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
(Input an image of the code)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Define the function
function addNumbers(parameter_1, parameter_2){
return parameter_1 + parameter_2;
}
// Call the function
let result = addNumbers(5, 3);
console.log(result); // Output: 8

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the above example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Function:&lt;/strong&gt; &lt;code&gt;addNumbers&lt;/code&gt; is the name of the function.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Name_of_function:&lt;/strong&gt; &lt;code&gt;addNumbers&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Input parameters:&lt;/strong&gt; &lt;code&gt;parameter_1&lt;/code&gt; and &lt;code&gt;parameter_2&lt;/code&gt; are the input parameters. In this
case, they are the numbers you want to add.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Call the function:&lt;/strong&gt; &lt;code&gt;let result = addNumbers(5, 3);&lt;/code&gt; is where we use the function. We
pass &lt;code&gt;5&lt;/code&gt; and &lt;code&gt;3&lt;/code&gt; as inputs, and it returns &lt;code&gt;8&lt;/code&gt;, which is stored in the &lt;code&gt;result&lt;/code&gt; variable.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Lets dive into variables in functions!!&lt;/p&gt;

&lt;h2&gt;
  
  
  Global &amp;amp; Local Variables
&lt;/h2&gt;

&lt;p&gt;A &lt;strong&gt;local variable&lt;/strong&gt; is a variable that is declared inside of a function. Unlike a global variable,a local variable may only be used inside of the function it is declared in.A variable defined outside a function is a &lt;strong&gt;“global variable”&lt;/strong&gt; and is visible everywhere, including&lt;br&gt;
inside functions.&lt;/p&gt;

&lt;p&gt;We use &lt;strong&gt;“Return”&lt;/strong&gt; to save the output as a global variable.&lt;/p&gt;

&lt;p&gt;(Input Image of the same)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function calculate_divide (num1, num2) {
var diivide = ee.Number(num2).add(ee.Number(num2)); // code that calculates the
divide_test
print(&amp;amp;quot;Local variable, Sum, = &amp;amp;quot;, diivide);
return diivide; // here we use return
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now call and save the output of the function.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Save it as a variable, Sum_test.
var divide_test = calculate_divide(5, 2);
//function call
print(The global variable, divide_test, = ,divide_test);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;diivide&lt;/code&gt; is a local variable, only meaningful within the &lt;code&gt;calculate_divide&lt;/code&gt; function. It cannot be accessed outside of this function.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;divide_test&lt;/code&gt; is a global variable, accessible throughout the entire code. It holds the value returned by &lt;code&gt;calculate_divide&lt;/code&gt; and can be used anywhere in the code.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;In-built Functions&lt;/strong&gt;&lt;br&gt;
Inbuilt functions are pre-existing functions provided by the programming language to perform commonly used operations, making it easier and more efficient for programmers to write code.&lt;br&gt;
(Input Image of code)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;///-------------INBUILT FUNCTIONS--------------
// This generates a list of numbers from 1 to 10.
var myList = ee.List.sequence(1, 10);
// The map() operation takes a function that works on each element independently
// and returns a value. You define a function that can be applied to the input.
var computeSquares = function(number) {
// We define the operation using the EE API.
return ee.Number(number).pow(2);
};
// Apply your function to each item in the list by using the map() function.
var squares = myList.map(computeSquares);
print(squares); // [1, 4, 9, 16, 25, 36, 49, 64, 81]

(var myList = ee.List.sequence(1, 10);) ; This line creates a list of numbers from 1 to
10. When you run this code, it gives an output of [1,2,3,4,5,6,7,8,9,10]
var computeSquares = function(number) {
// We define the operation using the EE API.
return ee.Number(number).pow(2);
};
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the code above, we define a function named &lt;code&gt;computeSquares&lt;/code&gt;. This function takes one parameter &lt;code&gt;number&lt;/code&gt;. Inside the function, it uses the Earth Engine API (&lt;code&gt;ee.Number(number).pow(2)&lt;/code&gt;) to perform an operation. It takes the input &lt;code&gt;number&lt;/code&gt;, converts it to an Earth Engine &lt;code&gt;Number&lt;/code&gt;, and then raises it to the power of 2, effectively squaring it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For example&lt;/strong&gt;, &lt;br&gt;
If you call &lt;code&gt;computeSquares(4)&lt;/code&gt;, it will return &lt;code&gt;16&lt;/code&gt;, because 4 squared is 16.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Apply your function to each item in the list by using the map() function.
var squares = myList.map(computeSquares);
print(squares); // [1, 4, 9, 16, 25, 36, 49, 64, 81]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;myList&lt;/code&gt;: This is the list &lt;code&gt;[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]&lt;/code&gt; that we generated using
&lt;code&gt;ee.List.sequence(1, 10)&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;computeSquares&lt;/code&gt;: This is the function we defined earlier. It takes a number as an
input and returns its square.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;myList.map(computeSquares)&lt;/code&gt;: This applies the &lt;code&gt;computeSquares&lt;/code&gt; function to each
element in &lt;code&gt;myList&lt;/code&gt;, resulting in a new list where each element is the square of the
corresponding element in &lt;code&gt;myList&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;print(squares)&lt;/code&gt;: This prints the resulting list, which contains the squares of the
numbers in &lt;code&gt;myList&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The output of the above code is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[1, 4, 9, 16, 25, 36, 49, 64, 81]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Final Example&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// example of mapping function over a colloection
var s2 = ee.ImageCollection(COPERNICUS/S2_HARMONIZED)
.filter(ee.Filter.lt(CLOUDY_PIXEL_PERCENTAGE, 30))
.filter(ee.Filter.date(2023-01-01, 2023-03-01)
.filter(ee.Filter.bounds(geometry))
.median()
.clip(geometry)
function addIndices(image) {
var ndvi = image.normalizedDifference([B8, B4]).rename(ndvi);
var ndwi = image.normalizedDifference([B3,B8).rename(ndwi);
return image.addBands(ndvi).addBands(ndwi);
}
// Map the function over the collection
// var data = s2.map(addIndices);
print(data)
Step 1: Loading and Filtering an Image Collection
var s2 = ee.ImageCollection(COPERNICUS/S2_HARMONIZED)
.filter(ee.Filter.lt(CLOUDY_PIXEL_PERCENTAGE 30))

.filter(ee.Filter.date(2023-01-01, 2023-03-01))
.filter(ee.Filter.bounds(geometry))
.median()
.clip(geometry)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The code above starts by loading an Image Collection from the Copernicus Sentinel-2 dataset. An Image Collection is a group of images that share a common purpose or source.&lt;/p&gt;

&lt;p&gt;It applies a series of filters:&lt;br&gt;
● &lt;code&gt;filter(ee.Filter.lt(CLOUDY_PIXEL_PERCENTAGE, 30))&lt;/code&gt;: Filters out images with&lt;br&gt;
a cloudy pixel percentage greater than 30%.&lt;br&gt;
● &lt;code&gt;filter(ee.Filter.date(2023-01-01, 2023-03-01))&lt;/code&gt;: Selects images within the date range of January 1, 2023, to March 1, 2023.&lt;br&gt;
● &lt;code&gt;filter(ee.Filter.bounds(geometry))&lt;/code&gt;: Filters based on a specific geographic area defined by the &lt;code&gt;geometry&lt;/code&gt; variable.&lt;br&gt;
● &lt;code&gt;.median()&lt;/code&gt;: Computes the median pixel value across all the filtered images.This creates a single composite image.&lt;br&gt;
● &lt;code&gt;.clip(geometry)&lt;/code&gt;: Clips the resulting composite image to the boundaries defined by the &lt;code&gt;geometry&lt;/code&gt; variable. This ensures that the image only covers a specific geographic area.&lt;/p&gt;

&lt;p&gt;Step 2: Defining a Function&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function addIndices(image) {
var ndvi = image.normalizedDifference([B8,B4]).rename(ndvi);
var ndwi = image.normalizedDifference([B3,B8]).rename(ndwi;
return image.addBands(ndvi).addBands(ndwi);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This code defines a function named &lt;code&gt;addIndices&lt;/code&gt;. A function is like a set of instructions that can be reused.&lt;br&gt;
● &lt;code&gt;function addIndices(image)&lt;/code&gt;: This line declares a function named &lt;code&gt;addIndices&lt;/code&gt;&lt;br&gt;
that takes a parameter &lt;code&gt;image&lt;/code&gt; as input. The &lt;code&gt;image&lt;/code&gt; variable represents one image from the Image Collection.&lt;br&gt;
● &lt;code&gt;var ndvi = image.normalizedDifference([B8,B4).rename(ndvi);&lt;/code&gt;: Inside the&lt;br&gt;
function, it calculates the NDVI (Normalized Difference Vegetation Index) and NDWI (Normalized Difference Water Index) for the input image.&lt;br&gt;
● &lt;code&gt;return image.addBands(ndvi).addBands(ndwi);&lt;/code&gt;: It adds the computed NDVI and NDWI bands to the input image and returns the modified image.&lt;/p&gt;

&lt;p&gt;In summary, the code essentially loads a filtered composite image from the Sentinel-2 dataset, then defines a function (&lt;code&gt;addIndices&lt;/code&gt;) to calculate vegetation and water indices. This function will be applied to the &lt;code&gt;s2&lt;/code&gt; image.&lt;/p&gt;

&lt;p&gt;Thanks for reading and Happy Learning. Come back later for more content on Geospatial Data Science &amp;amp; Remote Sensing.Cheers!!!&lt;/p&gt;

</description>
      <category>functions</category>
      <category>googleearthengine</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Image Compositing, Masking, Mosaicking, Projection, Visualization and Earth Engine Image Exporting</title>
      <dc:creator>geedevsnairobi</dc:creator>
      <pubDate>Sun, 29 Oct 2023 11:20:13 +0000</pubDate>
      <link>https://dev.to/geedevsnairobi/image-compositing-masking-mosaicking-projection-visualization-and-earth-engine-image-exporting-4ige</link>
      <guid>https://dev.to/geedevsnairobi/image-compositing-masking-mosaicking-projection-visualization-and-earth-engine-image-exporting-4ige</guid>
      <description>&lt;p&gt;This week's focus will be a deep dive into exploring imageCollections.&lt;/p&gt;

&lt;p&gt;The learning objectives of this article are:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Image Compositing&lt;/li&gt;
&lt;li&gt;Image Masking and mosaicking&lt;/li&gt;
&lt;li&gt;Image Projection and Reprojection
&lt;/li&gt;
&lt;li&gt;ImageCollection visualization&lt;/li&gt;
&lt;li&gt;ImageCollection Exporting to Google Drive&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Like any other data science project, our first step is to define our region of interest. On defining the area of interest, we will set the map output at the center. For this project, our objective is to create a composite for Nairobi region in Kenya. We will then use Landsat 8 USGS Landsat 8 Collection 2 Tier 1 TOA Reflectance. Let us load Landsat 8 from the &lt;a href="//ttps://developers.google.com/earth-engine/datasets/catalog"&gt;Earth Engine Data Catalogue&lt;/a&gt;. We will search Landsat 8, &lt;a href="https://developers.google.com/earth-engine/datasets/catalog/LANDSAT_LC08_C02_T1_TOA" rel="noopener noreferrer"&gt;USGS Landsat 8 Collection 2 Tier 1 TOA Reflectance&lt;/a&gt; through the search bar then click import. The below image details will appear. The image contains multiple properties which can be explored for easy image preprocessing. At this page, we can import again at the lower button to load the data into Earth Engine code editor.  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm39rs8l1i3ys0vrnw0dw.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm39rs8l1i3ys0vrnw0dw.PNG" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When we import the image, it will appear at the top of Earth Engine code editor under the imports as a variable with a default name imageCollection for the case of Image Collections. If &lt;br&gt;
To produce filter imageCollection we will narrow to the year of 2016 by &lt;a href="https://developers.google.com/earth-engine/apidocs/ee-imagecollection-filterdate" rel="noopener noreferrer"&gt;filtering by dates&lt;/a&gt; with use of the &lt;code&gt;ee.ImageCollection.filterDate&lt;/code&gt; function then &lt;a href="https://developers.google.com/earth-engine/apidocs/ee-imagecollection-filterbounds" rel="noopener noreferrer"&gt;filter by region&lt;/a&gt; of interest using &lt;code&gt;ee.ImageCollection.filterBounds&lt;/code&gt; functions. &lt;/p&gt;

&lt;p&gt;Let us try to access Landsat-8 into Earth Engine editor&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var Landsat8 = ee.ImageCollection('LANDSAT/LC08/C02/T1_TOA')
                .filterDate('2016-01-01', '2016-12-31')
                .filterBounds(roi);
var dataset = Landsat8.select(['B4', 'B3', 'B2']);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When the image is loaded it is important to position the image at the center of the Earth Engine interface by issuing coordinates for our region of interest and a zoom level. To &lt;a href="https://developers.google.com/earth-engine/apidocs/map-setcenter" rel="noopener noreferrer"&gt;center our image&lt;/a&gt;, we use &lt;code&gt;Map.setCenter&lt;/code&gt; function. We then add &lt;code&gt;Map.addLayer&lt;/code&gt; function to visualize the image at the center of the Earth Engine Interface. &lt;/p&gt;

&lt;h4&gt;
  
  
  ImageCollection Compositing
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://developers.google.com/earth-engine/guides/ic_composite_mosaic" rel="noopener noreferrer"&gt;Image compositing&lt;/a&gt; is the technique in Google Earth Engine used to combine spatially overlapping images into a single image based on an aggregation function like Mean, Median etc.&lt;br&gt;
For example, we can create an image composite by applying a selection criterion to each pixel based on all pixels in the stack. The images could be taken at different times. &lt;br&gt;
Here we use the &lt;code&gt;.median()&lt;/code&gt; function to create a composite where each pixel value is the median of all pixels from the stack.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa35r1ms07ub07p4chrel.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa35r1ms07ub07p4chrel.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If we want to create an image composite, &lt;code&gt;ee.ImageCollection&lt;/code&gt; class is an handy function. It allows image collection manipulation and processing of large image collections. Let us try to create an image composite with &lt;code&gt;ee.ImageCollection.median()&lt;/code&gt;. &lt;br&gt;
Other functions which can used to create an image composite could be &lt;code&gt;ee.ImageCollection.qualityMosaic()&lt;/code&gt;, and &lt;code&gt;ee.ImageCollection.mosaic()&lt;/code&gt;. &lt;/p&gt;

&lt;p&gt;Let us try compositing our imagecollection by mean function.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Image compositing
var compositing = dataset.median();
Map.addLayer(compositing, visParams, 'This is an Image Composite'); 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Image Mosaicking
&lt;/h4&gt;

&lt;p&gt;Besides image compositing we can also perform &lt;a href="https://developers.google.com/earth-engine/guides/ic_composite_mosaic" rel="noopener noreferrer"&gt;image mosaicking&lt;/a&gt; which is the process of assembling spatial image datasets to produce a single spatially continuous image. During mosaicking process, each pixel in the output image is taken from a different input image. Mosaicking process is often used to fill in a gap of data – used when there is missing data in some of the input images and there is a need for a complete image.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var mosaicking = dataset.mosaic();
// Display the median imageColle after mosaicing.
Map.addLayer(mosaicking, visParams, 'This is mosaiced Image');
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Earth Engine Reducers
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://developers.google.com/earth-engine/guides/reducers_intro" rel="noopener noreferrer"&gt;Earth Engine Reducers&lt;/a&gt; are objects used aggregate data over time, bands, space, and arrays.&lt;br&gt;
When computing an imageCollection &lt;code&gt;ee.Reducer&lt;/code&gt; class specifies the technique of data aggregation. Let us say you want to perform simple statistics, you can use the aggregation functions such as (min, mean, max, median, and standard deviation). It is important to note that, reducers take input dataset to produce a single output. Reducers result to a single image upon successful completion of pixel computations.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var Landsat8 = ee.ImageCollection('LANDSAT/LC08/C02/T1_TOA')
                .filterDate('2016-01-01', '2016-12-31')
                .filterBounds(roi);             
var dataset = Landsat8.select(['B4', 'B3', 'B2']);              
// Define visualization parameters
var visParams = {
bands: ['B4', 'B3', 'B2'], 
min: 0.0,
max: 0.4};
Map.setCenter(36.90966120185066,-1.2781566341946728, 6);
Map.addLayer(dataset, visParams, 'Image before reduction is done');
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There are different ways to reduce an image. I will share some code here for more exploration&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Get the median,mean,max,min,sum,product over time, in each band, in each pixel.
var median = dataset.median();
Map.addLayer(median, visParams, ' Median Reduction');

var mean = dataset.mean();
Map.addLayer(mean, visParams, ' mean Reduction');

var max = dataset.max();
Map.addLayer(max, visParams, ' Max Reduction');

var min = dataset.min();
Map.addLayer(min, visParams, ' min Reduction');

var sum = dataset.sum();
Map.addLayer(sum, visParams, ' sun Reduction');

var product = dataset.product();
Map.addLayer(product, visParams, ' product Reduction');
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  ImageCollection Projection &amp;amp; Re-projection
&lt;/h4&gt;

&lt;p&gt;Unless you need to perform a specific computation, there is no need to specify a new projection.&lt;br&gt;&lt;br&gt;
There is no need to worry about map projection when working in Google Earth Engine because the computation scale is a pull function. Inputs are asked during projection process and the outputs can be determined from functions like (crs). A projection propagates back via sequence of operations. &lt;/p&gt;
&lt;h4&gt;
  
  
  ImageCollection Visualization
&lt;/h4&gt;

&lt;p&gt;ImageCollection &lt;a href="https://developers.google.com/earth-engine/guides/ic_visualization" rel="noopener noreferrer"&gt;Visualization&lt;/a&gt; is the activity of displaying the prepared image on the map to extract insightful information or exportinting it to drive, assets, or Google cloud for extended analysis. When an image is processed it cannot appear automatically on the map, as a result we need to write some code to display our processed image. Image Compositing can be visualized as either an animation or a series of thumbnails. We need to add ImageCollection layer to the map panel then read it using Map.addLayer method. In it we have to define the visualization parameters, bands, minimum and maximum values, color palette and opacity for better image visualization. In case you add a new map layer without any additional parameters, the code editor assigns the first three bands to red, green and blue, respectively. To achieve a good visualization effect it is advisable you provide image visualization parameters to &lt;code&gt;Map.addLayer()&lt;/code&gt; method. &lt;/p&gt;
&lt;h4&gt;
  
  
  Earth Engine ImageCollection Exporting
&lt;/h4&gt;

&lt;p&gt;Image you have prepared your image and it is now time to export it for further analysis with external softwares. &lt;a href="https://developers.google.com/earth-engine/guides/exporting_images" rel="noopener noreferrer"&gt;Exporting Images&lt;/a&gt; can take different forms in Earth Engine, firstly could export in form of a &lt;em&gt;GeoTIFF&lt;/em&gt; or &lt;em&gt;TFRecord&lt;/em&gt; format. Other exportable items from Earth Engine include map tiles, tables and video. &lt;/p&gt;

&lt;p&gt;Places to export these earth engine items;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Export to Google Drive &lt;/li&gt;
&lt;li&gt;Export to Google Cloud Storage &lt;/li&gt;
&lt;li&gt;Export to a new Earth Engine asset.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The first step in image exporting process is defining the data to be exported. Next is to define the projection parameters. In this case, we use the &lt;code&gt;crs&lt;/code&gt; parameter to specify the coordinate system and the crsTransform parameter to precisely specify the pixel grid. When done it is time to export an image to Drive account, using the &lt;code&gt;Export.image.toDrive()&lt;/code&gt;function.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Export the image, specifying the CRS, transform, and region.
Export.image.toDrive({
  image: landsat,
  description: 'imageToDriveExample_transform',
  crs: projection.crs,
  crsTransform: projection.transform,
  region: geometry
});
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On running the above code snippet an export task is created in the Code Editor Task tab. Go to this tab and click Run button to start it. When completed, the image will be created in your Google Drive account within the specified folder and fileFormat. &lt;/p&gt;

</description>
    </item>
    <item>
      <title>Using Earth Engine asset ID to access ImageCollection in Earth Engine IDE for filtering</title>
      <dc:creator>geedevsnairobi</dc:creator>
      <pubDate>Sun, 29 Oct 2023 10:18:26 +0000</pubDate>
      <link>https://dev.to/geedevs-nairobi/using-earth-engine-asset-id-to-access-imagecollection-in-earth-engine-ide-for-filtering-462p</link>
      <guid>https://dev.to/geedevs-nairobi/using-earth-engine-asset-id-to-access-imagecollection-in-earth-engine-ide-for-filtering-462p</guid>
      <description>&lt;p&gt;Google Earth Engine – a geospatial cloud platform for planetary-scale geospatial analysis with extensive computational capabilities brings an array of high-impact societal challenges including drought, disaster, deforestation, water pollution monitoring, food security, climate monitoring and environmental protection. An exciting feature of Earth Engine is the ability to host petabytes of raster data - Images then processes them within the cloud platform without downloading the enormous remote – sensing to your computer. &lt;/p&gt;

&lt;p&gt;imageCollection defines a stack of similar image objects. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;It is like saying, Image + Image = imageCollection&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Today we will focus on writing codes related to imageCollection in the Earth Engine Code Editor. &lt;br&gt;
We will;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Access raster image collections from Earth Engine data catalog&lt;/li&gt;
&lt;li&gt;Filter them temporally - by a date&lt;/li&gt;
&lt;li&gt;Filter spatially – by region or bound&lt;/li&gt;
&lt;li&gt;Filter clouds&lt;/li&gt;
&lt;li&gt;Explore some image processing functions like .max&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Our true Hypothesis is that before getting into writing everybody has a verified Google Earth Engine Account. If not refer to our &lt;a href="https://dev.to/geedevs-nairobi/creating-an-earth-engine-cloud-project-4gja"&gt;previous article&lt;/a&gt; on how to get you ready. &lt;/p&gt;
&lt;h3&gt;
  
  
  Accessing ImageCollection from Earth Engine catalog
&lt;/h3&gt;

&lt;p&gt;This is the first step, done using the Image’s Earth Engine ID.  Another approach to use ImageCollection is by creating ImageCollection from lists of images. It is possible also to create new imageCollections by merging existing collections. The &lt;code&gt;print&lt;/code&gt; function will print Image information on the console. However, the console printout cannot print more than 5000 elements. Anytime you print a large collection will be correspondingly slower or result to the below error..&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--NwxEhVF4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rtferpf0u8ytyzud6xto.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--NwxEhVF4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rtferpf0u8ytyzud6xto.PNG" alt="Image description" width="544" height="87"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;At this time we are going to start by loading our imagineCollection from Google Earth Engine.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Loading the image collection using the `ImageCollection` constructor

var sent2Coll = ee.ImageCollection('COPERNICUS/S2_SR')
                //Filter dates
                  .filterDate('2010-01-01', '2016-12-31');
// print the output
print(sent2Coll);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Imagine you are a seasoned Pro, and you wanted to Do it yourself – create your own imageCollection. Earth Engine has this &lt;code&gt;ee.ImageCollection.fromImages()&lt;/code&gt; enabling function. Please try the below code in your Earth Engine Code Editor to test it.&lt;/p&gt;

&lt;p&gt;Create a collection with &lt;code&gt;fromImages()&lt;/code&gt; function in the earth engine.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var collFromImages = ee.ImageCollection.fromImages(
  [ee.Image(3), ee.Image(4), ee.Image(5), ee.Image(6)]);  
print('collFromImages: ', collFromImages);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Another exciting hack is creating arbitrary constant images using the Image constructor. This is very useful when wanting to test a hypothesis or creating a data model to validate results from a comparing method or procedure. Let us say you’re a research fellow at World Resource Institute, and you want to create a land cover classification and cloud-free imageCollection..the following code would be handy to while trying to crack codes at Carbon lab, &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create imageCollection from Images 
This approach works best when we want to create arbitrary constant images with help of an Image constructor
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var image1 = ee.Image([1, 2,3])
var image2 = ee.Image([1, 2,3])
var image3 = ee.Image([1, 2,3])
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Earth Engine ImageCollection Filtering Techniques
&lt;/h3&gt;

&lt;p&gt;Up to this point, we have our data ready in the EE IDE ready to start our preprocessing steps – Filtering, and performing mathematical functions. As illustrated in the Image Filtering section, Earth Engine provides a range of convenient approaches to filter image collections. We will quickly start with filtering our image collection and getting the first image out of the collection. In this case &lt;code&gt;.first()&lt;/code&gt; will be useful. Just see how to implement it. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Filter first image in ImageCollection&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The &lt;code&gt;.first&lt;/code&gt; method helps us get the first image in the image collection stack.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  var firstImage = sentinel2Collection.first()
  print(firstImage)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Filter by bounds&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Filter bounds function is essential when we want to concentrate our focus in the area of interest.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  var second = sentinel2Collection.bound()
  print(second)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Filter Clouds in ImageCollection &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Imagine working on a project which is going to positively impact people living in severely cloud-affected region. How would you ensure reliability, effectiveness and efficiency of your project?  Cloud coverage is a major challenge in space-borne optical remote sensing as it hampers real-time monitoring of the earth’s surface. The code below will show you how to remove clouds from an ImageCollection. The resulting image is artifact-free &lt;/p&gt;

&lt;p&gt;Earth observation projects face the &lt;a href="https://iaes.cgiar.org/spia/news/challenges-using-earth-observation-data-impact-evaluation"&gt;data generating process challenge&lt;/a&gt;. As a result, developers, and researchers ought to deal with clouds while conducting land cover, or even vegetation analysis for better results.&lt;/p&gt;

&lt;p&gt;Earth Engine provides an array of techniques for filtering image collections. Some of the frequently used filtering techniques are;  &lt;code&gt;imageCollection.filterDate()&lt;/code&gt;, and &lt;code&gt;imageCollection.filterBounds()&lt;/code&gt;. For general purpose filtering, use &lt;code&gt;imageCollection.filter()&lt;/code&gt; with an &lt;code&gt;ee.Filter&lt;/code&gt; as an argument. &lt;br&gt;
 both convenience methods and filter() to identify and remove images with high cloud cover from an ImageCollection.&lt;br&gt;
Let us try to filter by date, then bounds then ensure we filter to remove all clouds - to remove all clouds we use the &lt;code&gt;ee.Filter.eq&lt;/code&gt; method then assign cloud_cover as 0.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var collection = ee.ImageCollection('LANDSAT/LC08/C02/T1_TOA')
  .filterDate('2016-01-01', '2018-01-01')  
  .filter(ee.Filter.calendarRange(11, 2, 'month'))  
  .filterBounds(ee.Geometry.Point(25.8544, -18.08874));  

// Filter the collection by the CLOUD_COVER property.
var filtered = collection.filter(ee.Filter.eq('CLOUD_COVER', 0));
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Exploring ImageCollection Properties and Metadata
&lt;/h4&gt;

&lt;p&gt;We can get to know more details of an ImageCollection by exploring its details. While data information provided in data catalog is essential, some Earth Engine functions could be handy in deeper image exploration. Let us say for example we want to print image objects to explore band names, projection information, properties, and other metadata. &lt;/p&gt;

&lt;p&gt;Let us try to print metadata of our image&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Load an image.
var image = ee.Image('COPERNICUS/S2_SR');

// Display all metadata.
print('This is Image metadata:', image);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We could get a list of all metadata properties using the following code.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var properties = image.propertyNames();
print('Metadata properties:', properties);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Count the images in an ImageCollection Stack
Let us, try to count the number of images - the &lt;code&gt;.size&lt;/code&gt; method used in the below code prints the total number of the images contained in the ImageCollection stack.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;print(sentinel2Collection.size());
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Like any other data science project, while working with in &lt;a href="https://datadrivenlab.org/big-data-2/google-earth-engine-tutorial/"&gt;geospatial data analysis&lt;/a&gt; we can do statistical computations within Earth Engine Code Editor. The interesting part of it is that it does not infer image pixels based on statistical models but utilizes the posteriori information measured. &lt;/p&gt;

&lt;p&gt;The &lt;code&gt;.aggregate_stats&lt;/code&gt; function in image filtering process help us to understand basic statistical information about the imageCollection. Information about standard deviation, can be understood when we use the &lt;code&gt;.aggregate_stats function&lt;/code&gt;.  &lt;/p&gt;

&lt;p&gt;Let us try it&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// get statistics for a image coll
var Stats = dataset.aggregate_stats('SUN_ELEVATION');
print(Stats);

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Imagine during your imageCollection preparation you wanted to get its mean value, the &lt;code&gt;.mean&lt;/code&gt; method would be helpful at this point. &lt;/p&gt;

&lt;p&gt;I would like we try it,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// var mean = dataset.mean(); 
// print(mean);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;--- and we are done for today. I will appreciate hearing from you. You can share your recommendations, suggestions or enquiries for better articles in the future.   &lt;/p&gt;

&lt;p&gt;Writer &lt;a href="https://www.linkedin.com/in/nicholas-musau/"&gt;Nicholas Musau&lt;/a&gt;&lt;/p&gt;

</description>
      <category>earth</category>
      <category>googlecloud</category>
      <category>opensource</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Creating an Earth Engine Cloud Project</title>
      <dc:creator>geedevsnairobi</dc:creator>
      <pubDate>Sun, 15 Oct 2023 09:39:28 +0000</pubDate>
      <link>https://dev.to/geedevs-nairobi/creating-an-earth-engine-cloud-project-4gja</link>
      <guid>https://dev.to/geedevs-nairobi/creating-an-earth-engine-cloud-project-4gja</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--rhIoh9G_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q95119hu36tvr2m9kj8g.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--rhIoh9G_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q95119hu36tvr2m9kj8g.jpg" alt="Image Credits:https://www.researchgate.net/figure/The-infrastructure-for-developing-spatial-applications-provided-by-Google-1-cloud_fig1_350147256" width="800" height="402"&gt;&lt;/a&gt; Image &lt;a href="https://www.researchgate.net/figure/The-infrastructure-for-developing-spatial-applications-provided-by-Google-1-cloud_fig1_350147256"&gt;credits&lt;/a&gt;&lt;br&gt;
Google Earth Engine is a Geospatial cloud platform that enable monitoring users to monitor and measure earth and environmental changes at a planetary scale. It hosts 70 plus petabytes of historic and present earth observation data in its’ data catalog. The cloud platform offers intrinsically-parallel computation access to thousands of cloud computers. Even though the initial intent was to enhance the scientists’ operational deployment methods, while strengthening public institutions and NGOs’ ability to understand, manage and report on natural resources, Earth Engine is gradually getting adoption in various industries and commercial operations. Earth Engine cloud platform supports crucial geospatial data preprocessing techniques like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Generation of on-demand of spatial and temporal mosaics&lt;/li&gt;
&lt;li&gt;Fast calculation and computation of a range of spectral indices
&lt;/li&gt;
&lt;li&gt;Computation of best-pixels composites- removal of image clouds and gaps in imageries&lt;/li&gt;
&lt;li&gt;Machine learning operations in the cloud IDE on satellite imageries&lt;/li&gt;
&lt;li&gt;Creating of publishable geospatial Apps&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Earth Engine is integrated with Google Cloud Platform through the Earth Engine REST API. Users make calls to the Earth Engine through a cloud project. It is imperative to register Earth Engine projects to facilitate accessing of Earth Engine API which;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Enables usage of satellite data in the data catalog &lt;/li&gt;
&lt;li&gt;Monitoring of EE apps at project level &lt;/li&gt;
&lt;li&gt;Manage assets and permissions in the platform &lt;/li&gt;
&lt;li&gt;Monitor success rate of requests send to Earth Engine service – this helps to debug and optimize Earth Engine powered workflows&lt;/li&gt;
&lt;li&gt;Facilitates permissions to configured applications &lt;/li&gt;
&lt;li&gt;Manages project groups or collaborators&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Let’s Get started
&lt;/h3&gt;

&lt;p&gt;The first step is to go directly to this &lt;a href="https://developers.google.com/earth-engine/cloud/earthengine_cloud_project_setup"&gt;page&lt;/a&gt;. To make EE calls with Google Cloud Project (GCP), you’ll need to have a Google Account, Google Cloud Project then enable Earth Engine API to that project.&lt;/p&gt;

&lt;p&gt;Enabling a Cloud Project with Earth Engine helps to;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use the REST API &lt;/li&gt;
&lt;li&gt;Use a service account for authentication&lt;/li&gt;
&lt;li&gt;Create an App Engine app that uses Earth Engine &lt;/li&gt;
&lt;li&gt;Use a Client ID to uniquely identify an App and pass user credentials&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The first step is to click on &lt;strong&gt;Create a Cloud project&lt;/strong&gt; button if you did not have it before, then follow the steps to have a successful cloud project. &lt;br&gt;
Next is to click the button &lt;strong&gt;Enable the Earth Engine API&lt;/strong&gt; for your created project &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--gnzuWV9X--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/skle8j1jop94gazksctd.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gnzuWV9X--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/skle8j1jop94gazksctd.PNG" alt="Setting up Earth Engine enabled Cloud Project" width="800" height="526"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The next step is to go to Enable Engine API, the photo below shows you how to go about it, &lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--MN7B5-Jh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f4rd35j9fjm04bkglowa.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--MN7B5-Jh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f4rd35j9fjm04bkglowa.PNG" alt="Enable Engine API to Google Cloud Project" width="679" height="391"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Up to this point we've created a Google Cloud Project and Enabled our Earth Engine API.&lt;/p&gt;

&lt;p&gt;Next is to create an Earth Engine Project, go to this &lt;a href="https://code.earthengine.google.com/register"&gt;link&lt;/a&gt; for easy access of the page. For learning purposes we'll register the &lt;strong&gt;noncommercial&lt;/strong&gt; option, then in the step select Unpaid usage. We have to select our project type. Since we are getting started, we have to &lt;strong&gt;Create a new Google Cloud Project&lt;/strong&gt; then continue to summary.  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--V-Z3h8c4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vs9r7dibs6d5vd2olbfh.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--V-Z3h8c4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vs9r7dibs6d5vd2olbfh.PNG" alt="Setting up google earth engine client account" width="716" height="748"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The next step is to enter our project name, then go to confirm page which upon clicking will prompt us to land on the Google Earth Engine IDE. At this point we're good to get started in working on other Earth Engine projects. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--btMeg5I0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ax5mqmw1hohq7gy8r9aw.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--btMeg5I0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ax5mqmw1hohq7gy8r9aw.PNG" alt="Google Earth Engine Coding Interface" width="800" height="180"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Article Writer: &lt;a href="https://dev.to/nicmsn2"&gt;Nicholas Musau&lt;/a&gt;&lt;/p&gt;

</description>
      <category>googlecloud</category>
      <category>earthengine</category>
      <category>sustainability</category>
      <category>developers</category>
    </item>
    <item>
      <title>Introduction to GEE, CLIMATE Engine, and Satellite Data</title>
      <dc:creator>geedevsnairobi</dc:creator>
      <pubDate>Fri, 28 Apr 2023 05:49:52 +0000</pubDate>
      <link>https://dev.to/geedevs-nairobi/introduction-to-gee-climate-engine-and-satellite-data-2l7c</link>
      <guid>https://dev.to/geedevs-nairobi/introduction-to-gee-climate-engine-and-satellite-data-2l7c</guid>
      <description>&lt;h2&gt;
  
  
  Contents
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Earth data&lt;/li&gt;
&lt;li&gt;Google Earth engine&lt;/li&gt;
&lt;li&gt;Climate Engine&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--BnzgzssS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eqs71u000zuvf27oi1rb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BnzgzssS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eqs71u000zuvf27oi1rb.png" alt="Image description" width="752" height="424"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Earthdata:
&lt;/h2&gt;

&lt;p&gt;Is the home for full and open access to NASA's Earth science data collections, accelerating scientific advancement for societal benefit.&lt;/p&gt;

&lt;h2&gt;
  
  
  Google Earth Engine:
&lt;/h2&gt;

&lt;p&gt;Is a geospatial processing service. With Earth Engine, you can perform geospatial processing at scale, powered by the Google Cloud Platform. The purpose of Earth Engine is to: Provide an interactive platform for geospatial algorithm development at scale.&lt;/p&gt;

&lt;h2&gt;
  
  
  Climate Engine:
&lt;/h2&gt;

&lt;p&gt;The Climate Engine enables users to quickly process and visualize satellite earth observations and gridded weather data for environmental monitoring and to improve early warning of drought, wildfire, and crop-failure risk. Instead of processing entire archives, focus on data discovery and answers.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--nLbMCyCX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uq51i5o790hwf4oeqobu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--nLbMCyCX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uq51i5o790hwf4oeqobu.png" alt="Image description" width="762" height="413"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--wEI6JvjR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ogdv05iha9zyr8jzc5iz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--wEI6JvjR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ogdv05iha9zyr8jzc5iz.png" alt="Image description" width="751" height="420"&gt;&lt;/a&gt;&lt;br&gt;
The figure above shows the remote sensing workflow that one needs to follow for their end-to-end projects and illustrates that we can download data all at once and then focus on the type of problem we are trying to solve in data science.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--hGvw1t8m--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/od5tedaxyj32xgqgywg7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hGvw1t8m--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/od5tedaxyj32xgqgywg7.png" alt="Image description" width="749" height="429"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;GEE has alot of datasets ranging from using satellites like Landsat, Copernicus, NOOA, and MODIS.among these the data is either updated daily as for modis,others maybe weekly while others are monthly.&lt;br&gt;
According the GEOFORGOOD2019 we have 290 public datasets which means 5 million images.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--L4CPLket--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1r5s9ehjj04igglolq7b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--L4CPLket--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1r5s9ehjj04igglolq7b.png" alt="Image description" width="784" height="437"&gt;&lt;/a&gt;&lt;br&gt;
The image represents the ease of use of the platforms to perform geospatial calculations. Javascript editor is the fastest in computation as it is cloud-based. Python comes second and we need to prefer Google Colab as its the second in the hierarchy.&lt;/p&gt;

&lt;p&gt;As we have many images over the years it would be important as a geospatial data scientist to make sure you filter your images to only the required period, in this case, we use “filterdate” , command as shown below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--qOtP7apX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4gyhfzh99exed4csc4xy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--qOtP7apX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4gyhfzh99exed4csc4xy.png" alt="Image description" width="722" height="398"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Again we can reduce images either by mean or median which would work well if you have a large coverage area.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ueP3gUL---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x1ffczu90sat2h1w5ix9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ueP3gUL---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x1ffczu90sat2h1w5ix9.png" alt="Image description" width="701" height="435"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We can also have optical or synthetic images&lt;br&gt;
Synthetic Imaging is the creation of two-dimensional optical images by means of mathematical modeling computations of compiled data rather than by the more traditional photographic process of using light waves focused through cameras or other optical instruments.&lt;/p&gt;

&lt;h2&gt;
  
  
  GEE API &amp;amp; Machine Learning
&lt;/h2&gt;

&lt;p&gt;We have different classifiers to do classification, regression, and clustering EE. Here is the list.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--nx3FtTxt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/azw2qxpqg67ninzohf30.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--nx3FtTxt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/azw2qxpqg67ninzohf30.png" alt="Image description" width="753" height="421"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you are using tensorflow for either academic or commercial use you will have to pay or rather it will come at a cost since it uses GCP assets.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--r2K7iTGb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wgo8a4iduqbhqi5owdk5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--r2K7iTGb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wgo8a4iduqbhqi5owdk5.png" alt="Image description" width="751" height="418"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Google Eart Engine Experts
&lt;/h2&gt;

&lt;p&gt;Who is a GEE expert?&lt;br&gt;
Google Developers Expert is a person recognized by Google as having exemplary expertise in web technologies or Google Developers product.&lt;br&gt;
Google usually has different categories of experts from Android, web,machine learning,GEE etc.&lt;br&gt;
The list below shows the first GEE experts in 2022.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--1PRQHA1A--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i42rb7w4zg9r20eaupgj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--1PRQHA1A--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i42rb7w4zg9r20eaupgj.png" alt="Image description" width="750" height="428"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Process Of Becoming a GEE Expert
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Nomination by anyone in the Google team.&lt;/li&gt;
&lt;li&gt;Screening&lt;/li&gt;
&lt;li&gt;Interviews&lt;/li&gt;
&lt;li&gt;Announcement&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Credits &lt;a href="https://www.linkedin.com/in/keiko-nomura-phd-0231891/"&gt;Keiko Nomura, PhD ,Director Of Science Applications, SpatiaFi&lt;br&gt;
&lt;/a&gt;&lt;br&gt;
Thank you!&lt;/p&gt;

</description>
      <category>earthengine</category>
      <category>remotesensing</category>
      <category>googlecloud</category>
    </item>
    <item>
      <title>Getting Started with Google Earth Engine</title>
      <dc:creator>geedevsnairobi</dc:creator>
      <pubDate>Fri, 28 Apr 2023 05:15:58 +0000</pubDate>
      <link>https://dev.to/geedevs-nairobi/getting-started-with-google-earth-engine-5ei</link>
      <guid>https://dev.to/geedevs-nairobi/getting-started-with-google-earth-engine-5ei</guid>
      <description>&lt;p&gt;Google Earth Engine (EE) is a planetary cloud platform which supports data catalogue and the online IDE. It runs on Google’s cloud infrastructure and boasts a petabyte-scale database. The Earth Engine's public &lt;a href="https://developers.google.com/earth-engine/datasets"&gt;data catalog&lt;/a&gt; provides more than 40 years of historical imagery and scientific datasets, including satellite data like Landsat, Sentinel-2, and MODIS, as well as geophysical, weather, climate, and demographic data.&lt;/p&gt;

&lt;p&gt;EE is a useful Earth Observation cloud platform using Geospatial Data to Fight Climate Change which can help us;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Monitor area of water body, vegetation, and other land uses&lt;/li&gt;
&lt;li&gt;Monitor the atmosphere&lt;/li&gt;
&lt;li&gt;Correlate area with production in agriculture&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Google Earth Engine present the following benefits that makes it easy for use.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Completely cloud-native (No image download, no HPC)&lt;/li&gt;
&lt;li&gt;JavaScript and Python&lt;/li&gt;
&lt;li&gt;Easy web app&lt;/li&gt;
&lt;li&gt;Intergradation with external API and visualization with Kepler.gl&lt;/li&gt;
&lt;li&gt;Petabyte worth of datasets&lt;/li&gt;
&lt;li&gt;Free for non-profit
Two Dataset Types: Image VS Image Collection&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Things which do not change much over time e.g. elevation&lt;/li&gt;
&lt;li&gt;Things that change e.g. temperature, precipitation&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Loading image in GEE Code Editor in JavaScript&lt;br&gt;
We declare var name then use the ee.Image an object used to represent an Earth Engine Image followed by the Image itself.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var elevation_dataset = ee.Image("NASA/NASADEM_HGT/001")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;More detailed&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Import the dataset and select the elevation band.
var dataset = ee.Image('NASA/NASADEM_HGT/001');
var elevation = dataset.select('elevation');

// Add a white background image to the map.
var background = ee.Image(1);
Map.addLayer(background, {min: 0, max: 1});

// Set elevation visualization properties.
var elevationVis = {
  min: 0,
  max: 2000,
};
// Set elevation &amp;lt;= 0 as transparent and add to the map.
Map.addLayer(elevation.updateMask(elevation.gt(0)), elevationVis, 'Elevation');
Map.setCenter(17.93, 7.71, 2);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Alternatively when loading Image Collection we use the ImageCollection object.&lt;/p&gt;

&lt;p&gt;An ImageCollection is a stack or sequence of images. An ImageCollection can be loaded by pasting an Earth Engine asset ID into the ImageCollection constructor found in ImageCollection IDs in the data catalog. For example, to load the Sentinel-2 surface reflectance collection:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var sentinelCollection=ee.ImageCollection('COPERNICUS/S2_SR');
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;More detailed&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var ImageColl = ee.ImageCollection('MODIS/006/MOD13A1')
                                  // Filter by dates
                  .filter(ee.Filter.date('2015-03-01', '2020-03-31'))
                  .select('NDVI') //select the NDVI
                  .mean()         //create a composite of mean
                  .clip(Roi);     //clip the map to region of interest

var ndviParams = {min: -2000, max: 10000, palette: [
    'FFFFFF', 'CE7E45', 'DF923D', 'F1B555', 'FCD163', '99B718', '74A901',
    '66A000', '529400', '3E8601', '207401', '056201', '004C00', '023B01',
    '012E01', '011D01', '011301'
  ]};
                                  // zoom the map at the center 
Map.centerObject(Roi, 7)
                                  // create the layers to be printed 
Map.addLayer(ImageColl,ndviParams,'NDVI2')
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Reducing an ImageCollection
&lt;/h2&gt;

&lt;p&gt;Reducers in EE are used to aggregate data over time, space, and other data structures. To composite images in an ImageCollection, use imageCollection.reduce(). This will composite all the images in the collection to a single image representing. They belong to the ee.Reducer class. Specifically, the output is computed pixel-wise, such that each pixel in the output is composed of the median value of all the images in the collection at that location. To get other statistics, such as min, max, standard deviation, mean, sum, variance, or even an arbitrary percentile, of the images. The appropriate reducer should be selected and applied appropriately.&lt;br&gt;
Reducers take an input dataset and produce a single output. When a single input reducer is applied to a multi-band image, Earth Engine automatically replicates the reducer and applies it separately to each band. As a result, the output image has the same number of bands as the input image; each band in the output is the reduction of pixels from the corresponding band in the input data. Some reducers take tuples of input datasets. These reducers will not be automatically replicated for each band. For example, ee.Reducer.LinearRegression() takes multiple predictor datasets (representing independent variables in the regression) in a particular order.&lt;br&gt;
Learn more about Reducers from Reducer Overview page and Image Reduction approaches&lt;/p&gt;

&lt;p&gt;There two types of reducers&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Vertical Reduce (over time)&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--96PSfdIS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://res.cloudinary.com/practicaldev/image/fetch/s--Aiv_qWa---/c_limit%252Cf_auto%252Cfl_progressive%252Cq_auto%252Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/686ed06qq73m1wnct2u7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--96PSfdIS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://res.cloudinary.com/practicaldev/image/fetch/s--Aiv_qWa---/c_limit%252Cf_auto%252Cfl_progressive%252Cq_auto%252Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/686ed06qq73m1wnct2u7.png" alt="image" width="572" height="322"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Horizontal Reduce on Image (over space) &lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--hdRdNqWa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://res.cloudinary.com/practicaldev/image/fetch/s--kJO2mp_p--/c_limit%252Cf_auto%252Cfl_progressive%252Cq_auto%252Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s1ij3ezqmetz8hxvtb2o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hdRdNqWa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://res.cloudinary.com/practicaldev/image/fetch/s--kJO2mp_p--/c_limit%252Cf_auto%252Cfl_progressive%252Cq_auto%252Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s1ij3ezqmetz8hxvtb2o.png" alt="image" width="546" height="188"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Google Earth Engine integration with Kepler.gl
&lt;/h2&gt;

&lt;p&gt;This integration facilitates and presents EE scalability with external platforms. Kepler is a Python library for visualizing geospatial data in Jupyter notebooks. Kepler.gl is a high-performance web-based tool created by the Uber’s Visualization Team for visual exploration of large scale geospatial datasets. It is used to render large-scale interactive maps. EE Python API and Kepler.gl works best for deployment and non-geospatial scientists.&lt;/p&gt;

&lt;h2&gt;
  
  
  Google Earth Engine comes with some challenges.
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;To search for locations with similar metadata:&lt;/li&gt;
&lt;li&gt;How to divide the globe into small grid tiles?&lt;/li&gt;
&lt;li&gt;How to handle the enormous computing requirement?&lt;/li&gt;
&lt;li&gt;How to save the tile results?&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>remotesensing</category>
      <category>googlecloud</category>
      <category>googleearthengine</category>
      <category>climateinovation</category>
    </item>
    <item>
      <title>GEE COMMUNITY INTRO</title>
      <dc:creator>geedevsnairobi</dc:creator>
      <pubDate>Sun, 15 Jan 2023 09:28:51 +0000</pubDate>
      <link>https://dev.to/geedevs-nairobi/gee-community-intro-15k3</link>
      <guid>https://dev.to/geedevs-nairobi/gee-community-intro-15k3</guid>
      <description>&lt;p&gt;Welcome to gee community Nairobi.&lt;br&gt;
Our goal is to help you get everything in remote sensing.&lt;/p&gt;

</description>
      <category>discuss</category>
    </item>
  </channel>
</rss>
