New answers tagged

0 votes

Filtering Landsat images base on cloud cover over region of interest

I've created the following function to add the cloud+shadow+snow percentage for a particular region as a new image property so you can filter the image collection based on that property. The 'region' ...
1 vote

Wrong Palette of color when doing a supervised classification GEE

The problem is that your visualization parameters are wrong. You only have two classes and you are setting the min and max values to 0 and 10. Try this. var classVis = { min: 1, max: 2, palette: ...
0 votes

GEE Export.image.toDrive file is not split in tiles

You are specifying a fileDimensions that is way to big. This would be an image with 2560000*2560000 pixels, way over the GeoTIFF 4 GB limit. Try to export your image using a smaller value for ...
  • 11.9k
0 votes

Create out-of-bag chart of RF model classification in GEE

Try something like the below. I don't think this will work for any larger counts of trees or any heavy classifications. var treeCounts = ee.List.sequence(1, 100) var errors = treeCounts.map(...
  • 11.9k
0 votes

How to get cluster centers of the entire "result" image (the final gridded clustered image)?

To begin with, what do you mean by cluster centers? If you put result on a map (Map.addLayer(result.randomVisualizer())), you'll notice that some KMeans clusters does not have all their pixels ...
  • 11.9k
1 vote

Producer's accuracy export in Google Earth Engine

The collection property must be a feature collection. Just add your producer accuracy as a property in a feature in a feature collection, then export. va r producersAccuracy = confusionMatrix98_99....
  • 11.9k
0 votes

Supervised classification using training samples from different months

You normally evaluate a supervised classification with some kind of confusion matrix, most typically with a holdout dataset. There's an example of how to do that here: https://developers.google.com/...
0 votes
Accepted

Unable to transform edge error when clipping ImageCollection in Google Earth Engine

Seems to be a bug, but you can work around it by clipping the individual images before you call toBands: var modis_evi = ee.ImageCollection('MODIS/061/MOD13A2') .select('EVI') .filter(ee....
3 votes

"Image.select: Pattern 'blue' did not match any bands" error during LULC change detection using Earth Engine

The problem is that there are no images available from 1900 - 1990; thus, the classifier outputs an error when it tries to classify an empty image. An easy fix would be to simply change the startyear ...
1 vote
Accepted

Google Earth Engine : adding two select boxes to a panel

Your province dropdown is created inside the country_selected() function, which runs every time a country is picked from the country dropdown. Move the province dropdown creation outside of this ...
  • 26
0 votes

Google Earth Engine Clip Vector Data

Use vector operations like Union, Intersection or subtract
  • 83
0 votes
Accepted

GEE, function, max Y values for each X

The code below is a little awkward but I believe this is the best way to do it. You convert your values to a feature collection because these are easier to filter and manipulate in general, that way ...
  • 1,139
1 vote

Give a path of Google Drive to which Google Earth Engine should export the file to

No, unfortunately. You have to give your folders unique names (perhaps 'L5_Lon_15') or move the exported result in some other systematic way.
  • 157
1 vote

Reg Google Earth Engine code editor suggestion tooltip

There's a setting under the gear icon: underline code suggestions. Turn it on then reload the code editor.
1 vote

what is the difference between the .mask and .updateMask

It seems actually there is a subtle but big difference between mask and updateMask when the original image on which the mask is to be applied itself contains masked values: mask overwrites the masked ...
  • 1,931
0 votes

Zonal statistics and list extraction using Google Earth Engine Python API

You can't include large GeoJSON files in your query directly. You need to upload the GeoJSON as a table, and use it from there. Or split it into multiple pieces and make multiple queries that are all ...
0 votes

Submit the task in Google Earth Engine Python client

It's not quite clear, but I think what you're asking is how to start a task. You do that with task.start(). From the built-in python documentation: >>> import ee >>> help(ee.batch....
1 vote

Blue image when calculating LST

Your min/max values doesn't match the data you're outputting. Go to the Layers section, click the gear button, select Stretch 100%, or one of the other options. Click Apply to see the changes on the ...
  • 11.9k
0 votes
Accepted

GEE, Error generating chart: User memory limit exceeded

It runs out of memory because you run reduceRegion(), extracting a list of all pixels within an area of tens of thousands of square kilometers, at a scale of 2 cm. You are trying to put 10e11 (you end ...
  • 11.9k
0 votes

Google Earth Engine - missing share button of assets

It is the product of some configuration in chrome, it is solved using another browser such as Mozilla.
0 votes

The run button not usable in Google Earth Engine

Usually, this problem is caused by a communication error. A quick solution is to use a proxy to circumvent for a few moments and then connect normally with GEE
0 votes
Accepted

GEE, scatter plot between two raster with different numbers of pixels

It sounds like the underlying data is still at different spatial extents. Here's what you could try: If these rasters are your own data, I'd recommend using GDALWARP to reproject to common resolution,...
  • 89
0 votes

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

To begin with, you might want to start off your processing in linear, and convert to dB in the last step. For that, use COPERNICUS/S1_GRD_FLOAT. Otherwise, you convert with this: ee.Image(10).pow(db....
  • 11.9k
0 votes
Accepted

'Error generating chart: No features contain non-null values of "system:time_start"'

You're passing a single image to the chart (the mean over time) where an image collection is expected. You will want to scale every image in the collection. That's done through map(). The ...
  • 11.9k
2 votes
Accepted

Unusual Results using Reducer.mean() for calculating percentage in GEE

Here's your problem: return image.addBands(ee.Image(1).updateMask(NDWI.gte(0.1)).rename('NDWI_mask')); The resulting image is 1 or the pixel is masked, so your mean is 1. The below snippet would ...
  • 11.9k
0 votes

How to get cluster centers and their values in Google Earth Engine?

Cluster the training data, then reduce it with a mean reducer, grouping on clusters. var properties = eramon.bandNames().add("cluster") var means = training.cluster(clusterer) ....
1 vote
Accepted

Problems calculating area of polygons using dissolve function in Google Earth Engine

When you take collection.geometry(), overlapping polygons are merged in ways that can be counter-intuitive, and therefore it's an operation you should essentially never use on a collection. Instead, ...
0 votes

Random Points error on a Time Series Cloud Free Composite

The error message is giving you all the information you need. The function needs a geometry as input and you provided an ee.Image. Just extract ee.Image's bounding box like: var geom = cortado....
  • 12.8k
0 votes
Accepted

Why can I add data as a map layer, but not be able to export it in GEE?

There's a bug that was introduced recently that makes some projections (mostly polar ones) not work during Export. The team is working on it.
0 votes
Accepted

How to chart only a subset of features in a feature collection in GEE

You filter the feature collection. In your case: table.filter(ee.Filter.inList('myProperty', [2, 5, 8, 19])) Where myProperty is the property of the features where you keep your ID.
  • 11.9k
0 votes
Accepted

Discontinuity error in Sentinel-1 water map

First, unrelated to your "discontinuities": You are calculating the percentage by taking the mean and dividing it by the count then multiplying by 100. You will want to skip the division, ...
  • 11.9k
0 votes

Pixel value backwards compatibility Landsat collection 1 and 2

If you look in the bands section of the catalog for collection 1 and 2, you'll see the scale and offset (only for C2) columns. Before you use the data, you probably want to apply these scale factors. ...
  • 11.9k
1 vote

How to calculate the burnt area for each rectangle in the grids specified and save in CSV

There are a number of problems with your code, and you don't really describe what you're trying to achieve in detail. Simply calculating the area of fire for each cell in a grid can be done like this: ...
  • 11.9k
1 vote

NDSI handling of areas that cross over a pixel

When you clip to a geometry, your pixels get masked: For pixels completely outside the geometry, the mask value is 0. For pixels completely inside the geometry, the mask value is 1. For pixels on the ...
  • 11.9k
0 votes

UI Charts - Google Earth Engine Python API

Sadly, the chart feature is only available in Code Editor, but you can manipulate the data in GEE Python API and use external libs to deal with the data structure and visualization.
1 vote

Calculating LST from Landsat 8 in Google Earth Engine?

This answer has a couple issues: 'LANDSAT/LC08/C01/T1_SR' is depreciated, the current available LANDSAT OLI asset is 'LANDSAT/LC08/C02/T1_L2'. This essentially breaks the rest of the code as the band ...
0 votes

PCA in GEE, layer error mesage-Computation time out

This is a scale issue. So, by using an arbitrary area in Nepal (you don't provide one) as your roi and modifying following variable as follows: var covar = arrayImage.reduceRegion({ reducer: ee....
  • 28k
1 vote
Accepted

Authentication error of Google Earth Engine QGIS plugin

Download GCloud For Windows : https://dl.google.com/dl/cloudsdk/channels/rapid/GoogleCloudSDKInstaller.exe or pip install gcloud (if you are using cmd/terminal/powershell) Once the installation is ...
  • 83
1 vote
Accepted

Estimated Min Max values of ERA5 data

As you can read in the documentation for ERA5 on GEE: u refers to the "Eastward component of the 10m wind. It is the horizontal speed of air moving towards the east, at a height of ten meters ...
  • 1,761
0 votes

Calculating Area of each Classes by Region in GEE?

You are mapping over turkey which is 1 row from the GAUL Level 0 collection but you're referencing GAUL ADM1_NAME after the reduction, which doesn't exist in that collection. You probably meant to be ...
1 vote

Error: Computed value is too large, while trying to extract all the elevation values in GEE

Using reduceToVectors on the DEM is probably not doing what you're expecting. All connected areas that have the same elevation will get collapsed into a single point (that's just what reduceToVectors ...
0 votes

Request payload size exceeds limit while exporting image from Google Earth Engine

Your collection is getting in-lined into the Export call because you used it as the region. You shouldn't ever use a collection as a geometry. Use clipToCollection when clipping with it, and ...
0 votes

Error: Computed value is too large, while trying to extract all the elevation values in GEE

Adjusting the scale in the "pixel" for a whole country scale may fix this: var pixels = dem.reduceToVectors({ geometry: geometry, scale: 100, geometryType: 'centroid', eightConnected:...
1 vote

Error in GEE Function for masking water from Sentinel-1

When I run your code, I got the following error message: Layer 2: Layer error: Image.select, argument 'input': Invalid type. Expected type: Image. Actual type: ImageCollection. It is clear that you ...
  • 28k
2 votes
Accepted

Earth Engine code returning white image

Value range of three bands is 0-65455 (Catalog Page). Therefore, when you specify max: 255, you make all pixels with values greater than 255 white. Since almost all values are greater than 255 in ...
1 vote

Keeping the actual band names in GEE exported images

even though I have faced the same issues but somehow I figured it out through QGIS. once you export the image collection from GEE open it in QGIS go to properties> information there you can find ...
1 vote
Accepted

ImageCollection (Error) Collection.toList: The value of 'count' must be positive. Got: 0

There are no images for one of the years in the region you're working in (looks like it's 2004). So the size of the collection is 0. And you're not allowed to call toList() with a 0 value. You ...
0 votes
Accepted

Does MultiPolygon support Altitude?

Earth Engine doesn't support Z values in any of the geometry coordinates.
0 votes
Accepted

What additional corrections are applied to Landsat data when it is ingested into Google Earth Engine?

No additional processing is applied to the RAW, TOA or L2 collections.
0 votes

How to split a feature collection in several equal parts in GEE

You can do this either statistically with randomColumn() and filtering, or since there are so few, just using a list and shuffle() and get an exact number of items per fold. Here's an over-engineered ...

Top 50 recent answers are included