Questions tagged [google-earth-engine]

Google's cloud computing platform for geospatial data & analysis at earthengine.google.com.

Filter by
Sorted by
Tagged with
21 votes
2 answers
7k views

Mosaicking Image Collection by Date (day) in Google Earth Engine

I have an image collection of Sentinel-1 data over 3 years filtered by a region of interest that spans 3-4 tiles, and want to know the best way to mosaic all the images (tiles) that were taken on the ...
  • 419
17 votes
5 answers
20k views

Source for high-resolution satellite images free/low-cost?

I am doing a household survey in Kenya, and I need to ensure that my survey team visits every house within a given area. I've been going to google maps and right-clicking on roofs to get coordinates ...
16 votes
2 answers
2k views

Concatenating export path in Google Earth Engine

My goal is to store different exports from Earth Engine projects in separate subfolders of a main GEE_export folder on my Google Drive. I'm using Export.image.toDrive: Export.image.toDrive({ ...
  • 3,373
14 votes
1 answer
22k views

Clipping vs Filtering Images with a Polygon - Google Earth Engine

I need to analyze the area defined by a polygon that I drew (call it 'X') of the images of Modis Terrra. What is the difference between filtering bounds and clipping to define the area of interest? I'...
  • 617
13 votes
1 answer
18k views

Extracting pixel values by points and converting to table in Google Earth Engine?

I realise that this question has been asked before as Extract pixel values by points and convert to a table in Google Earth Engine at Stack Overflow. However, I can't get the code to work. It runs, ...
12 votes
2 answers
7k views

What are the min and max values of Map.addLayer on Google Earth Engine? [closed]

I'm starting to play with Google Earth Engine. Following https://developers.google.com/earth-engine/image_visualization I see its possible to set min/max values. May I ask the meaning of this and ...
  • 523
11 votes
1 answer
3k views

What is the difference between sample, sampleRegions, and stratifiedSample in Google Earth Engine?

According to the documentation of GEE ee.Image.sample() samples the pixels of an image and returns them as a FeatureCollection, in which each feature has 1 property per band in the input image. You ...
  • 1,096
11 votes
3 answers
4k views

Extracting pixel time series from Google Earth Engine

I have written a short program in Python to extract a time series for any given pixel for MODIS data stored in the Google Earth Engine. The code is working fine and returns a data frame containing the ...
  • 521
10 votes
2 answers
9k views

Moving from Earth Engine image to array for use in sklearn

I've produced a very large multiband image in EE with the goal of classifying it using the classifiers implemented in sklearn (the native ones implemented in EE don't provide enough flexibility for my ...
  • 474
10 votes
2 answers
13k views

How to stack bands in Google Earth Engine?

I have created an Image collection in GEE and with the help of a function I have computed NDVI index and mapped it to create another collection with NDVI as a band. Now I want the create a stacked ...
10 votes
2 answers
6k views

How do I visualize points in a FeatureCollection based on feature properties using Google Earth Engine?

New user of Earth Engine and Javascript here. I have a FeatureCollection of points. These points are field observations where researchers have marked water sources, and noted whether or not they were ...
10 votes
2 answers
5k views

Get Earth Engine Object Type

