5

In GIS: Set a Min Max value for one raster (Right click > Properties... > Symbology). Copy The raster's style Select other rasters Paste the style


4

Your property 'orthofoto' is a computedObject, not an image. You can specify the property as an image by: var orthofoto = ee.Image(listOfImages.get(1)) Alternatively, if it works for your project, you can take the mean of the dataset using dataset.mean() and use that for sampling. Of course, this means that you're sampling across the entire date period and ...


4

I used the water masking approach described here, which uses the Hansen forest dataset to mask out water. That is a global dataset so it may be suitable for your study area. Since you didn't provide a study area, I used a county in Maine as a stand-in (and since you didn't provide a cloud threshold, I used 50). This approach will use a constant mask for ...


3

You can try converting the image collection to bands in a single image. I just tried the following code and it took around 10 minutes to export to Google Drive. var era5_2mt = ee.ImageCollection('ECMWF/ERA5/DAILY') .select('minimum_2m_air_temperature') .filter(ee.Filter.calendarRange(1990,2020,'year')) ...


3

Here is the Python equivalent of your function: def addEVI(image): EVI = image.expression('2.5 * ((NIR - RED) / (NIR + 6 * RED - 7.5 * BLUE + 1))', { 'NIR' : image.select('B8').divide(10000), 'RED' : image.select('B4').divide(10000), 'BLUE': image.select('B2').divide(10000)}).rename('EVI') return image.addBands(EVI)


3

Landsat mission statement says: "Traveling on the descending (daytime) node from north to south, the satellites cross the equator on each pass at a time that provides the maximum illumination with minimum water vapor (haze and cloud build-up). Landsat 7 crosses the equator at 10:00 a.m. +/- 15 minutes (mean local time) while Landsat 8 crosses the ...


3

The problem is functions order. First, you add LST band, then you compute MNDISI. Also, this chunk won't work: .map(function(img){ return img.addBands(terra_LST.filter(ee.Filter.eq('system:index',img.get('system:index')))) }) You are mapping addBands() function trying to add bands from an ee.ImageCollection, it should be ee.Image type. No worries, ....


2

I think the documentation is wrong. Although we do not know what the calculation of the distance used is, we can guess that it is the calculation of the orthodromic on a sphere (i.e., the distance measured on the great circle that contains two points). Regarding the radius of the sphere, I don't think it is calculated based on the location (precisely because ...


2

There're two mistakes in your expression, you're defining a variable that is an ImageCollection, not an image; for 'LST' and 'MNDWI'. The first fix is an easy one: you're mapping your second function to the original IC and not the output from the first function where you calculate 'MNDWI'. So you simply change terra_SR.map(indices_terra_2) to terra_mndwi.map(...


2

This error appears because you are mixing in indices_terra_2 function, images with ImageCollections in mndisi calculation. Following code fixes such error by using list of images, instead ImageCollection, for retrieving adequate index in LST images. var Jawa = ee.FeatureCollection("users/mohfaisal181099/KP/shp_jawa"); Map.centerObject(Jawa,7); Map....


2

Another way of doing that is to convert your ImageCollection to an Image with multiple bands. Then, you can extract the band names, get the second name (index 1) and use getInfo to convert the band name to a client side object. An advantage of using this approach is that the image can be easily exported. // Convert image collection to a single image with a ...


2

Quick and dirty way to do this would be to change the image collection to a list of images and then use get() to select the image that you want: var evi2weekList=ee.ImageCollection(evi2week).toList(999); var evi2week2ndImage=ee.Image(ee.List(evi2weekList).get(1)); //note index 0 is the first image print('2ndImage from evi2week imColl',evi2week2ndImage) ...


2

Collections aren't designed for random access; any method you use to get there will severely limit the scalability of your code. That said, you can get to positional chunks by converting to a list, since toList has an offset argument. collection.toList(count, offset) A more scalable solution, if you don't mind them being non-contiguous, is to assign a ...


2

You are using the wrong collection for calculating the mean (based in your former question). It is terra_mndwi; not terra_SR. There are other errors adding bands and mapping collections. Following code fixes all issues. var jawa = ee.FeatureCollection("projects/ee-tugasakhirkkh/assets/Daerah_Penelitian"); Map.centerObject(jawa,7); //Define ...


