New answers tagged google-earth-engine
0
votes
How to calculate NDSI of a specific region from an image collection?
Attempts 2 or 3 can be modified as follows. You cannot applied methods for images ('normalizedDifference') directly to an Image Collection. For this reason I produced the mean (img) for that ...
0
votes
Accepted
I'm trying to view four windows in Gee; everything is perfect, but my ui.Map.Linker doesn't work
The map you're creating in the first call to createMap1() in the ui.Map.Linker call is not the same map that you're displaying, because you're calling createMap1() a second time in the ui.Panel line.
...
0
votes
Calculating MODIS EVI feature collection but not landsat
Your first problem is that you're clipping every image in the collection with the ROI, regardless of whether it intersects the ROI or not. That's 147,700 images, when in fact there's only 19 images ...
0
votes
No training data found (random forest algorithm in GEE)
If you print your training data training, you'll notice it is completely empty, hence there not being any valid training data. It looks like the error stems from your reduceRegions(). Upon going ...
0
votes
r Terra Mosaic Raster uses huge amounts of memory and takes too long - any alternatives?
Spacedma's VRT solution did the trick. Both of these approaches worked the same.
terra::vrt(raster_files, "E:/raster_file_output")
or
gdalUtils::gdalbuildvrt(gdalfile = raster_files,
...
0
votes
0 element in image collection in Google Earth Engine
Your collection is empty because there is no Landsat 4 imagery for your region and date range:
var region = ee.Geometry.Polygon([[
[112.01637668750301, 30.256437069990916],
[112.01637668750301, 29....
1
vote
Accepted
Using if/else statement in Google Earth Engine JavaScript API
The issue here is a mix up between client- and server-side. I would suggest that you read up on it here.
Your condition is server-side, so you cannot use a regular if statement. On the other hand, ...
1
vote
Accepted
ReduceRegions "Image.reduceRegions: Computed value is too large. (Error code: 3)" in Google Earth Engine
When having a lot of regions, instead of using reduceRegions(), it's often better to map over them and do reduceRegion() for each of them. That way, EE can split up the work better. I still doubt you'...
1
vote
Accepted
GEE: How to add same panel each Maps?
You get an error with a very clear error message:
This widget has already been added to a map.
You cannot use a widget on more than one place, you'll have to create separate ones. To prevent ...
1
vote
Accepted
GEE: How can I code this more simply?
I have a hard time seeing a pattern in your labels/values. 1902 is for instance showing up a bunch of times. Assuming this is a mistake, and you want the value to be year - 1900, you could do like ...
0
votes
Exporting image collection keeping the image dates as band name in GEE
In general if you have to make a for loop in Earth Engine it is worth to consider an alternative. There is a build-in function available for earth engine: .toBands()
Depending on what it is you ...
3
votes
Accepted
Classify is not function using Google Earth Engine JavaScript API
The problem is that you are trying to apply certain ee.Image methods to ee.ImageCollection objects, so the error message is telling you exactly that (... is not a function). The first step to fix the ...
0
votes
Accepted
Convert a List into Feature Collection in Google Earth Engine
Following code can do that for all 6037 points in your feature collection (point 1502 was not included because it has null properties). Complete code in this link.
// Paracou
var aoi = ee.Geometry....
1
vote
Accepted
Fixing"FeatureCollection (Error) Image.reduceToVectors: First band ('rh100') of image must be integral"
You only need '.toInt' method in gedi variable. As referenceData feature collection is very huge (it has 463611 features), you cannot use print statement. It is necessary to export directly to Drive ...
1
vote
Accepted
Data extraction from imagery in Google Earth Engine using neighborhoodToArray
These 3×3 group of values are ee.Array objects and they need to be converted in lists with 'toList' array method. Afterward, these nine elements lists can be flattened for extracting median/mean with ...
0
votes
Why my LST code for L5 given high temperaure result?
Your code for L5 LST is given high temperature result because you are not considering a whole one year of data but only one month; as it can be observed in 'filterDate' method from your code. On the ...
0
votes
log naturalis syntax in GEE?
var radiance = image.expression(
' 0.0003342 * (b10) + (0.10000) - (0.29)', {
'b10': image.select('B10'),
}).rename('radiance');
var bt = image.expression(
'1321.0789/(774....
1
vote
Identifying bare soil in agricultural areas using NDVI and Bare soil index in Google Earth Engine
While I'm still not sure exactly what part of the code is not doing what you expect, I did notice your code is quite messy, and that easily leads to mistakes. A few examples:
You define your sentinel ...
1
vote
Layer error: Image.constant: Parameter 'value' is required
Errors are produced because regression parameters are nulls (offset and scale) in some cases. It can be observed in following image for your original script:
So, I carefully tried out the script only ...
0
votes
EarthEngine save TIFF - Python API Changes?
You just have to remove the .serialize() method:
url = ee.data.makeDownloadUrl(ee.data.getDownloadId({
'image': image,
'scale': '%d' % scale,
'filePerBand': 'false',
...
0
votes
Extract values by matching points in ImageCollection
If it helps, I have accomplished this with GEE python api.
def rasterExtraction(image):
feature = image.sampleRegions(
collection = ee_fc, # feature collection here
scale = 10 # ...
1
vote
Accepted
Extraction of time series simultaneously on different radius bufferpoint on Google Earth Engine
You only have to define a buffers list object and modify your script as follows for mapping it. In this case, I only used two distances (250, 500) for saving compute time. I defined an arbitrary point ...
0
votes
Layer error in Google Earth Engine
The problem here is with the scale you are using, i.e. 5 meters. This is the scale at which you are aggregating your images in order to get mean values, and is completely different from tileScale ...
1
vote
Accepted
Google Earth Engine: extracting pixel values at points from a shape file and creating a table with extracted pixel values and associated point IDs
I think you only need these lines in your code for connecting point_ids to fnf property in respective CSV file:
// Export features, specifying corresponding names.
Export.table.toDrive(sampled_points,
...
1
vote
Accepted
GEE: Structure Insensitive Pigment Index time series for multiple polygons
From your script it is not really clear what you are after, but your index computation on your mean image (vegetacion) should look like this:
var SIPI = ee.Image().expression({
expression: 'float ((...
2
votes
Accepted
How can I display the ID of each image in an Image Collection (Sentinel-2 Level 2A) in Google Earth Engine
After applying a function, the image loses the original properties. maskS2clouds is doing that, not bounds and date filters as you mentioned.
The function copyProperties lets you preserve properties ...
0
votes
Using values of a groups of objects to create an image in GEE
You first have to convert your dictionary (i.e. the output of your grouped reduction) into a featureCollection with null geometry, this makes the outputs much easier to handle.
var NDVI90perc = ...
2
votes
Accepted
Google Earth Engine finds Sentinel-3 images with no intersect with defined ROI
As far as Earth Engine is concerned, that image does intersect your ROI. If I run
Map.addLayer(band.geometry());
then I get this picture:
All of those black pixels in your image are, in fact, ...
1
vote
Land Surface Temperature in GEE: ,Creating a Chart with correct values
Your brightness temperatures are wrong calculated (see "Conversion to Top of Atmosphere Brightness Temperature" in this document). You need following correction (parameters were obtained ...
2
votes
Installing and importing Google Earth Engine Python API
The problem is that ArcGIS Pro does not handle activate <environment name> in conda the way that it normally operates. I used proswap <environment name> and this corrected the problem, as ...
1
vote
Excluding images S2 that are not complete in Google Earth Engine
filterMedatada is the function you need. Use .filterMetadata('SENSING_ORBIT_NUMBER','equals', x) where x is the orbit number you want to preserve. Check image metadata if you don't know the orbit ...
4
votes
Accepted
Iterate through 30+ years of daily precipitation images to get monthly averages for the whole period
For this case, map month by month I think it's a better approach:
var pp_monthly = ee.List.sequence(0, (2021-1981)*12).map(function(n) {
var start = ee.Date('1981-01-01').advance(n, 'month');
var ...
1
vote
Accepted
UI swipe displaying one map instead of two maps for left and right side
There are two issues I spot. First, you probably don't want the crops for 2013 no matter which years you select?
var images = {
'2013': getCrops('2013'),
'2014': getCrops('2013'),
'2015': ...
2
votes
Accepted
Preview all raster within a date range from an Image Collection in GEE
You can do this with client-side iteration. The below script evaluate a client-side array with the collection image ids, iterate over the ids. For each id, the corresponding image is located from the ...
0
votes
Accepted
How to mosaic landsat image collection on Google Earth Engine
I typically iterate over the dates you need your mosaic for:
var startDate = '2022-05-01'
var endDate = '2022-06-01'
var collection = ee.ImageCollection('LANDSAT/LC08/C02/T1_L2')
var numberOfDays =...
0
votes
'Supervised Classification'- 2016: Layer error: Computed value is too large
You're having the same issue as the user I answered here. Your training data set is huge, as you're sampling every pixel within the polygons in your feature collection. You can limit the amount of ...
0
votes
Accepted
Using function map() to updatemask with two imagenCollections
An ee.ImageCollection is not a JavaScript array. The function you pass to map() will be called with a single argument, an ee.Image. You also cannot use get() to extract images by index from the ...
3
votes
Print NDVI Image File Size in Google Earth Engine
Something like the below should work. It figures out the data type of each bands, how many bits used per pixel. Note that it doesn't take file compression into account (and maybe the pyramiding of ...
1
vote
Accepted
Iterative computation over image collection and multiple indexing in GEE
Looking at your code, you can easily resolve your error by changing the syntax at line 218 from
var si = ee.ImageCollection(ee.List(co.iterate(Snow_index, ee.List(si))))
to
var si = ee....
1
vote
Converting each image in image collection to separate bands with band names in Google Earth Engine
You first need to create a list with the band names you are going to use to replace the current image/band names. The list has to be the same length as the number of bands.
var names = ee.List....
1
vote
Google Earth Engine - missing share button of assets
If you want to share an asset you need to click on it and the Share button is on the pop-up window that opens, top right.
2
votes
Accepted
How to use "KERNEL_SIZE" in a Google Earth Engine code?
The error is telling you that there is a missing value (i.e., radius) when applying the ee.Kernel.square function, so that means that the KERNEL_SIZE variable does not have an assigned value. Here, ...
2
votes
Accepted
Google Earth Engine: Calculating image statistics for multiple study regions simultaneously
Use reduceRegions() instead of reduceRegion(). While reduceRegion() accepts a geometry and produces a dictionary of reducer outputs, reduceRegions() instead accepts a FeatureCollection and produces a ...
2
votes
Accepted
NA values on image downloaded from GEE
First, the code it's a little bit untidy (despite it works). For instance:
// Compute OSAVI.
var addSpectralIndices = function(image){
// Sentinel-2 bands
var s2Bands =
{'BLUE': image.select('...
2
votes
Google Earth Engine code for calculating NDWI from Sentinel 2 image collection
// Load an image.
var image = ee.ImageCollection('COPERNICUS/S2').filterDate('2017-09-01','2018-09-10');
// Define the visualization parameters.
var vizParams = {bands: ['B6', 'B5', 'B2'], min: 0, max:...
0
votes
Accepted
Task naming problem when exporting to cloud disk
You need to avoid ee.String while computing the name — or, well, you could, but you'd have to evaluate() it again and it's wasteful to call the Earth Engine service just to do a little concatenation. ...
0
votes
installation of Google Earth Engine API in conda fails
PolyGeo appears to be right here, something is calling back to the proenv environment in a cloned environment. in my traceback I would see a callback to
C:\Program Files\ArcGIS\Pro\bin\Python\envs\...
0
votes
Google Earth Engine - How do I export image to cloud storage using Node.js?
The issue ended up being an authorization error being thrown on the Google Cloud Storage end. Unfortunately, the error wasn't bubbling up through the callback function. I ended up discovering it by ...
1
vote
Adding a column to a Google Earth Engine feature collection and add names to it using ID
First, since you are new to GEE, I strongly recommend you to look Client vs. Server. I was super lost until I read that guide.
So if you're mapping over a ee. object, use server-side functions.
First, ...
1
vote
Accepted
Exporting Google Earth Engine dictionary to CSV
You have to turn your means into an ee.FeatureCollection:
var means = ee.FeatureCollection(
ee.List(
BIandEVT.reduceRegion({
reducer: ee.Reducer.mean().group({
groupField: 1,
...
Top 50 recent answers are included
Related Tags
google-earth-engine × 4296google-earth-engine-javascript-api × 695
javascript × 388
ndvi × 251
sentinel-2 × 199
export × 197
python × 180
google-earth-engine-python-api × 180
modis × 166
landsat × 152
time-series × 152
landsat-8 × 126
remote-sensing × 111
raster × 109
classification × 102
chart × 90
image × 84
sentinel-1 × 84
masking × 80
coordinate-system × 72
reducers × 71
feature-collection × 70
filter × 68
google-earth × 64
cloud-cover × 64