For debugging it would be great to figure out which EE object type an object is. Example code which adds a buffer to a point in a random area: var polygon = ee.Geometry.Point([0,51.477]).buffer(...
  • 515
9 votes
2 answers
29k views

Exporting each image from collection in Google Earth Engine

I am trying to export each image in a filtered stack of Sentinel-1 images and cannot seem to get it right. Think link suggests using imageCollection.map() and a custom function (such as a geometric ...
9 votes
1 answer
12k views

Selection of only monthly data on Google Earth Engine? [closed]

Can you suggest an approach to select January Landsat 5 data between 2000 to 2010 and calculate its mean? In other words, the mean of the all January images from 2000 to 2010.
  • 99
9 votes
2 answers
7k views

LS7 filling the gaps image with Google Earth Engine

I would like to work with Landsat 7 images, but most of them have gaps... I would like to fill the Gaps by aggregate images bands by month. So I'm looking for a way to deal with this problem. I have ...
  • 729
9 votes
1 answer
11k views

Selecting bands of image collection in Google Earth Engine? [closed]

I want to use the Landsat 8 surface reflection collection (LANDSAT/LC08/C01/T1_SR), which contains the 7 spectral bands plus some extra mask bands. I want to run my algorithm on just the 7 spectral ...
  • 1,392
9 votes
1 answer
9k views

Adding Properties to a feature in Google Earth Engine

Is there a way to add a property to a feature in the GEE. I know that you can edit existing properties with set(), but haven't found a way to add a property.
  • 131
9 votes
1 answer
535 views

How to use a custom function inside GEE ee.Reducer?

I have generated a segmentation using SNIC on GEE and calculated some statistics/features for each segment, using ee.Reducer e.g. mean, std, median, etc. I want to calculate more features based on my ...
  • 347
8 votes
4 answers
15k views

Selecting every image of collection using Google Earth Engine?

I am currently working on google earth engine and I have created an image collection with 15 images in it. What i want to do is to create an image for every single image in my collection. I was able ...
8 votes
4 answers
12k views

Batch task execution in google earth engine

I need to make tens of clipped portions of an image, so I uploaded the boundaries in my assets and then loaded them all in code editor and did the clips with a for loop and exported them to the cloud. ...
8 votes
1 answer
8k views

Add a date (day of year) band to each image in a collection using Google Earth Engine

I would like to add a date (day of year)band to each image in a collection. This will be used as a variable in supervised classification of sentinel-2 imagery along with peak NDVI. I built a function ...
  • 421
8 votes
1 answer
191 views

Creating multiple buffers in a loop in GEE

I would like to do 50 buffers from a known point. I know to do one by one, but I would like to do in a Loop. Is there any way to do it? This is part of my code: var buff1 = ee.Geometry.Point([-46....
8 votes
1 answer
7k views

Iterating over years for features in feature collection using Google Earth Engine?

I am currently working with the Hansen data (Global Forest Change) in Earth Engine. I have also imported a fusion table representing districts in a specific country. My goal is as follows: I would ...
  • 115
8 votes
1 answer
3k views

Tile error: Expected a homogeneous image collection, but an image with an incompatible band was encountered

It is a very simple script, but I cannot figure it out. The script is to create a list containing the constant images from 0 to 32, and then display them. var test = ee.List.sequence(0,32).map(...
8 votes
1 answer
4k views

GEE - reduceRegions for an image collection

I am relatively new to Google Earth Engine, currently working on finding mean NDVI for command areas of different tube wells in my study area. What I have done so far is: Filtered L8 image ...
  • 93
8 votes
1 answer
4k views

Exporting classification error matrix Google Earth Engine

I did a supervised classification of land cover and I need to export the Validation error matrix to .csv file. When using 'Export.table.toDrive' an error message 'Invalid argument: 'collection' must ...
  • 105
8 votes
1 answer
2k views

EarthEngine: average/reduce a raster at resolution of coarser raster?

I want to average a 30m raster at the resolution of a 1000m one. Specifically, I want to computer, for each Daymet raster cell, the percentage of cultivated land from the 30m CDL. How can I do that ...
  • 1,742
8 votes
1 answer
358 views

Getting different "Layer Errors" every time for the same code in GEE

I am running a classification code and getting different errors every time. classification: Layer error: The service is currently unavailable. classification: Layer error: Computation timed out. ...
  • 127
7 votes
2 answers
10k views

Cloud mask for Landsat8 on Google Earth Engine

I'm creating a composite image, in order to create a timeseries. I've already created the composited image, but i am having difficulty masking the clouds of the composite image. I've followed the code ...
  • 113
7 votes
2 answers
8k views

Reclassifying raster values in Google Earth Engine?

I need to reclassify slope raster (val: 0-90) to 9 classes (1-9). I used this code but the output raster cannot be displayed. What did I do wrong? // Add features var sumatera = ee.FeatureCollection("...
7 votes
1 answer
3k views

GEE ImageCollection.map() with multiple-input function

I have an Image Collection, I want to Calculate a Normalized difference and got this Function called ND /////normalized Differense/////// function ND(Im,B1,B2){ var four = Im.select(B1) var eight = Im....
7 votes
2 answers
4k views

Add/display all images of mycollection in google earth engine

I started with GoogleEngine recently and I was wondering how I can display all images of my collection as layers. I guess there is a better way than manually copy past / typing: var img1 = ee.Image('...
7 votes
2 answers
11k views

Filtering Landsat images base on cloud cover over region of interest

My goal is to create an image collection that has 100% free cloud over a small region of interest, for example a lake. This script filters landsat 8 images based on location and cloud cover: var ...
7 votes
1 answer
19k views

Creating Sentinel-2 NDVI time series chart in Google Earth Engine?

I am exploring Sentinel-2 time-series NDVI with Google Earth Engine. In another post (here) I calculated and exported NDVI values from Sentinel-2. Now I would like to create a NDVI time series chart, ...
7 votes
1 answer
12k views

Performing object based image classification in Google Earth Engine?

I am trying to perform an image segmentation using Google Earth Engine. I have performed OBIA in the past using python and scikit-image (skimage.segmentation.felzenszwalb) , but not sure how to do ...
  • 1,779
7 votes
1 answer
9k views

Exported bands must have compatible data types; found inconsistent types: UInt16 and UInt32

What are the possible reasons for this error? Exported bands must have compatible data types; found inconsistent types: UInt16 and UInt32 This is the code: Map.addLayer(PuntoQuellaveco1); Map....
7 votes
3 answers
5k views

How to add color-map scale in Google Earth Engine?

I want to add a colormap scale like below in my Earth Engine app. I cannot find a UI component for this. Can I do this in any other way in Earth Engine?
7 votes
1 answer
607 views

Google Earth Engine: Javascript to Python conversion: syntax error with `image1.and(image2)`

I need to convert my Earth Engine javascript code into the Python API. Most of it works, but when using the following in Python (2.7): mask = image1.and(image2) I get: File "<ipython-input-65-...
7 votes
1 answer
6k views

Google Earth Engine: Extract values from FeatureCollection as list

I'm trying to extract values from a FeatureCollection as a list. Here's some example code that I'm using in Earth Engine's code editor: var viirs = ee.Image('NOAA/VIIRS/DNB/MONTHLY_V1/VCMCFG/...
  • 369
7 votes
1 answer
3k views

Understanding tileScale in Earth Engine [closed]

In many Earth Engine functions such as Image.reduceRegions or Image.sample, there is an argument called tileScale. The API documentation generally interprets it as: A scaling factor used to reduce ...
  • 370
7 votes
2 answers
6k views

Stratified random sampling with Google Earth Engine Error

I am trying to sample points from a classified raster using Google Earth Engine, but am running into some problems. I developed a script based on the Classification video located here. Here is a toy ...
  • 1,779
7 votes
1 answer
8k views

Counting number of pixel identified as water from a collection of landsat image using Google Earth Engine

My objective is to count the number of pixel identified as water from a collection of landsat images. The following function masks out non-water area for each image in the image collection, it also ...
7 votes
1 answer
4k views

Normalization in Google Earth Engine

How can I normalize pixel values from 0 to 1 or 0 to 100? Is there any function or command related to it? I'm using JavaScript.
  • 115
7 votes
1 answer
1k views

Creating DateSlider for whole image collection in Earth Engine

I am need to create DateSlider for whole Sentinel-NDVI collection during given period. Is there any way to do so? https://developers.google.com/earth-engine/ui_widgets, here I found an example, but I ...
7 votes
2 answers
6k views

Resampling image or imagecollection to higher resolution in Google Earth Engine Python API

I try to use resample and reproject function in GEE to downscale the MODIS 250 products into 240m in order to correspond the 8*8 Landsat 30m pixels for furture purpose. I used a Landsat image for ...
7 votes
1 answer
7k views

Google Earth Engine: label objects on map

In my Google Earth Engine script, the user can click on a point on the map, and then a time series history chart of that pixel value is displayed in the console. However, after the user has clicked on ...
  • 515
7 votes
2 answers
2k views

How to visualize inundation using Sentinel 1 SAR Data?

I am trying to visualize flooding after hurricane Harvey that made landfall on August 25-26 2017. Based on this video, I've been able to obtain the basics of Sentinel-1 SAR imagery. Sentinel 1 comes ...
  • 2,995
7 votes
1 answer
2k views

Results of Variable Importance of RF Classifier in GEE

I create a RF module in GEE like this: //Random Forest Result Function Module exports.getRfResults = function(image, title, bands, trainPoint, testPoint, area, label) { //Create Sample Points ...
6 votes
3 answers
5k views

Google Earth Engine: different stretch options

I'm working on a map view that detects new ice using Sentinel-1 together with Google Earth Engine. When adding images to Google Earth Engine I can set the min and max values for my layer in numbers ...
  • 1,851
6 votes
3 answers
13k views

How can I solve this error from TIFF file?

I used google colab(python) to read a tif file with Tiff file. But it shows: TiffPage 0: <COMPRESSION.LZW: 5> requires the 'imagecodecs' package. This is my code: !pip install tifffile !pip ...

1
2 3 4 5
91