Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
2

You can replace the values using where(). // Replace masked pixels by the mean of the previous and next months // (otherwise, how to deal with the first images??) var replacedVals = composites.map(function(image){ var currentDate = ee.Date(image.get('system:time_start')); var meanImage = composites.filterDate( currentDate.advance(-2, '...


2

Just for remember: What is the natural logarithm of a negative number? The natural logarithm function ln(x) is defined only for x>0. So the natural logarithm of a negative number is undefined. Sentinel-1 product has mainly negative values (range -50 to 1), removing .log10(): Also, check Sentinel-1 SAR GRD product description: Each scene was pre-...


2

This could be a GEE bug exporting to MODIS sinusoidal projection, I'm not sure. but, a fast workaround is to export to a different CRS: Export.image.toDrive({ image: vi, description: 'Gondiya_NDVI_30Sept', scale: 250, crs: 'EPSG:4326', region: geometry, fileFormat: 'GeoTIFF', formatOptions: { cloudOptimized: true }, maxPixels: 1e12 }); ...


2

You can refer to the GEE documentation but because it is recent, I don't think that there is any course exist on the Internet. But you can see the video for intro level analysis. Link is given below. https://www.youtube.com/user/TheJosiahcorona


2

In the first graph you have selected only the NDVI band using l5.select('NDVI') While in the second graph you do not do that, and then the band defaults to the first band values. That's why the values differ. Try: //Create a graph of the time-series. var graph = ui.Chart.image.seriesByRegion({ imageCollection: l5.select('NDVI'), regions: col, reducer: ...


2

if you go through the documentation for Sentinel-2 MSI: MultiSpectral Instrument, Level-2A, it will show you that the bands have been scaled. There is scale of each band mentioned but for most of the standard bands that you want to work with it is 0.0001 so if you want red, green and blue bands you can essentially select those bands and rescale them using ...


2

Your example is asking for a client-side operation (+) with inputs that are a client side object (5) and a server-side object (accumNum). Because of this mix, the result concatenates the client side object and the definition of server-side object (i.e. the part starting with ee.Number) Instead, you can specify that the computation is done server-side by ...


2

GEE doesn't have a specific algorithm to atmospherically correct scenes, just Cloud Score in Landsat case. Instead to trying to correct images, use Surface Reflectance products: USGS Landsat 8 Surface Reflectance Tier 1 This dataset is the atmospherically corrected surface reflectance from the Landsat 8 OLI/TIRS sensors. These images contain 5 ...


2