2

The forEach function that your original code is using, is a client-side function on Javascript arrays/lists. You cannot use it on server-side objects. In your original code, you have a client-side javascript list. In the second code, you've turned it into a server side list. The only way to use the server-side list in a loop like you're using, is to ...


2

Your stepList.map(...) function is returning some images with no bands (and therefore no band names B4, B3, B2 that the evi function is looking for). Here I have added a valid property to each image in the collection based on whether it has bands, then filter the collection on that property. // Import landsat imagery. Create function to cloud mask from // ...


1

does it mean that the result would be incorrect or the code can't run? Code can't run. Specifically, the computation will time-out (after around 5 min). The guide recommends that intensive computations be done in steps, exporting the intermediate results, as exporting allows for a longer run time. References: https://developers.google.com/earth-engine/...


1

Indeed as @radouxju mentions in their comment, you need to re-order your workflow a little. The idea is to: split your sample into training and validation sets train your model using only the training sample classify your validation set using the trained model examine the accuracy // train the classification points // sample the input imagery to get a ...


1

Paint the points into an empty image: ee.Image().double().paint(points, "label")


1

Regarding your own code, you are getting None returned for the bands because there are no bands called 'B4', 'B5' etc. When you convert your image collection to an image with toBands(), the bands are named with the original image names concatenated with the band names. To extract band information for several points, you can use a FeatureCollection: pointFC =...


1

You can use ee.Image.pixelLonLat() for this; this is an image with two bands named 'longitude' and 'latitude'. You can mask this image with the value from your reducer ('B5_max'), to return only pixels that equal this value. var lonlat = ee.Image.pixelLonLat() .updateMask(B5.eq(ee.Image((ee.Number(B5_max))))) .reduceRegion({ reducer: ee....


1

You're correct that the problem is that there's no LST for some dates. The actual error is coming because you're attempting to get() from the first() item in a collection of 0 length. You can avoid all that. Use reduceRegion(), not sample() (since you don't need each point to generate a collection), and just assign the reduceRegion results (a dictionary) ...


1

To get the mean values per year and month you could use a nested loop for years and months and return a feature containing information on the date and mean soil moisture. See an example here: https://code.earthengine.google.com/2fc42a761782e5f49927bdae1b5387dc


1

Image collection byMonthYear doesn't have values of 'system:time_start'. For fixing this you have to do: var byMonthYear = ee.ImageCollection.fromImages( years.map(function(y) { return months.map(function (m) { return collection .filter(ee.Filter.calendarRange(y, y, 'year')) .filter(ee.Filter.calendarRange(m, m, 'month')) ....


1

Another way would be by using groupReducers var dataset = ee.ImageCollection("ESA/WorldCover/v100").first(); var areaImage = ee.Image.pixelArea().addBands( dataset) var areas = areaImage.reduceRegion({ reducer: ee.Reducer.sum().group({ groupField: 1, groupName: 'landcover_class', }), geometry: area, scale: 10, ...


1

Based in the answer to this question, following code can do that. var aoi = ee.Geometry.Polygon( [[[81.0312993277979, 29.97063836127144], [81.0312993277979, 28.91826467453208], [83.2505376090479, 28.91826467453208], [83.2505376090479, 29.97063836127144]]], null, false); Map.centerObject(aoi); Map.addLayer(aoi); ////////...


1

As Jhonathan said, you need to map the collection. So far, ndvi is a function variable, not a global variable. With map(), the function iterates the whole collection adding NDVI: var addNDVI = function(imagen) { var ndvi = imagen.normalizedDifference(['B4', 'B3']) .rename('NDVI'); return imagen.addBands(ndvi); }; var imagen_ndvi = ...


1

For easy interactive use of the Python API, there is geemap. It also has a module to convert Javascript scripts and snippets to Python Given a Javascript script some_script in the working directory, you can call it like so (untested): from geemap import js_to_python js_to_python(in_file="some_script.js",out_file="some_script.py",use_qgis=...


Only top voted, non community-wiki answers of a minimum length are eligible