Questions tagged [google-earth-engine-javascript-api]
JavaScript client library for calling the Google Earth Engine API.
1,270 questions
0
votes
0
answers
26
views
Extracting ERA5-Land variables for a point in GEE
I have a point for which I want to extract several meteorological variables from the daily aggregated ERA5-Land dataset in GEE. I know there are many similar questions asked before, but they all have ...
0
votes
0
answers
57
views
Problem with Export in GEE
This is almost end of my code which is work right now by help of some friend. I wish to export the following images with their name to the Google Drive something like FIRMS_January_2020, ...
0
votes
1
answer
40
views
Filtering ImageCollection based on set value using Google Earth Engine JavaScript API
I would like to filter ImColl based on the value of sum of clouded pixels; filter in script (not activated) doesn't do the job. And also the mapped cloud band is not the 'same' as reducer value, which ...
0
votes
1
answer
102
views
Calculating annual total precipitation from ERA5-Land Monthly Aggregated data
I am calculating annual total precipitation from ERA5-Land Monthly Aggregated. I see precipitation values different from values computed from daily aggregated data. I have attached the code. Would ...
0
votes
0
answers
34
views
Sample returns an empty featureCollection
Recently, I was trying to sample raster data to create point features. I found an example online and used the code, but even with almost identical code, my exported collection shows 0 elements. I have ...
0
votes
1
answer
34
views
Removing elements of a metadata label before exporting tables to drive in Google Earth Engine
I have code which calculates and exports albedo values for Landsat images across glacier shapefiles.
To uniquely identify each table, I assign the name of each glacier csv file to be 'glacierId' + ...
1
vote
1
answer
70
views
Sample regions zonal statistics function produces empty feature collection
The main issue is that the function that uses reduce regions to extract zonal statistics of an image collection with an imported shapefile I created in QGIS results in an empty feature collection. I ...
0
votes
0
answers
41
views
GEE get() method obtained [null] instead of correct properties
In GEE, I have a feature that has 5 properties.
var currentTileFeature = ee.Feature(tilesList.get(i));
print(currentTileFeature)
Running the code above will get the results.
Feature ...
2
votes
2
answers
160
views
Select array image values based on array image of targeted indices in Google Earth Engine
I have arr array image from which I would like to select the values at indices in arrIx which is also an array image. How can I achieve this?
Note, I am looking for something that can accommodate an ...
0
votes
1
answer
50
views
Dictionary does not contain key 'mean' while computing a timeseries chart of cluster from KNDVI in GEE
I have code in GEE that I am trying to use to create a timeseries chart showing all the unsupervised clusters after calculating the mean KNDVI for each cluster. But I receive an error
Dictionary.get: ...
1
vote
0
answers
54
views
Working with array images in Earth Engine (from Zarr file)
I'm working with ARCO-ERA5 data in Earth Engine, which requires accessing data through the new
ee.ImageCollection.loadZarrV2Array function. I'm able to successfully visualise 2m air temperature data, ...
0
votes
0
answers
18
views
Error generating chart: Collection.map: A mapped algorithm must return a Feature or Image
I am trying to create a timeseries chart in GEE and I keep having an error:
Error generating chart: Collection.map: A mapped algorithm must return a Feature or Image
What can be the reason for this ...
0
votes
0
answers
39
views
Mann-Kendall pixel masking issue
I'm trying to run a Mann-Kendall analysis on spatial NDVI timeseries for a number of sites. As part of the analyses, I have been using DynamicWorld to mask out undesirable areas (e.g. snow and ice, ...
0
votes
1
answer
67
views
GEE Image Collection - Providing Palette for Time Series
I'm calculating the ndti for a water body over a time period and have successfully made the ndti calculation and can view the results for each time period. In the layer settings I have to set results ...
0
votes
2
answers
53
views
Calculate pairwise difference between neighboring pixels
I am trying to process an elevation image in GEE (JavaScript editor) to obtain the slope from the neighbors of a focal pixel to it. I want the slope from one specific pixel (e.g., up) to the focal one,...
0
votes
0
answers
28
views
Create monthly mosaics across multiple years in Google Earth Engine
I am working on a project to create monthly mosaics of albedo over glaciers in Iceland which:
Loops through years 1984-2024
For each year, create monthly composites, ideally using .mosaic
Export the ...
0
votes
1
answer
85
views
Accessing ERA5 Zarr data in Earth Engine
Just been experimenting with the new loadZarrV2Array function in Google Earth Engine to see if I can get access to ERA5 2m air temperature and other data held in the data buckets. The code is throwing ...
0
votes
1
answer
62
views
How do you filter an image collection by a mean NDVI threshold value in Google Earth Engine?
I have written code in Google Earth Engine that does the following:
Creates an image collection
Calculates the NDVI and Bare Soil Index (BSI) for each image in the collection
Enables visualisation (...
0
votes
0
answers
37
views
Creating complete image within shapefile that does not get cut off by Landsat tile boundaries
I'm fairly new to GEE/JavaScript/coding.
I'm working in Google Earth Engine with Landsat 4-9 imagery to create a time series of glacier albedo. I am working within a RGI glacier polygon shapefile in ...
1
vote
1
answer
60
views
My map function isn't working as expected
Here's my code:
function getSentinel2(){
var cloudSat2 = ee.ImageCollection("COPERNICUS/S2_SR_HARMONIZED") //Get Satelite
.filterBounds(polygonGeoJSON) //Filter to the right ...
0
votes
0
answers
16
views
How to automatically filter out low-quality monthly Landsat images during export?
I have this code where I export monthly images (the code in the link contains more spectral bands and indices):
var landsat = ee.ImageCollection('LANDSAT/LC08/C02/T1_L2');
Map.centerObject(table);
...
0
votes
1
answer
34
views
Why do the grid results obtained after using SNIC segmentation only have three values when exported?
I have designated a very small area and used the following code to spatially segment the sentinel image, and exported the segmented grid.Why are there only three values (-32768,0,32768) in the ...
0
votes
0
answers
105
views
Recover accidentally deleted Earth Engine default repository
While doing some file tidying up in the Google Earth Engine javascript API I accidentally deleted my default repository. I've looked around for how (or if) it can be recovered, and the only mention I'...
0
votes
0
answers
42
views
Perform change detection (detecting gain after first loss) using LandTrendr in Google Earth Engine
I would like to know the NDVI or NBR recovery after the initial loss.
Currently, I can only get the first loss and first gain as mentioned in the tutorial.
How could I add one logic condition?
//######...
0
votes
2
answers
57
views
Charting percentiles of image band using Google Earth Engine JavaScript API
I've been working on a project working with a general Kc formula, and I've been stuck on charting this right forever. Below, I have the code I'm using to create an image collection of the 5%, 50%, and ...
0
votes
1
answer
90
views
How to Clear the Earth Engine Console?
I'm working on a small research project using the Earth Engine Code Editor. Right now, I have a way to print a chart to the console, but I'd like to be able to clear it for the next one.
If possible, ...
0
votes
0
answers
39
views
How can I extract NDVI-based GeoTIFFs for Laikipia from GEE, by year and season, using Landsat with cloud filtering and NDVI classification?
I am working in Google Earth Engine to extract NDVI data for Laikipia County, Kenya, from 2000 to 2024, using Landsat imagery. I need to generate GeoTIFFs for each year, as well as for each dry and ...
-1
votes
1
answer
34
views
Make feature collection export more efficient/faster
I have this code where I export a FeatureCollection:
var dat = ee.FeatureCollection("projects/sat-io/open-datasets/UT-GLOBUS/dallas");
var polygons = dat
.map(function (f) {
...
0
votes
2
answers
64
views
Trying to add Landsat data to GEE
I am trying to import Landsat 5, and every time I run the cod,e I receive this error
ImageCollection (Error) ImageCollection.load: ImageCollection asset
'LANDSAT/LT05/C02/TI_L2' not found (does not ...
0
votes
1
answer
36
views
Download monthly VIIRS for certain years
I want to download all monthly VIIRS images for 2018 to 2024. In the downloading process I want to set two "parameters":
the cf_cvg = 5 (Cloud-free coverages; the total number of ...
-1
votes
1
answer
98
views
NDVI yearly growing season average and/or greenest pixel value to export in GEE JavaScript API
Link to current code
https://code.earthengine.google.com/97fc3c74a2aa49a335525f0a0be91d7f
Link to previous code https://code.earthengine.google.com/d7860e26630e6c80c0b13a67b545fcc6
var L7 = ee....
1
vote
0
answers
43
views
Google Earth Engine - Get Location of Nearest Non-Zero Pixel as Raster
I have a black and white image in Google Earth Engine. Here's an example piece of this image:
For every black pixel on the screen, I want to know where the nearest white pixel is. Ideally, this ...
0
votes
1
answer
63
views
Accessing weight values in Kernel using Google Earth Engine
I'm looking to access the weight values in a Euclidean kernel in Google Earth Engine. A kernel is generated using an ee.Kernel function:
var kernel = ee.Kernel.euclidean({radius: 3}));
A kernel ...
0
votes
0
answers
50
views
Unsupervised classification over really large large area in Google Earth Engine
I have a problem with large area that i am trying to classify. The problem is:
FeatureCollection (Error) Computed value is too large.
What can i do to classify this area?
I added img of the area and ...
0
votes
0
answers
61
views
Google Earth Engine: how to reduce results of .glcmTexture?
I am stuck with reducing the high-resolution result of .glcmTexture. I want to reuse the information in a classification, but the classification would reuse the high-resolution input. Thus, a 10m ...
0
votes
0
answers
39
views
Using the Landsat dataset to calculate EVI resulted in anomalies
When using the Landsat dataset on the GEE platform to calculate the EVI index, I encountered some issues. To put it simply, after calculating the EVI index and exporting it to QGIS for viewing, I ...
1
vote
1
answer
151
views
Fastest way to count pixels per class in GEE
I’m working with a classified rasters in Google Earth Engine, where the pixel values are 0, 1, 2 and 3. I need to efficiently count how many times each value occurs in every image (pixel count per ...
0
votes
1
answer
66
views
Exporting annual mean LST in form of Geo_tiff from MODIS
I try to export Annual mean LST in form of Geo_tiff from MODIS collection in Google Earth Engine with following code from 2000 to 2020. But the main problem only the last image (2020) was save to the ...
1
vote
1
answer
55
views
Change axis names in ui.Chart.image.doySeriesByYear without reordering data
I have written code to display a time-series chart in Google Earth Engine (GEE):
var col = ee.ImageCollection("COPERNICUS/S2_SR_HARMONIZED");
var filtered = col
.filter(ee.Filter.lt('...
0
votes
0
answers
65
views
Calculating SUHI in GEE
I am working on SUHI via LSTurban-LSTrural. My script works well until determining the LST urban and rural in day and night time. However, when I start calculating the SUHI it gives me empty value and ...
2
votes
1
answer
82
views
Converting boolean into ee.Number in Google Earth Engine JavaScript API
I want to create a mask that is 1 when I'm inside the specified dates and 0 when I'm outside. To do this I use the contains method of the ee.DateRange object but as the result is a boolean I cannot ...
2
votes
1
answer
43
views
Pixel value using inspector and sampleRegions are different at same scale
I want to get pixel value from qualityMosaic image with a point feature. But I found that the pixel value from sampleRegions and from Inspector are different. However, if I extract pixel value from ...
1
vote
1
answer
121
views
Determining date range of ImageCollection in Google Earth Engine
What are the min and max dates of any image in an image collection?
As an example, I'm using 'GOOGLE/DYNAMICWORLD/V1' though I'd need this to work with any image collection. I've tried looking at the ...
0
votes
1
answer
70
views
Tracking GEE API costs with workload tags: Unable to get complete EECU summary [closed]
I am using Python to make multiple GEE API calls and track costs by assigning workload tags using:
import ee
ee.data.setDefaultWorkloadTag('sample_workload_tag')
In the GEE Monitoring Console, I ...
0
votes
1
answer
78
views
Mask clusters larger than 500 pixels in GEE ends with a memory error
The function below, getLargeIIFF, is designed in GEE to identify and classify large clusters of connected pixels in a given image with only one band (IMG) as a specific class (5).
It uses an 8-way ...
0
votes
1
answer
45
views
Layer error: reduce.median: Error in map(ID=null): Image.normalizedDifference: Expected exactly 2 band names
I tried to create a land composite for mangroves in my study area. The code works fine for creating land composite map using Landsat 8, and when i modify the code for Landsat 7 images, i encounter ...
0
votes
2
answers
60
views
GEE COPERNICUS/S3/OLCI Qa10_radiance band provides inconsistent data range
I am tyring to compute OTCI - OLCI terrestrial chlorophyll index (custom-scripts.sentinel-hub.com/custom-scripts/sentinel-3/otci/) by using google earth engine 'COPERNICUS/S3/OLCI'dataset. There is no ...
1
vote
0
answers
56
views
How to find the precise scale parameter value accurately to precise decimal places in Google Earth Engine
I am training a classifier and results change drastically upon ±.00001 level of zoom precision to get the final trained output.
Is there a way to find out accurate zoom level in which training ...
0
votes
1
answer
79
views
How to speed up continuous change detection and classification processing for individual polygons in GEE
I am working on applying the Change Detection using the CCDC algorithm for individual polygons in Google Earth Engine. My script functions correctly, but it runs quite slowly. I would like to know how ...
0
votes
1
answer
41
views
How to reduce a region bound by a polygon/multigon in GEE?
I made a simple script trying to calculate average temperature from a user drawn polygon but I am failing to get the "geometry" of the polygon. How could this be done?
var Uusimaa =
/* ...