There is a little difference between you JS code and you python code, and that is where your code "breaks". This is your JS: var res = smap.map(function(image) { var reduced = image.reduceRegion({geometry: geom, reducer: ee.Reducer.mean(), crs: 'EPSG:4326', ...


2

Adding snic.reproject to the first part of the code solves the problem: seeds = ee.Algorithms.Image.Segmentation.seedGrid(18) #36 snic = ee.Algorithms.Image.Segmentation.SNIC(image= image, size= 32, #32 compactness= 5, #5 connectivity= 8, #8 neighborhoodSize=15, #2 seeds= seeds ).select(["B2_mean","B3_mean","B4_mean","B8_mean", '...


1

Without knowing how your actual asset image looks like, I think you mean that all 'NULL' values are actually masked pixels? If your first operation on those asset image will be: var newImage = ee.Image('ASSSET_ID').unmask(0); All the masked pixels will have a value and thus will be used in the "and()" operation.


1

You've got the right general idea — you should bundle all the results you want into one ComputedValue and evaluate that. To simplify and improve your code so far, you can delete .toString().split(","). The result is already a JavaScript array so doing this is at best redundant and at worst corrupts the data (e.g. if one of the values is a string containing a ...


1

map() function is for ImageCollection object. Computing median, you're converting ImageCollection object in Image object, thas why doesn't work your code. Try this: // Creating a buffer around my region of interest var buffer = ee.Geometry.Point([103.83841283715412,1.3736828122619071]).buffer(10000); Map.centerObject(buffer, 12); // Load Landsat 8 surface ...


1

If you don't want any excecution to occur when there is no state at the point, you can probably best first evaluate the size of the collection after the filterBounds(). Running .size() on the collection return 0 if there was no state. Evaluating that number to the client-side enables to run a client-side IF statement similar as you did for the name of the ...


1

You are getting the error because you have to specify a list for crsTransform instead of a string. However, as the MODIS images are on a 500m scale, I would recommend to set the scale at 500 (meter) and you reducer output should do fine. You can make an image of NDVI greater than 0.3 and 0.5 using ee.Image().gt() and then apply selfMask to mask all pixels ...


1

The "empty" image contains QA bands that are completely masked out. You can avoid the empty sample by first selecting the bands that have valid data. For example: var training_empty = image_empty .select([ 'B1', 'B2', 'B3', 'B4', 'B5', 'B6', 'B7', 'B8', 'B8A', 'B9', 'B10', 'B11', 'B12', // 'QA10', ...


1

There may be many ways to do that, but when I had to do it I did: var maskInside = function(image, geometry) { var mask = ee.Image.constant(1).clip(geometry).mask().not() return image.updateMask(mask) } And put that function in a package (geetools for the code editor) that you can use in this way: var tools = require('users/fitoprincipe/geetools:tools'...


1

This is the high-resolution satellite basemap, the same layer as in Google Maps. You can use it visually, but not perform any raster calculations on the pixel values. If you just want to check the images visually, you can load you Points data to Google Earth (e.g. as a KML), in which you can select the Google satellite basemap of multiple years with a slider....


1

To directly answer your question, you can "align" the geometry of the pixels of multiple images by using ee.Image.reproject() and ee.Image.resample() and mapping those functions over images in the collection. However, be aware that this will potentially alter/smooth the information provided in each of the original images. (Your example is for a high latitude ...


1

You can use this: // Create a Google Maps Drawing Manager for drawing polygons. drawingManager = new google.maps.drawing.DrawingManager({ drawingMode: google.maps.drawing.OverlayType.POLYGON, drawingControl: false, polygonOptions: { fillColor: '#ff0000', strokeColor: '#ff0000' } }); There's an official demo of polygon drawing in GEE


1

Normally, when a function is applied, the result lost its properties. The solution is to copy image properties to the new file. In this case, system:time_start: var fill = function(image){ var filled1a = image.focal_mean(2, 'square', 'pixels', 1).blend(image); return filled1a.set('system:time_start',image.get('system:...


1

You possibly did swap around your lattitudes and longitudes while preprocessing the table. Here is how to swap around the lattitude and longitude and add the points to the map: // load table var table = ee.FeatureCollection("users/prachisingh220/exp"); // swap around the lattitude and longitude table = table.map(function(feat){ var lat = feat.get('...


1

The issue here is that you are trying to access server side values as client side values. Processes in GEE are just stacked invocations in client side until a client request something from the server. So, the shapefile that you uploaded will be on server and not in client which needs to be accessed through the APIs that GEE provides. ee.FeatureCollection....


1

The 'b' images do not have the property "id". Look up the collection when printing to check which property they have, and you can use the filter on that: var dataset = ee.ImageCollection('USDA/NASS/CDL') .filter(ee.Filter.date('2002-12-31', '2018-12-31')) // This filter doesn't work. .filter(ee.Filter.eq("system:...


1

[Crossposted from GEE listserv] I'm hoping this gets you most of the way. It's a simplified example, but you should be able to adapt it to your needs. https://code.earthengine.google.com/fcbcac0848801de487cb892daf8a2f99 This example does the following: Creates a dummy feature collection that has four records for DOYs 1-4 and two coefficients (B_0 and ...


1

Well, your code is on the right track but it is not working because it is not complete yet. So far what you have done is to select the required band and the required images from the whole archive limiting your scenes of interest to those between 1990 and 2015 end. The remaining things are to select all images throughout the years (1990 to 2015) on same ...


1

Earth Engine scripts owned by user accounts are browsable online at https://earthengine.googlesource.com/users/USERNAME/ (if the account used to view the page has sufficient permissions to view the repository). The scripts are stored in a Git repository can be cloned and manipulated similarly to other Git repositories. git clone https://earthengine....


1

Yes it is possible. You have to edit the existing fusion table with your coordinates and replace arithmetic mean with the precipitation values.


1

Based on the sample (reproduced below) at https://developers.google.com/earth-engine/resample - I think that the following code should work where your existing reduceNeighborhood code is: var image_frac=CDL_2015.eq(2).reduceResolution({ reducer: ee.Reducer.mean(), maxPixels: 4096, // something large enough to not cause it to error out }).reproject(...


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