Questions tagged [google-earth-engine]

Google's cloud computing platform for geospatial data & analysis at earthengine.google.com.

Filter by
Sorted by
Tagged with
2
votes
1answer
2k views

exporting table in to a drive from Google earth engine returns blank rows

I am trying to find the mean precipitation of a watershed. When I print the feature collection BasinMean, I can see the mean precipitation in the console. A lot of them are zeros but the first two ...
2
votes
1answer
638 views

Reprojecting with Google Earth Engine?

Link to GEEScript var L8 = L8.filterBounds(geometry).first() Map.addLayer(L8,{max:3000},'Before Reprojection') var proj = ee.Projection('EPSG:4326').getInfo() var L8r = L8.reproject(proj.crs,proj....
1
vote
1answer
202 views

Getting weekly mean composite in Google Earth Engine?

I am currently working on a time-series in Google Earth Engine. Iam still quite inexperienced, especially when it comes to functions. I want to extract the mean values of Sentinel1-images for each ...
1
vote
1answer
790 views

Reclassifying NDWI using Google Earth Engine?

I'm trying to reclassify a NDWI raster into 1 for values >0.4 and 0 for <0.4. I understand that its possible to use .remap in case of discrete values, but not sure how to reclassify NDWI raster ...
1
vote
1answer
172 views

Masking out shadows in Sentinel images using Google Earth Engine?

This question is an addition to this answer to Creating Sentinel-2 cloud free, cloud-shadow free composite or scene on Google Earth Engine (GEE)? There Rodrigo E. Principe showed how to mask out the ...
1
vote
1answer
1k views

GEE: How to transform masked values (NODATA) to -9999?

How can I transform NoData (masked) values to a value? When the image is mapped, there are a lot of values that are masked and I would like to get a value (-9999) on that masked pixels. var region = ...
1
vote
1answer
98 views

Computing volumetric precipitation in Earth Engine [closed]

I am attempting to calculate volumetric precipitation (km^3) over a region in California, but the values seem too high to be plausible. The data suggests an average of 12 cm of precipitation for every ...
1
vote
2answers
2k views

Getting List elements from .reduceRegion() results in Google Earth Engine?

I have a FeatureCollection that I am using .reduceRegions() over the Hansen Forest Loss dataset using ee.Reducer.fixedHistogram() to get the count of pixels per year/per feature. The result is a ...
1
vote
1answer
230 views

How can one create a binary image from a FeatureCollection in Google Earth Engine?

I have been trying to find a solution for this for quite some time now based on ee.FeatureCollection.reduceToImage, but I don't seem to be able to find it... Suppose you have a region of interest ...
1
vote
1answer
39 views

What is the fastest/proper way to see if a FeatureCollection contains no Features

Take this code example, where mylabel is a ui.Label: var mypt = ee.FeatureCollection(ee.Geometry.Point(Map.getCenter().coordinates())); var states = ee.FeatureCollection('TIGER/2016/States'); var ...
1
vote
2answers
694 views

Using cloud confidence to create cloud mask from Landsat 8 BQA?

I want to use the Landsat BQA (TOA images) to create a cloud mask in GEE. In particular I want to mask out all areas where there is high confidence that cloud cover is present. I have tried to adapt ...
1
vote
1answer
322 views

Calculating cost distance in Google Earth Engine?

I need to calculate cost distance for each cell in my raster (bounding box: Sumatera island) to points (palm oil mills), with slope as its cost. The cost layer (slope) has float data type (val: 0-90), ...
1
vote
1answer
68 views

Missing values when calculating mean

I have uploaded a table containing information on river basins within countries (https://code.earthengine.google.com/?asset=users/basins/TFDD_BCU). I want to calculate the mean population density in ...
1
vote
1answer
60 views

Seeking Function to calculate red-edgeNDVI in Google Earth Engine?

I am trying to calculate the red-edgeNDVI ((NIR – red edge)/(NIR + red edge)) of an Image.Collection in Google Earth Engine. There is a built in function for NDVI but not for red-edge NDVI. The code I ...
1
vote
1answer
61 views

Export image to drive eror

I have a classified image that is roughly 400 KB and every time export the image to Google Drive it's roughly 300 KB as a cropped image. Strangely, the first time I exported to drive the image was ...
1
vote
2answers
200 views

I have NDVI layer in Earth Engine. I want to assign and calculate area of good and bad ndvi area

var mergedCollection = s2.map(function(image) { return image.select(['B8', 'B4'], ['NIR', 'red']) }) var mergedAllFunction = function(image) { var ndvi = image.normalizedDifference(['...
1
vote
1answer
48 views

Calculating CIredEdge from Sentinel 2 composite image and adding as Band in Google Earth Explorer?

This is a follow-up question to Seeking Function to calculate red-edgeNDVI in Google Earth Engine? I’ve added the redEdgeNDVI band to the image collection by mapping the function over the collection ...
1
vote
1answer
677 views

Cloud cover percentage in Google Earth Engine

I'm doing a project at my university about the Cloud cover percentage in determinate areas in the world. I'm completely new to Google Earth Engine and I'm struggling a lot trying to find a solution ...
1
vote
1answer
370 views

Earth Engine mismatched type for band

I'm trying to calculate the average Julian day of year for greenness decrease from the MODIS MCD12Q2 dataset. Following is the code and error, which comes from having to normalize the julian day ...
1
vote
1answer
285 views

Extracting qualified image patches in Google Earth Engine?

I want to extract qualified (e.g., cloud-free) image patches (e.g. size of 128x128) in a large image (e.g. 10000x10000) in Google Earth Engine. These image patches can overlap with other qualified ...
1
vote
1answer
1k views

Combine two collections (MOD13Q1 and MYD13Q1) from Google Earth Engine

Need to combine two image NDVI collections (MOD13Q1 and MYD13Q1) in Google Earth Engine but don't know how to proceed. My proposed workflow is to combine the two NDVI products from two collections to ...
1
vote
1answer
115 views

Converting Raster to Vector, Google Earth Engine,

By running the code, one obtains: FeatureCollection (Error) Image.reduceToVectors: First band ('x') of image must be integral. I don´t understand this error. My goal is to convert the pixel values ...
1
vote
1answer
248 views

Error -Collection query aborted after accumulating over 5000 elements

I have created a code that suppose to take sentinel images and calculate the NDVI for a speficif polygon I have. I need it to run it for 2 years, but I have realized that for some reason the dataset ...
1
vote
2answers
897 views

How to import handdrawn polygon using json file in earthengine

Is there any way to import a data, say handdrawn polygons (saved as coordinates) as json or text files? I have hard time reading a file into the code editor, even ones created locally, as the code ...
1
vote
1answer
2k views

google earth engine: access ImageCollection features list?

the console gives me a view into the 'properties' of the ImageCollection object: ImageCollection LANDSAT/LC08/C01/T1_SR (107 elements) type: ImageCollection id: LANDSAT/LC08/C01/T1_SR version: ...
1
vote
1answer
90 views

Two Different Areas for the same Image in Google Earth Engine

IMPORTS: var polygon = /* color: #d63000 */ee.Geometry.Polygon( [[[-119.33364769821117, 46.05123532178373], [-119.3233620672313, 45.869732769408905], [-119.04111088542663, ...
1
vote
0answers
536 views

Aggregating image information over two features in Google Earth Engine?

As per Iterating over years for features in feature collection using Google Earth Engine?, I am currently working with the Hansen data (Global Forest Change) in Earth Engine. I have imported two ...
0
votes
1answer
260 views

Creating a time-series from an image-collection in GEE including null-values in case all pixels are masked

I want to create a time-series from an image-collection resulting in a list with the time-series values. It could be however, that some of the images in the collection are completely masked (i.e. have ...
0
votes
1answer
95 views

Getting 16 days composite in Google Earth Engine? [closed]

I've wrote this code. In this code I've call lst daily product. But I don't know how can I compute 16 days mean composite from daily product? code link: https://code.earthengine.google.com/...
0
votes
0answers
38 views

LSIB feature does not align with island boundary in Google Earth Engine?

It looks like there is an alignment issue that arises in EarthEngine with the LSIB polygons. It exists for Greenland in both the Detailed LSIB 2013 and Simple LSIB 2017 datasets, and can be verified ...
0
votes
1answer
47 views

Converting .map() from JavaScript API to Python API?

I wrote this code using the Earth Engine JavaScript API. The code clips the image collection using variable "table," which is a feature collection of about 12,000 points. I get the length of the image ...
0
votes
1answer
413 views

How can ee.Image.stratifiedSample() be used in Google Earth Engine to select training samples for a binary classifier?

This is a follow-on question to How can one create a binary image from a FeatureCollection in Google Earth Engine? The corresponding minimal example can be found here: https://code.earthengine.google....
0
votes
1answer
233 views

Cannot add an object of type object as a layer

I keep getting the error: Cannot add an object of type object as a layer. It is regarding line 53 of the link below (code is also copied below, error: Map.addLayer(CF_solar, CF_solar, "CF_solar")). I ...
0
votes
1answer
138 views

Export pixel neighborhood in Google Earth Engine [closed]

I have some points and know how to extract the Landsat data at these points and build and export a training dataset to feed an external classifier. But how can I efficiently and automatically build a ...
0
votes
1answer
143 views

“print()” alternative for nodeJS

i need run this code in my nodeJS application: //Dates of Interest var start = ee.Date("2014-10-01"); var finish = ee.Date("2018-05-01"); ///--------------------- Landsat Collection -----------------...
0
votes
1answer
3k views

Calculating areas of different classes in Google Earth Engine?

I am attempting to calculate the area of 5 different classes in my classified map. GEE tutorials showed me a method (https://developers.google.com/earth-engine/tutorial_forest_03#calculating-pixel-...
0
votes
0answers
41 views

Function takes too long to run (over 72 hours)

I have an errorless code, which works for 3 days of daily data. however I wish to use it for 6000 days. It has not stopped running (we are on hour 75) There are two if statements inside a function ...
0
votes
1answer
57 views

How to create an array of repeated values on the client side using JavaScript in Google Earth Engine?

I want to do something like: var from = [2,3] var to = Array(from.length).fill(1) image.remap(from,to,0) Of course, I could just assign [1,1] to to, but from is an input of a function and it is not ...
0
votes
2answers
683 views

How to export a feature collection of feature collections in Google Earth Engine?

I have extracted NDVI values from Landsat 8 images to a shapefile of points 90 meters apart. I am trying to get these point files back into ArcGIS and R, but they are too big to print to the console. ...
0
votes
1answer
37 views

Exporting rasters in GCS in Google Earth Engine

I have a raster that covers an entire country with the base data having a 0.05° resolution. The country spans two UTM zones, so I am reluctant to reproject the file to a projected coordinate system. ...
0
votes
1answer
219 views

Plot areas by class in a polygon with Google Earth Engine

I would like to plot the number of pixels or the area for each class contained in a polygon (shape of a country). I have found the ui.Chart.image.byClass function but I don't understand how to use it ...
0
votes
1answer
170 views

In Google Earth Engine, can I export a layer with visual parameters added to a GeoTIFF?

I am trying to get a LandSAT-8 image of the certain region with cloud cover 2. I am using some visual parameters and adding my layer. I want to export this layer to GeoTIFF but at the moment I am ...
0
votes
1answer
61 views

How to get several property values at once so there is only one call to .`evaluate`

I have a large FeatureCollection (100,000+ polygons) and want to get several values from it at once to display in a ui.Label with only one call to .evaluate. I have found the following way to do it ...
0
votes
1answer
239 views

Creating multilayered classification map on Google Earth Engine?

I've been working on a classification scheme, and have 6 different classes i wish to map. Everything has been already done in terms of finding the classifications. the only thing I am struggling on ...
0
votes
0answers
44 views

Name points inside a feature made with Geometry.MultiPoint

i am trying to name the points inside a feature build with a ee. Geometry.MultiPoint function as shown in the image. This points are alredy named in the imports place. But to build this feature a used ...
0
votes
1answer
153 views

Error on GEE: No features contain non-null values of “system:time_start”

I'm calculating DVI over a region using MODIS. I am able to get the printout of the map properly but not the chart to retrieve the data. To calculate DVI, I did: var dvi = img.expression( '(nir - ...
0
votes
1answer
1k views

Earth engine error: Error: Invalid argument: 'image' must be of type Image

I'm trying to export an image for some SST temperatures for a given region ( and imported table EEZ) but I'm getting the error; Error: Invalid argument: 'image' must be of type Image Map.addLayer(...
0
votes
1answer
163 views

Exporting images in native CRS and resolution

When I use “Export.image.toDrive” command in Google Earth Engine it requests to define the scale and CRS of the raster. I did a search, but could not find clear solution for it. Is there any ...
0
votes
1answer
34 views

Split list by chunks Earth Engine with mean

I am calculating mean temperature data based on historical data. I need to calculate the mean through the years (jan-jan-jan-jan...) and the means within a year (jan-feb-mar-may-jun...). This is ...
0
votes
0answers
20 views

Landsat mosaic with minimum cloud cover over an area of interest

I'd like to create a mosaic with minimum cloud cover over an area of interest. I have done this by using the sort function to return the image with minimum 'CLOUD_COVER' value and am happy with the ...