Questions tagged [google-earth-engine-javascript-api]
JavaScript client library for calling the Google Earth Engine API.
1,152
questions
-2
votes
0
answers
13
views
I set a list of Sentinel-2's images for each year but the result show that my images have 0 band [duplicate]
I'm trying to make a list of Sentinel-2 image for each year from 2015-2023, each of output layer are the years. But the result shows image doesn't have any bands. How can i fix it?
My code:
function ...
0
votes
0
answers
37
views
Image not showing any bands
I'm trying to make a list of Sentinel-2 image for each year from 2015-2023, each of output layer are the years. But the result shows image doesn't have any bands.
How can i fix it?
My GEE source: ...
0
votes
0
answers
34
views
Exporting large data from Google Earth Engine
I have a mosaic of Sentinel-2 images for the city of Porto (in Portugal). I have done all the initial image processing in GEE (python) and now want to use it outside of GEE so I can use the data to ...
0
votes
0
answers
26
views
ee.Algorithms.TemporalSegmentation.segment is not a function from GEE LandTrendr
I am working on a GEE project on a LandTrendr model for California looking at wildfires in the LA region from 2013-2023 using Landsat 8. This class involved no GEE and yet we need to use it. This is ...
-2
votes
0
answers
15
views
Land use land cover classification in GEE using Simple CART algorithm [closed]
I am classifying my study area LULC in GEE and it sends error message.
https://code.earthengine.google.com/ef6af6feac2fa781da77432ca4d57d1d
1
vote
1
answer
28
views
Image too large to export as table from GEE
I have multiple images that I am processing and would like to then export their values as a CSV table.
All the following code is available and should be easily reproducible:
var age = ee.Image('users/...
1
vote
0
answers
21
views
Area discrepancy between geometry and mask [duplicate]
I'm masking land cover data and clipping it to a geometry. Then I'm calculating the masked area.
When comparing the area of the mask vs the area of the geometry I'm getting a discrepancy. Here are the ...
0
votes
1
answer
19
views
Merging the elements of a list containing ImageCollection into a single ImageCollection in Google Earth Engine Javascript API
I am trying to merge the elements of a list that contains the ImageCollection for the month of January 2016 to 2022. I want to merge them into one ImageCollection containing all the images.
// var roi ...
0
votes
0
answers
20
views
Reprojection output too large when exporting an image to drive
I'm trying to export an image in the GeoTIFF format to drive. The error is the following : Reprojection output too large.
I think this error can come from the fact that I'm resampling my ...
0
votes
0
answers
38
views
Google Earth Engine - Convert large Image into FeatureCollection to export to CSV
I have a large Image in Google Earth Engine that I would like to export as CSV. However, due to its size, I am having a hard time converting it to FeatureCollection to make the export, and I don't ...
0
votes
0
answers
14
views
Create two y axis with different ticks in ui.Chart.image.series in Google Earth Engine
I am using ui.Chart.image.series to make one time-series chart about vh, ndvi,lswi,evi. But vh is negative and much larger than Other indices. I want to put them in one chart, and set different ticks ...
0
votes
0
answers
20
views
Exporting multiple bands From EarthEngine
I'm new to EarthEngine and I am having troubles exporting my RGB map as a GeoTIFF with the correct bands. When I try plotting this layer in R using tmap, it only has one layer. I tried making a custom ...
1
vote
1
answer
12
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.
...
-2
votes
0
answers
25
views
Building Cumulative Distribution Function (CDF) from difference in concentration between two images
I have used this function in order to compute the difference in ChloA concentration between 2 days in the MODIS Aqua dataset:
var Modis_diff = ee.ImageCollection(
ee.Join.saveBest({matchKey: 'second'...
0
votes
0
answers
34
views
Timelapse in GEE
This code is working and the video is active but only images are there. I couldn't add the date (year) to the images. How can this step be accomplished?
// Define your collection
var collection = (ee....
1
vote
1
answer
45
views
Flatten EE list object from array slice
I'm trying to reorganize some outputs from an EE array to an EE list. Specifically, I need to return a list of values from sublists of the array at the same index of each sublist. In my code below, I'...
1
vote
1
answer
22
views
filterDate does not work GEE
I am trying to create LAI (Leaf Area Index) ImageCollection from Sentinel-2 https://code.earthengine.google.com/558a6788e0c9db0c645ac6cd49debe51.
My process is like this: S2_collection -> ...
0
votes
2
answers
18
views
'Year' variable not applied in Earth Engine Example?
I wonder if the year variable in Google Earth Engine's example 'Sentinel2 Clear Composites' is actually applied or working. https://code.earthengine.google.com/1885668f9f476d9f8f917b2fde0b00cd
To the ...
0
votes
1
answer
37
views
Earth Engine Zonal NDVI Stats Simulation
I am a beginner at GEE and I want to run a simulation where I calculate some zonal stats for NDVI for a bunch of random points within a specified region of interest and plot them on a histogram. This ...
1
vote
1
answer
29
views
Make a time series plot of NDWI based water area extraction
I want to make a time series of NDWI based extraction of water pixels using Google Earth Engine. I can successfully make the mask but I am not able to code it properly to store the values of water ...
0
votes
1
answer
19
views
EarthEngine: how to change pyramiding policy to mode for a "sum" reduction?
I am trying to do a simple "area of deforestation per year" computation in GEE, that is, applying a grouped sum reducer of a "year of deforestation" variable coming from the ...
0
votes
1
answer
22
views
Spatial Analysis and Value Comparison in Google Earth Engine
I'm currently working with Google Earth Engine and coding some analysis. The task at hand involves working with two images. Initially, I want to select all values greater than or equal to a specific ...
0
votes
0
answers
33
views
Retrieving concentration values from Google Earth Engine
I am using a chlorophyll-a algorithm to retrieve chlorophyll-a and turbidity concentrations using different algorithms for a lake using Sentinel 2A (S2_SR). How can I determine the output ...
0
votes
1
answer
57
views
How to do post-classification / eliminate isolated pixels in Google Earth Engine
I am trying to apply post-processing (Classification Sieve) in GEE to my classified raster, just as we apply in QGIS (used 4x4) or (8x8). Remove unwanted and noise pepper effects from the ...
1
vote
1
answer
41
views
Layers not getting displayed using Map.addLayer in GEE
I am writing a code to classify glacier features using various masks. The problem however is that none of the processed images are getting displayed. They are getting processed and the 'print' ...
1
vote
2
answers
89
views
How to convert Float to Number in gee
I'm trying to calculate percentile 95th divide to percentile 5th but I have not been able to find how to do this.
var start = "2022-01-01"
var end = "2022-12-30"
var dataset = ee....
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 ...
0
votes
0
answers
18
views
Build an prediction models with VNP46A2 data VIIRS
How can I create a Random forest prediction model based on "normalized_NTL_collection" or "normalized_NTL"? I don't understand how to determine the model and input that should be ...
0
votes
1
answer
12
views
How to Fix: Layer error: Computed value is too large in Google Earth Engine
I conducted a landcover classification, distinguishing between mangrove and non-mangrove areas. For each landcover type, I gathered fewer than 10 samples. I utilized Random Forest (RF) for ...
0
votes
0
answers
47
views
Error viewing the result of ee.Algorithms.CrossCorrelation
I am facing an issue when using ee.Algorithms.CrossCorrelation in Google Earth Engine. I am using an LST image and an NDVI image as input. The final product seems to have a visualization error since ...
1
vote
1
answer
49
views
Filtering clouds and creating median with Google Earth Engine Landsat8 EVI Composite
I am downloading images from Google Earth Engine's Landsat 8 Collection 1 Tier 1 8-Day EVI Composite collection here. I would like to create one image, a median composite of the images from May 1st to ...
0
votes
1
answer
30
views
Blank pre-1998 Landsat NDVI time series on GEE
I tried to generate Landsat NDVI time series for Fagge, Nigeria from 1993 to 2022 on Google Earth Engine but the output chart started from 1998 despite several items.
Can you assist with the code?
...
1
vote
1
answer
62
views
Adding columns to a FeatureCollection
I'm trying to build a FeatureCollection from 4 differents FeatureCollection in order to export an excel with 4 columns containg the 4 differents lists.
Here is an example of the strucuture of each ...
0
votes
1
answer
46
views
How can I retrieve relative humidity(%) from 3-Hourly GLDAS Dataset using Google Earth Engine for specific date?
I would like to calculate mean and instantaneous relative humidity for a specific location and date like 2018-08-18 at 10am. This is the script:
// Define the region of interest (Adana City Boundary)
...
0
votes
0
answers
25
views
How to aovid using ee.Algorithm.If for a null ee.image in Google earth engine?
I am trying to exclude the high values in an ee.Image in Google earth engine(GEE).
Before making reduceRegion to estimate the 90% percentiles, I used updateMask(image.gt(0)) to exclude the invalid ...
0
votes
0
answers
13
views
Obtaining a chart data from a ui.chart trend line
I am trying to figure out how to obtain a list of data points from a trend line I created. I need to determine the highest value and the data point associated with 15% of this max. However, when I ...
0
votes
0
answers
20
views
How do I get a line chart to display properly in GEE?
I'm trying to graph the year against the day, which I store in 2 lists. However, my graph shows up empty when I run my code, but when I manually put in the values that are output for ChartData2, I do ...
0
votes
1
answer
48
views
Calculating trend of number of days exceeding the threshold in each year using Google Earth Engine
I am trying to generate a raster where each pixel will show a trend of days exceeding a particular threshold of maximum temperature in GEE. I have calculated the number of days exceeding the threshold ...
1
vote
1
answer
35
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 ...
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 ...
1
vote
1
answer
54
views
Get index based on a condition in Google Earth Engine
I have a list of cumulative proportions based off of a histogram that I calculated in Google Earth Engine. Now I want to find the index of this list where the value is >= 0.995 and then use that ...
0
votes
1
answer
18
views
Filter out blue patches in greenest pixel composite - GEE Quality Mosaic NDVI change image Sentinel-2
I am making greenest pixel composites from Sentinel-2 SR (using the quality mosaic tool in GEE based on NDVI). I then subtract two greenest pixel composites to get a change in NDVI image.
These blue ...
0
votes
2
answers
41
views
Format numeric values with preceding zero(0)
How do I format numbers in JavaScript so that 1 becomes 01?
My goal is to loop over every month of the year. If I hard code _0 then 10,11 and become 010,011,012.
for (var i = 2020; i < 2021; i++) {
...
0
votes
1
answer
27
views
How to annotate features in google earth engine?
I have a CSV file with ID, X, Y, NAME and ZoomLabel. I have been successful with putting the Point Feature on the map.
Now I am trying to annotate the locations with the NAME field.
I used the ...
0
votes
1
answer
28
views
Null values after reduceRegion() and reducer.group
I'm wondering why I get some null values after .reduceRegion() and reducer.group().
I'm extracting daily surface temperature values for many lakes (~400,000) from Landsat images during 1985-2021. The ...
3
votes
1
answer
247
views
Strange black pixels scattered on terrain flattened image
I am attempting terrain flattening of the Sentinel-1 images here. However, I am encountering strange black pixels scattered throughout, as shown in the attached figure. I was calculating annual median ...
0
votes
0
answers
90
views
GEE - using ee.Image.sample to extract pixel values within a polygon
New to Earth Engine and trying to hack through this the best I can. Trying to sample some training data. I have 10 shape files, each containing 20 polygons spread across a large area. The problem is ...
0
votes
1
answer
32
views
Selecting one Landsat image per year according to cloud cover using Google Earth Engine JavaScript API
I'd like to create a Landsat 5,7 and 8 Image Collection for a given location, selecting for each year (and within the January to march month range) the scene with the least cloud cover.
So far I have ...
0
votes
0
answers
48
views
How to call a specific attribute from a feature
I am trying to store the coordinates of each points as an individual variable. How would I go about doing this?
var randomPoints = ee.FeatureCollection.randomPoints({
region: studyArea,
points: 5,
...
0
votes
0
answers
42
views
One-to-many feature collection in Google Earth Engine
I own two featurecollections, a point featurecollection named 'pointsWithFormattedDate' and a polygon featurecollection named 'polygons'. Starting from these two featurecollections, I would like to ...