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

JavaScript client library for calling the Google Earth Engine API.

Filter by
Sorted by
Tagged with
3 votes
1 answer
55 views

Convert YYDOY pixel value to milliseconds?

I'm working with RADD alerts stored in the YYDOY (Year-Year-Day-Of-Year) format, and I'm having trouble converting this information to milliseconds. I've tried the following: var loadLatestRaddAlert = ...
user avatar
0 votes
0 answers
12 views

GEE error: Cannot read property 'bname' of undefined

I am using CHIRPS precipitation data in this case having precipitation band. Someone suggest me the possible sources of this error please: Error: Cannot read property 'bname' of undefined (bname is ...
user avatar
0 votes
0 answers
17 views

Sample training points from image collection using Google Earth Engine JavaScript API

I am trying to train a classifier to distinguish between snow and not snow pixels on Landsat imagery. I got the layer prepared with manually vectorized snow extent for couple of images and now want to ...
user avatar
  • 61
1 vote
0 answers
15 views

Google earth engine pan sharpening of Landsat 7 image is not producing the correct true color image

I'm currently trying to produce a true color pansharpened Landsat 7 image in Google Earth Engine. I've included my code below and a subset of the resulting image. I'm simply using the rgbToHsv ...
user avatar
1 vote
1 answer
23 views

Copying the system:time_start property from a filtered Image Collection to a Mosaic/Image in GEE

I'm creating a script to do a time-series analysis over a large date range, preview/(Map.addLayer) the results on one specific day, and have that Map result be exportable. The timeseries section is ...
user avatar
0 votes
1 answer
20 views

Google Earth Engine - Set Null values as zero and take the mean

I am trying to set the null values of NDVI to zero for districts in Indonesia. However, when I export the table, the mean value for all districts come up as zero, which is not correct. Is there a way ...
user avatar
  • 13
0 votes
1 answer
22 views

Converting GEE Javascript to Python using geemap not working

I'm looking to convert my code to calculate the mean 30 year precipitation from ERA5 in GEE into Python so that I can run it in the ee python command line tool. I tried using the geemap conversion ...
user avatar
0 votes
0 answers
41 views

Converting .vrt to .tif causes massive change in coordinates

I am trying to convert a .vrt file to a .tif file so that I can upload it to Google Earth Engine as an image asset. However, I get an error that the tif is not within the -90 to 90 latitude range, ...
user avatar
0 votes
0 answers
24 views

Uploading tif to GEE Error: "Image extends outside -90,90 latitude range. Bounding box x=0..43200, y=0..16800"

I had a vrt layer of soils that I'd like to use in GEE. Since GEE only takes tif image files for upload to assets, I exported it as a tif with the projection EPSG:4326. However, when I try uploading ...
user avatar
1 vote
1 answer
28 views

Earth Engine - enforce minimum distance between sample points

I have a group of sample points but need to enforce a minimum distance of 500m between the points. I have come about this approach from Noel Gorelick: https://medium.com/google-earth/random-samples-...
user avatar
  • 59
1 vote
1 answer
39 views

Combining GEE layers to create a global categorical raster with class values?

I've been making a climate map of the world and each climate zone is stored in a different variable (i.e. warmtemperatedry, cooltemperatemoist, cooltemperatedry as you can see in the picture). I'd ...
user avatar
0 votes
1 answer
28 views

Updating sldstyle based on user choice

I use sldstyle to create a discrete colormap for plotting images in Google Earth Engine. Like this: var assimvalue = 1; // desired upper limit. //set up the 11 intervals var assimstep1=-(assimvalue/5*...
user avatar
  • 1
1 vote
1 answer
42 views

Creating image lists and saving in a loop after adding band

I have an image collection with many images (>800) and I want to calculate monthly NDVI and NBR median indexes and export the resulting images in a loop. I had no problem grouping the images in the ...
user avatar
0 votes
0 answers
17 views

Converting code for several time series images [closed]

The following code is for combining the two images in Google Earth Engine: var roi = ee.FeatureCollection("projects/ee-xrpt/assets/studyarea"); Map.centerObject(roi,10); var styling={color:'...
user avatar
0 votes
1 answer
38 views

Calculate transition of different NDVI classes from pre and post NDVI in Google Earth Engine

My competency in GEE is quite low. I have calculated 2 NDVI layers (pre and post-disturbance NDVI). I have separated these NDVI layers into 4 classes according to NDVI values. Now I need to calculate ...
user avatar
2 votes
1 answer
42 views

Finding areas with at least 7-days/year of sub-zero temps over 30 years using ERA5 in Google Earth Engine

I'm looking to make a climate zone map in Google Earth Engine (GEE). One of the criteria I'm using is frost occurrence- which is defined by having at least 7 days per year with a minimum temperature ...
user avatar
0 votes
0 answers
11 views

Setting colormap quantity entries based on value of variable using Google Earth Engine JavaScript API

Below is simple code that creates a discrete colormap (intervals) for a terrain model. The intervals are pre-set to range from 0 - 900 m. I am trying to set something like this up, but with the idea ...
user avatar
  • 1
1 vote
1 answer
23 views

How to select a column with a specific data type in Earth Engine?

Considering this FeatureCollection: var fc = ee.FeatureCollection([ ee.Feature(null, {x1: 0.1, x2: 10, x3: "a", x4: 1.1}), ee.Feature(null, {x1: 0.2, x2: 9, x3: "b", x4: 2.2}), ...
user avatar
0 votes
1 answer
42 views

Error in random forest regression (Output of image computation is too large (25 bands for 903440 pixels = 106.8 MiB > 80.0 MiB)

I am working with the GEDI dataset and Sentinel-2 spectral indices (about 20-40 bands). My aim is to use the Random Forest Regression to generate a map containing the information on Relative Height (...
user avatar
0 votes
1 answer
30 views

Exporting tables with variable name in Google Earth Engine

I am using 'featureCollection.features.forEach()' inorder to loop over a featurecollection and make some changes to each feature. after each iteration I want to export a CSV file. I want to name each ...
user avatar
2 votes
1 answer
48 views

Array (Error) Array: Unrecognized type, may only use numbers or lists, found type Array

I am getting this error when trying to subtract the array with its mean value in Google Earth Engine JavaScript API var from = ee.Array([2,3]) var meann = from.reduce(ee.Reducer.mean(),[0]) var to = ...
user avatar
0 votes
0 answers
23 views

Mosaic images in an image collection based on date of acquisition

I have an image collection which has undergone certain processes such as resampling and rescaling. Now I am trying to mosaic the images based on the date of acquisition. I tried the code from ...
user avatar
0 votes
1 answer
28 views

Transforming object data in shapefile in Google Earth Engine

When I run this code, this error appears: Line 20: january.clipToCollection is not a function. How can I transform it to appear as a map on Google Earth Engine? var mg = ee.FeatureCollection('users/...
user avatar
0 votes
0 answers
24 views

Adding external data to NDVI Chart google earth engine To have Two line charts on the same plot

I am trying to add external data to ndvi chart on google earth engine in order to have both lines on the same chart. I have been able to plot them differently but not able to merge them. Here is my ...
user avatar
0 votes
0 answers
15 views

How to capture or pull user selection in the Google Earth Engine app with the update button widget

I am still new to the GEE app and trying to build a basic app to do simple maps. I am trying to give users a choice to select three mapping parameters to the right (e.g., region of interest, map type, ...
user avatar
2 votes
1 answer
35 views

Why is my combined Mask masking different areas to the individual Masks over an ImageCollection?

I'm trying to perform a time-series analysis of Sentinel-2 satellite imagery over Water, and to do that I've been muddling through using functions to perform analysis on images over an Image ...
user avatar
1 vote
1 answer
30 views

Gaps in rasters as a result of OBIA. Google Earth Engine

I am running an object-oriented classification and I get gaps in the rasters that I want to use. For example, I want to use elevation data from 'USGS/SRTMGL1_003'. If you run the code, you will see a ...
user avatar
  • 13
1 vote
0 answers
37 views

How to applying random forest regression model to time-series data?

I want to downscale time-series imagery data using temporal and static remote sensing products using Google Earth Engine (GEE) Random Forest Regression. Typically the code would be something like: // ...
user avatar
0 votes
1 answer
16 views

Error while adding all layers to the map in console in Google Earth Engine

I want to add the layer to map, followed this solution, but encountering the following error, however I have converted the variable value to string, still, it is showing the error: layer error: ...
user avatar
-2 votes
0 answers
17 views

Error when trying to export Sentinel images [duplicate]

I'm running into issues when trying to export Sentinel images from 2015. What is incorrect about my export code? var image = ee.Image(S2 .filterDate("2015-01-30", "2015-12-30") ....
user avatar
  • 1
1 vote
1 answer
33 views

Using Google Earth Engine JavaScript API

I want to export clip image with the population data. But when I run the export file in the TASK menu, I get this error: Error: Image.clipToBoundsAndScale, argument 'input': Invalid type. Expected ...
user avatar
1 vote
0 answers
33 views

Merging multiple image collections into one in Earth Engine without losing image properties

I have 4 different image collections and I am trying to merge them into a single collection. Further I want to mosaic them based on the date of acquisition. I tried this code, var Res_collection = ...
user avatar
2 votes
0 answers
20 views

Calculate categorical image area based on frequency histogram in Google Earth Engine

To calculate the area of the classes in a categorical image I'm using a ee.Image.reduceRegion. Sources: var geometry = ee.Geometry.Polygon( [[[12.124393381085076, 42.35185853899329], ...
user avatar
  • 130
0 votes
1 answer
36 views

How to find the maximum value of a band in an image collection (globally, across time)?

I am interested in finding the minimum and maximum values of a value. For example, in the code below, I would be interested in the minimum temperature across dimensions of time and space (i.e., just a ...
user avatar
  • 3
1 vote
1 answer
50 views

Mapped function's arguments cannot be used in client-side operations

I am trying the below code to perform spectral dilation in GEE but gives me an error: spectral dilation: Layer error: A mapped function's arguments cannot be used in client-side operations The code ...
user avatar
1 vote
1 answer
37 views

Remove system start when plotting after calculating NDVI for shrubs and grass in Google Earth Engine using Copernicus

I have tried to select only shrubs and grass on NDVI but on plotting chart it shows this error. Here is the code. var feat =ee.Geometry.Point([33.15865673674562, -5.173302054347385]); var s2a = ...
user avatar
1 vote
1 answer
37 views

Layer error: Image.rename: The number of names (1) must match the number of bands (10)

I am using Landsat 7 data (ee.ImageCollection("LANDSAT/LE07/C01/T1_TOA")) for flood mapping. I am trying to write the code but I'm stuck at a line where it says "Layer error: Image....
user avatar
1 vote
1 answer
43 views

median function of GEE

I want to do some reprocessing with ee.ImageCollection("NOAA/VIIRS/DNB/MONTHLY_V1/VCMSLCFG"). For example,I want to caculate median value of each pixel in 12 images. var imageCollection = ee....
user avatar
0 votes
1 answer
31 views

Adding function as band to image collection in Sentinel-2

I need to assess TSM in a river using Sentinel-2. Which is why I need to add the function of TSM as a new band. I used Adding multiple indices as bands to image as a guide but it is not working for ...
user avatar
1 vote
1 answer
49 views

How to open a list of images from an asset as an Image Collection?

I need to create an Image collection from a list of images that I import from an asset in GEE. This is the code I am using: //THE CREATION OF A IMAGECOLLECTION WORKS WITH TWO IMAGES LOADED HERE var ...
user avatar
1 vote
1 answer
38 views

Convert cumulative day of year to milliseconds?

I'm working with an image where the value of each pixel corresponds to the day of the year, starting with 2019-01-01. Date Pixel value 2019-01-01 1 2019-01-02 2 2019-01-03 3 ... ... 2022-04-11 ...
user avatar
0 votes
0 answers
33 views

Should exporting image take days?

New to Earth Engine on this end, I am using trying to export specific bands of an image collection, filtered by date, and summarized as shown below. It takes at least two days for the image to ...
user avatar
0 votes
1 answer
26 views

Image Collection Join Error in Google Earth Engine

In the below code, I want to join two image collections based on system:time_start property but it does not work and returns 0 element. Collections acquisition dates are same but they are different in ...
user avatar
0 votes
1 answer
36 views

Google Earth Engine: User memory limit exceeded when aggregating hourly data to monthly

I am trying to calculate the monthly min and max temperatures averaged over my AOI using the ECMWF hourly temperature at 2m height data (https://developers.google.com/earth-engine/datasets/catalog/...
user avatar
  • 715
1 vote
1 answer
59 views

Computation timed out for multipolygon but not for single polygon of equivalent size in GEE

I am currently running a GEE code and have been encountering this issue repeatedly: For geometries composed of a single polygon, or a MultiPolygon that is relatively grouped together, the computation ...
user avatar
0 votes
1 answer
32 views

LULC-2021: Layer error: User memory limit exceeded

I am trying to create a LULC map for Maharashtra State in India. I collected training polygons for 7 classes: Agriculture, Water, Builtup, Fallow Land, Barren Land, Wetlands, Other Vegetation. I am ...
user avatar
  • 107
0 votes
0 answers
35 views

Applying Linear Stretch Landsat 8 SR Using Google Earth Engine

I'm doing research indices of impervious surface, but for calculate the indices, the Surface Reflectance value of Landsat 8 should be converted to a value in the range 0 - 65535 in order to maintain ...
user avatar
2 votes
1 answer
67 views

Can we export features to asset folder in Google Earth Engine?

I'm trying to perform classification on a large study area and would like to store the features of the study area in the Asset folder of Google Earth Engine, so that it becomes easy for me to call the ...
user avatar
  • 107
0 votes
1 answer
47 views

Filter out values of a property in a Feature Collection

I am writing a script to find where imagery from Landsat 7 and Landsat 8 overlaps within two days of each other within a certain aoi. The output for this is a feature collection with a property called ...
user avatar
  • 183
0 votes
1 answer
32 views

Extracting ee.Geometry.Point from randomPoints

I am trying to extract the points from the following function in Google Earth Engine random_points = ee.FeatureCollection.randomPoints(region, 1,0,1) When i use .getInfo(), it tells me that this is an ...
user avatar

1
2 3 4 5
14