5

The problem is not what you think: Batch tasks go into a queue and do not consume any resources until they start running. Memory limits are independent, not shared across all tasks. The problem you are having is not about your batch tasks, but what you're doing to set them up. nhd_list = nhd.toList(nhd.size()) This line means that any computation that ...


3

In almost all cases, you are better off using filters. My understanding is that it's significantly more efficient. But if you really need to, you can filter out an element in map() by returning null and setting the dropNulls argument to true. ee.ImageCollection("COPERNICUS/S2") .filterBounds(table) .filterDate('2016-01-01','2020-01-01') .map(...


3

var image = dataset.map(function(image) { return image.clip(geometry); }); Map.addLayer(image, RGB); In this code you are displaying the entire image collection (despite its name, image is an ImageCollection) which is implicitly mosaiced by Map.addLayer (all images are combined, taking the most recent available pixel). //exported to asset Export.image....


2

Generally, it's a lot better to use NaN. I can think of one reason not to, however. NaN only exists with floating-point data types. So if you need to write out or read a GeoTIFF with integer values (e.g. perhaps you have some final classification with five classes, represented as integers 1-5), then you cannot use NaN and save it out with a UInt8 datatype (...


2

From https://developers.google.com/earth-engine/image_upload: Give the image an appropriate asset ID (which doesn't already exist) in your user folder. If you'd like to upload the image into an existing folder or collection, prefix the asset ID with the folder or collection ID, for example /users/name/folder-or-collection-id/new-asset. This will work with ...


2

