Questions tagged [google-earth-engine-javascript-api]

JavaScript client library for calling the Google Earth Engine API.

391 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
11 votes
1 answer
799 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 ...
Federico's user avatar
  • 367
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 ...
BerkayOzen's user avatar
4 votes
1 answer
685 views

Fill gaps in a categorical image with neighbors values in GEE

I'm reclassifying a DEM asset into 6 categories. However, there are some pixels that don't meet my criteria and are null. I would like to find a way to fill these gaps depending on its area and its ...
Luisa Fernanda Velasquez Camac's user avatar
3 votes
1 answer
154 views

Google Earth Engine task.id not showing correct id format?

const task = ee.batch.Export.image.toCloudStorage({ //task description }); task.start(() => { console.log("Task started: " + task.id) }, (error) => { console.log(&...
robaza's user avatar
  • 31
3 votes
1 answer
591 views

Image collection monthly averages using geemap package

I am trying to convert some code snippets from GEE JavaScript to Python. This code computes the monthly averages of NDVI images given a range of years and a range of months. This is my code in ...
Rim Sleimi's user avatar
3 votes
0 answers
337 views

Dynamically formatting file names for exporting using Google Earth Engine JavaScript API

I'm very new to GEE and JavaScript and I am trying to export multiple landsat 8 satellite images for the same region over time. For example, let's say I want to extract images of the Seattle area from ...
Kyle Chan's user avatar
3 votes
1 answer
282 views

Extracting date range from RADD dataset in Google Earth Engine

I have a script that provides the latest event/alert from the RADD dataset. I would like to extract events from a date range, e.g. 2020-01-01 to 2021-12-31. How should I go about this? This is the ...
Johan's user avatar
  • 53
3 votes
1 answer
358 views

Exporting time series data of multipoints in Google Earth Engine

I have created three points of land surface temperature. I want to export the time series result in three different variable names. // Import country boundaries feature collection. var dataset = ee....
user9392100's user avatar
3 votes
0 answers
873 views

Timestamp video/time-series in Google Earth Engine

I successfully managed to output a video time-series of processed Sentinel 1 SAR images in GEE for my areas and dates of interest by adapting an existing script. However, I've not been able to ...
Beardsley's user avatar
  • 423
3 votes
2 answers
812 views

Eliminate small area pixel blobs of a two-value image in Google Earth Engine

I have tried to extract water body by calculated SDWI using Sentinel-1 images in Google Earth Engine : var point = ee.Geometry.Point([-81.19416175071366,42.14552897443303]); var sentinel_col = ee....
Joyie's user avatar
  • 31
2 votes
1 answer
133 views

Calling linear to converted dB bands and creating few more bands such as VV/VH, VH/VV, VV+VH in function using Google Earth Engine

My question is similar to: Radar Vegetation Index Using Google Earth Engine Convert Sentinel-1 images data from dB to linear I am new to GEE and JavaScript. I want to create the following number of ...
Mohana's user avatar
  • 21
2 votes
0 answers
402 views

Mask cloud shadows of Sentinel-2 L1C (TOA reflectance) in GEE

I am trying to automate an analysis in Google Earth Engine using Sentinel-2 imagery. Sentinel-2 L2A (Bottom-of-atmosphere reflectance) imagery is not available in my study area, so I must use L1C (Top-...
kobe1503's user avatar
2 votes
0 answers
413 views

Layer error: Computation timed out

I want to run object-based svm classification with Sentinel 1 and Sentinel-2 images, and for that I first segmented the Sentinel-2 images which worked well. But then I wanted to make classification ...
Gulnihal's user avatar
2 votes
1 answer
251 views

Image.constant: Parameter 'value' is required Error generating chart

I am trying to generate a chart and I am finding it hard to generate it. Is it a coding error in calling my functions? https://code.earthengine.google.com/?scriptPath=users%2Fmpalasimbarashe%...
Simba's user avatar
  • 69
2 votes
1 answer
58 views

Google Earth Engine - Blend Error

I have two different DEM images that I am trying to blend. The first is based on SRTM (DEM1) and the second on coastalDEM (DEM2), with different but overlapping areas. When I do var DEMblend = DEM2....
Jack Reid's user avatar
2 votes
0 answers
109 views

Calculating temporal monthly lag between 2 datasets in Google Earth Engine

I want to calculate how many months pass before the terrestrial water storage reacts and peaks in reaction to precipitation using an raster, time-series Image Collection with 2 bands namely '...
user195661's user avatar
2 votes
0 answers
446 views

Getting Sentinel-2 raster values for points on Google Earth Engine

I am calculating TSM and chlorophylle in a river, for each parameter I used a function to create a new band that gives me information about each one. First I want to calculate the mean value for ...
Gabriela Chaves's user avatar
2 votes
0 answers
553 views

Google Earth Engine gamma correction factor (Image Visualization Parameter) output seems reversed

References online state that with a gamma correction (contrast selection), if a gamma value is less than 1 (gamma compression), this expands the low (dark) input values into a wider range of output ...
ENIAC-6's user avatar
  • 790
2 votes
0 answers
234 views

Remap adding values to raster in Google Earth Engine

I'm following this solution for a remap I'm trying to do. However, my output ended up adding hundreds of new pixel values. I simply wanted to reclassify specific values. Would anyone be able to ...
Jim's user avatar
  • 41
2 votes
0 answers
114 views

Checking quality assurance of MOD10A1 NDSI for snow fraction retrieval

I have recently retrieved some snow fraction data over Fennoscandia from GEE for the first time. I realise the script has no quality assurance that is a built-in feature in MODIS imagery normally. ...
Thomas's user avatar
  • 875
2 votes
0 answers
308 views

Significant Mann Kendall Tau

I am trying to look at trends in vegetation (NDVI) in Northern Portugal. I have used the ee.Reducer.kendallsCorrelation to calculate the Tau, and it also outputs the associated p-value for each pixel. ...
Anna's user avatar
  • 21
2 votes
1 answer
141 views

Why do strips appear on remote sensing images?MCD19A2.006: Terra & Aqua MAIAC Land Aerosol Optical Depth Daily 1km

When I was implementing a multi-year average for an area with Google Earth Engine, I found that the generated images appeared to be striped.Generating one day, one month, and one year of AOD_055 mean ...
Xinzhi Wang's user avatar
2 votes
0 answers
393 views

Random forest for Landsat 8 in Google Earth Engine JavaScript API

I want to apply and examine random forest classification results on landsat 8 image collection in Google Earth Engine (as modified from the origin code in Earth Engine Tutorials) Accordingly I ...
Solmaz's user avatar
  • 139
2 votes
1 answer
710 views

How can I get the image with less cloud coverage over a ROI in a time range with Sentinel 2?

I am trying to compute a script to get the cleanest image of Sentinel 2 in a prescribed time range. Currently I tried with 2 approaches: a rough one and an automatic one, but I get two different ...
Matteo Giomo's user avatar
2 votes
0 answers
714 views

Converting featurecollection properties to image bands in Earth Engine

I want to do a vector to raster conversion as demonstrated here, except that the output image includes multiple bands corresponding to the different featurecollection properties. I actually figured it ...
lobmonster's user avatar
2 votes
2 answers
972 views

Calculation of brightness temperature in Kelvin from Landsat 8, Band 10

I tried to use expression to obtain the brightness temperature, It is showing some error. Can anyone help me with this error? I have used the co-efficient for band 10 given in metadata of Landsat 8, ...
Keerthana N's user avatar
2 votes
0 answers
589 views

Google Earth Engine: Export image collection to Asset while preserving original scale of individual image's bands

I would like to export an image collection to the Google Earth Engine's Asset, while preserving the original spatial scale of each individual image's bands. The Rodrigo Principe's answer to a similar ...
elias's user avatar
  • 61
2 votes
1 answer
282 views

Tiling a polygon into relatively even squares?

I have a polygon that I would like to cut into even tiles that are around 100 x 100 m (it doesn't have to be perfect). I found the ee.Geometry.Polygon.cutLines() method, but when I use it nothing ...
Adriano Matos's user avatar
2 votes
0 answers
785 views

Generation of snow cover area time series in GEE using MODIS Snow Cover product

My aim is to resample MOD10A1/MYD10A1 to the same scale as that of MOD11A1/MYD11A1, mask the image collection to obtain the best pixels, and finally to obtain the time series plot of the total area ...
Vineeth's user avatar
  • 47
2 votes
0 answers
952 views

Does Google Earth Engine (GEE) compute Vegetation Condition Index (VCI) time series correctly?

The formula to compute VCI from long term dataset is VCI= (NDVI_current-NDVI_min)/(NDVI_max-NDVI_min) * 100, refer to Drought monitoring using the Vegetation Condition Index (VCI) Map.centerObject(...
Abhilash Singh Chauhan's user avatar
2 votes
0 answers
599 views

Running linearRegression in Google Earth Engine

I want to run a linear regression (and plot out a correlation plot) in Earth Engine. To start with, I'd like to predict one image from another. So, that's one dependent variable and one independent ...
Alexander Shenkin's user avatar
2 votes
1 answer
418 views

Google Earth Engine: Button to Refresh App

I would like to have a refresh button on a GEE app that reruns my whole script. I want the user to be able to set a rectangle on the map that holds all of the analysis (the app is basically a ...
Jamie Sandison's user avatar
2 votes
0 answers
346 views

Reduce regions on projected (equal-area) data in Google Earth Engine

I am working with a global raster of soil carbon and a feature collection of ecosystems. I would like to average the carbon in each ecosystem using ReduceRegions in Google Earth Engine, but I need to ...
Sabine's user avatar
  • 35
2 votes
0 answers
31 views

Dimension Difference preventing plot of series

I have performed linear regression between the 'ro','pr' series (runoff,precipitation) and printed the chart. I want to print the linear fit on top of it and get the R**2 value, but dimensionality ...
paul gettys's user avatar
2 votes
0 answers
165 views

Long-term daily climate anomalies

I am trying to generate an Image Collection that corresponds to a long-term 20 year daily average and apply the historical 20 year average to future daily climate projections in the collection NEX-...
Val's user avatar
  • 21
2 votes
0 answers
142 views

Replicate the Google Earth Engine satellite basemap for analysis in code editor

I need high resolution cloud-free raster imagery (<1m resolution) for Montana, USA. Visually inspecting the Google Earth Engine satellite basemap looks to be higher resolution than NAIP imagery (...
sab's user avatar
  • 31
2 votes
0 answers
142 views

Printing NDWI and NDVI comparision graph

Trying to print the chart for both NDVI and NDWI function addNDVI(image) { var ndvi = image.normalizedDifference(['B4', 'B3']); return image.addBands(ndvi); } ...
Apoorv Mamgain's user avatar
2 votes
0 answers
365 views

Calculating area fraction of pixels covered by larger pixel using Google Earth Engine

My goal is to calculate an area fraction from one image as the threshold to select (mask)another image. Specifically, the land cover layer has a spatial resolution of 30m and the EVI data is 250m. I ...
Atlantic's user avatar
2 votes
1 answer
676 views

Subset ('get') ee.List using multiple indices in Google Earth Engine

I need to split a long, flattened list of coordinates by even indices (longitude) and odd indices (latitude). Here's an example list: var roi = ee.Geometry.Polygon( [[[24.331249999999955, 1....
rasenior's user avatar
2 votes
0 answers
726 views

What does Unit-Scale actually do in GEE?

I am experimenting with Google Earth Engine and normalized my images using UnitScale as per this post. When I view the image in the lower pane in Google Earth Engine Code editor and switch the ...
MappaGnosis's user avatar
  • 33.7k
2 votes
0 answers
69 views

Substracting one image band from subsequent using Google Earth Engine

I am trying to find the day of year (DOY) for each year with the highest change in NDVI compared to the day before, to map in the end a shift in start of season. My code to separate each year so far (...
m4D_guY's user avatar
  • 21
1 vote
1 answer
14 views

Mask out pixels by array length in GEE

I have an image array resulting from the continuous change detection algorithm. Because arrays represent the characteristics of each break in the image series, the pixels have different array lengths. ...
user157564's user avatar
1 vote
1 answer
75 views

Calculation of percentile and use it in formula

I'm trying to calculate percentile 95th and 5th for NDVI I can put the 95th percentile and 5th percentile manually, but I want to do it automatically, that is, Google Earth Engine itself will extract ...
Sajjad's user avatar
  • 51
1 vote
1 answer
39 views

Adding legend to a GIF in Earth Engine

How can I add the legend created to the GIF image? I have this code where I created a GIF with the ui.Thumbnail() function from an image collection and I have already added the years corresponding to ...
Mariana Guerra Lara's user avatar
1 vote
1 answer
51 views

Finding highest value in list in GEE?

I have a list of dates and EVI values and extracted the EVI values to find the highest one. However, when I iterate through the list, it won't print anything for the maxEViValue (every value in ...
Bobby Liu's user avatar
1 vote
0 answers
20 views

In the Earth Engine Code Editor, how do you delay execution of ui.Map widget method until the map loads?

Trying to access a ui.Map method can result in a the following error message: Could not get scale. Map is not loaded yet. The following code demonstrates this issue: var map = ui.Map(); ui.root....
Tyler Erickson's user avatar
1 vote
1 answer
63 views

Principal Component Analysis (PCA) error found for getting results as a Chart (ui.chart) in GEE

I am trying hard to get principal component analysis results as 'chart/csv.' format by applying ui.chart code but it shows the error "Error generating chart: No features contain non-null values ...
Hanif Bhuian's user avatar
1 vote
1 answer
60 views

Exporting many charts to Google Drive using Google Earth Engine JavaScript API

I am extracting mean NDVI over many years for each polygon in a shapefile, masked by each landcover within each polygon. I want each chart/CSV to be stored in my Google Drive. Ideally for each masked ...
Vishal Mehta's user avatar
1 vote
0 answers
43 views

Deriving LST in Google Earth Engine

I am following a tutorial to calculate the mean Land Surface Temperature from multiple Landsat8 collection 2 level 2 band ST_B10 images in the google earth engine. However, the output did not cover ...
Miche CHEN's user avatar
1 vote
1 answer
127 views

Computing chlorophyll-a concentration with Sentinel 3 GEE

I'm trying to compute chlorophyll-a concentration of the Tanganyika Lake with Sentinel 3. I'm facing an issue when trying : my results are constant values all over the study time. Here is my code : ...
Aurélien Lengrand's user avatar

1
2 3 4 5
8