So, in order to create a shapefile from an ee asset I propose the following solution, feel free to improve it : rootDir = os.path.expanduser('~') + '/' asset = 'users/bornToBeAlive/aoi_PU' aoi = ee.FeatureCollection(asset) aoiJson = geemap.ee_to_geojson(aoi) aoiShp = sg.shape(aoiJson['features'][0]['geometry']) Then you need to create your shapefile (it ...


2

The bands field present when printing an image collection does not indicate exactly what bands the images in that collection have. It only specifies that, if any bands are listed there, all images in the collection do have those named bands. Each image may have more bands than the ones listed. (The bands information is only present in certain simple cases ...


2

The "Smile"-named classifiers in Earth Engine are basically the Smile v1 (we're not yet at Smile v2) classifiers, with the parameter names changed to match existing Earth Engine usage, and a layer around Smile to adapt it to Earth Engine. While we do have some local changes to Smile, they don't affect the basic functionality of training or ...


2

You have your coordinates in the wrong order for Earth Engine. The appropriate order is [East-Coordinate, North-Coordinate]. So it should work by just switching the order of your coordinates.


2

The Issue Functions from the class Export are all client-side functions, that's why your browser begins to struggle. The specific issue you are having, is that you are passing a very complex and big feature collection to the region parameter of Export.image.toDrive(). I don't know what exactly happens behind the scenes but most likely since exporting is a ...


2

The problem is that your addID iteration function, in order to produce its output, is building up an ee.List of every feature in the collection. This will always fail if the collection is too large to fit in memory at once. Unfortunately, I don't know of a way to attach an iteratively computed property to a collection in the way you want. The closest feature ...


2

You need to put the = at the beginning of your expression, like this: var calc = "gfc = (A<=threshold)*((C==1)*50 + (C==0)*30) + " //Non forest calc += "(A>threshold)*(C==1)*(B>0)*51 + " //gain + loss calc += "(A>threshold)*(C==1)*(B==0)*50 + " //gain calc ...


2

The value displayed as a percentage by the inspector is the mask value of the band (multiplied by 100 to make a percentage). If the mask is 1 (100%) the percentage is not displayed; if the mask is 0, the text "masked" is displayed instead. These partial mask values arise even though you're defining your mask with a less-than test because you are ...


2

Image.paint() is unsuitable for this purpose; despite talking about colors, it actually produces "monochrome" results, in that you're specifying only one band value or "luminance". In order to use actual RGB colors per-feature, you need to use FeatureCollection.style() instead, which lets you store colors (in fact, an entire dictionary of ...


2

The way to add EVI to every image in an image collection in Earth Engine is to map() a function over the collection. // First, create function var addEVI = function(image) { var evi = ee.Image(0).expression( '2.5 * ((NIR - RED) / (NIR + 6 * RED - 7.5 * BLUE + 1))', { 'NIR': image.select('NIR'), 'RED': image.select('RED'), 'BLUE': ...


2

The problem with the approach you tried is that image1.add(image2), a math operation on exactly two images, is only defined/unmasked where both input images are unmasked. Also notice that even if it produced pixels wherever either image is unpacked, you'd end up with the sum of 1, 2, or 3 images, always divided by 3, which is not what you want because it's a ...


1

Alright, so your code is a bit unusual for Earth Engine. I would heavily suggest you to do some of the tutorials available. They are pretty good for giving you an overview on how Earth Engine works. Anyway, here's a more straightforward approach to what you want to do: var S2 = ee.ImageCollection('COPERNICUS/S2') .filterBounds(aoi) ...


1

I think the easiest way to do this would be to just use band math: var thematic = brightness_bp8.multiply(ee.Image(100)) .add(greenness_bp8.multiply(ee.Image(10))) .add(wetness_bp8); Good luck with the model!


1

You have a typo - bitwiseAnd not bitewiseAnd


1

Use ee.Image.sample. It creates features out of pixels of an image. var table = image.sample({ region: myRegion, // myRegion should be a geometry, the bounds of the city scale: 50, // how far apart in meters the samples are (approximately; depends on projection) geometries: true, // include the sampled points in export }); Export.table.toDrive(table)...


1

The hour is saved in the property forecast_hour of every Image. You can use this property and .filterMetadata() to filter only those with forecast_hour: 3. Here's the code: var dataset = ee.ImageCollection('NOAA/CFSR') .filter(ee.Filter.date('2019-04-01', '2019-05-31')) .filterMetadata("forecast_hour", "...


1

If I'm understanding your question correctly, the trouble is that you have images that are from the same day (seconds apart) that your code is looking at separately, but you want to look at them together as if they were one image. If that's the case, you can use a function like this: function makeMosaics(image) { var thisImage = ee.Image(image); var date ...


1

You were almost there. Inside the onChange function in ui.Select object, you were setting the center of a new ui.Map object whereas what is being displayed on screen are leftMap and rightMap objects. So change the function to: var select = ui.Select({ items: names.getInfo(), placeholder: ('Choose Area of Interest'), style: {width: '290px'}, onChange: ...


1

This happens to be a matter of pure JavaScript; when you write a function and call it yourself, the Earth Engine API is not involved at all. Here is how to write your function to accept {} named arguments: function get_sum(args) { var value_1 = args.value_1; var value_2 = args.value_2; var Sum = ee.Number(value_1).add(ee.Number(value2)); ...


1

You will need to translate the code into Python, yes. Theoretically, if you have a function that meets the same kind of requirements as a function used in an ImageCollection.map (no prints or other side effects or client-side computation) then it would be possible to ask the Earth Engine API to transform ('encode'/'serialize') it into the form that it would ...


1

On the Earth Engine documentation, it says that "A few cases that require a fixed projection include: Computing gradients (e.g. ee.Terrain.gradient or ee.Terrain.slope) reduceResolution, for when you want to aggregate higher resolution pixels into lower resolution." The problem is that ee.Terrain.slope() doesn't work on computed projections, and ...


1

ui.Select does not change its value when a placeholder text is changed. Therefore, within Reset button while resetting the items (according to me unnecessary) and changing the placeholder text to "Choose a location2..." of the select button, you are not changing the value of select, but merely changing the text that is displayed on the select ...


1

In GEE you can only export single ee.Images and not entire ImageCollections. To get around this, you can use reducers on the ImageCollection. You can for example call .first() or .toBands() on your ImageCollection dataset. Like this: Export.image.toDrive({ image:dataset.toBands(), description: '2015_CLOUDFREE', folder: 'users/emilywest2', ...


1

In general, data must be uploaded to Earth Engine before it can be processed in Earth Engine. So, you must either upload the part you want to use yourself, or you can request that it be added to the Earth Engine Data Catalog. The procedure for making a request is documented here and in this particular case, there is already an outstanding request for VIIRS ...


1

There are two problems in your script. The first is that layer visualization parameters cannot currently contain computed values, so you'll have to explicitly download the computed min and max. The simplest edit of your script to do that would be to replace var BandCompViz = {min:Min, max:Max, palette:...}; with var BandCompViz = {min:Min.getInfo(), max:Max....


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