4 votes
Accepted

Add feature id as a feature property in Google Earth Engine

system:index is itself a property; in principle, you don't need to add another one, just to ask for it. var collection = ee.FeatureCollection([ ee.Feature(null, {'foo': 'a'}), ee.Feature(null, {'...
user avatar
  • 8,726
4 votes
Accepted

Converting a FeatureCollection to an ImageCollection

This is due to the client/server split of Earth Engine. The Earth Engine servers know that if you map() a feature collection and each result feature is an image, then the result collection can be an ...
user avatar
  • 8,726
4 votes
Accepted

Count # of consecutive days without rain before an active fire

Iterate() is almost never the right tool to reach for in Earth Engine. In this case you can get the number of days by converting the time series to an array and doing some simple array masking to ...
user avatar
3 votes
Accepted

Convert a feature collection to image collection

If I understand correctly, the code below could help: var properties = FCburn.first().propertyNames().sort().slice(0, -3) var col = ee.ImageCollection(properties.map(function(property) { return ...
user avatar
  • 511
2 votes

Enrich a featurecollection with more data

You will have to choose an elevation image (e.g. the SRTM), and apply reduceRegions with the vectors as input feature collection. var SRTM = ee.Image("USGS/SRTMGL1_003"); // exampleelevation image //...
user avatar
  • 9,298
2 votes
Accepted

Select only the feature that overlapses its correspondant in another layer - Leaflet, qgis2web

Since GeoJSON layer is actually a group layer consisting of individual layers representing features, it's possible to add individual feature layer to the map, it just has to be identified by some id. ...
user avatar
  • 16.9k
2 votes
Accepted

Creating FeatureCollection with values stored in an Array on Google Earth Engine?

Maybe you're looking for something like this? var media_clusters = ee.FeatureCollection(media_p .map(function (dict, i) { return ee.Feature(null, dict) // return ee.Feature(poly[i]....
user avatar
  • 9,635
2 votes
Accepted

Earth Engine: Mapping over a feature collection of ROIs

Your reason L7coll fails to display on the map is that it's an ee.FeatureCollection where each feature is an ee.ImageCollection. I'm guessing you wanted an ee.ImageCollection with images. myfunc() ...
user avatar
  • 9,635
2 votes
Accepted

Error in exporting table from Python API service account-- Asset does not exist or doesn't allow this operation

Because you are authenticated with a service account, you cannot export assets to a personal account. You need to authenticate with your personal account.
user avatar
2 votes
Accepted

How to change property of features in a FeatureCollection where there is overlapping?

Here's a couple ways to do it; I'm not sure which one would be best for large collections. Probably the second one, but I haven't tested their performance. We can, for each feature, look for an ...
user avatar
  • 8,726
2 votes

Dissolving overlapping polygons in Google Earth Engine

I think I found a solution based on this past post. Full code: //Create demo data////////////////////////////////////// var region = ee.Geometry.Rectangle(-120, 34.669, -99.536, 50.064); // Create ...
user avatar
  • 353
2 votes
Accepted

ee.Feature extraction from ee.FeatureCollection by Feature index

Given that your table contains only two features, using a list is a good way to extract the individual features, and quite efficient. var myAssetList = myAsset.toList(10); // number must be at least ...
user avatar
  • 8,726
2 votes

Dissolve FeatureCollection using attribute

You can use a .distinct() and ee.Join.saveAll(). It's a bit wordy, but it will be efficient for large collections, compared to other options. var collection = ee.FeatureCollection([ ee.Feature(ee....
user avatar
  • 8,726
2 votes
Accepted

GEE Download data around buffers on multiplie points, adding coordinates of each point to table

Following code prints in your csv table the coordinates of centroids as centroid_x, centroid_y (one column for each coordinate). I hope this helps. // set of points var pointList= ee.List( [[-...
user avatar
  • 26.2k
2 votes
Accepted

FeatureCollection feature.byFeature histogram or column chart bucket size

It's not quite clear if you want two histograms or some kind of a 2D/3D chart. But based on the rest of the question, I think the fixed2DHistogram reducer might be able to produce the values you want. ...
user avatar
2 votes
Accepted

How can I extract each value of a column from a Feature Collection and append it to a new list in Google Earth Engine?

Try calling .aggregate_array('property'), this returns an array of values of the selected property. See also ee.FeatureCollection.aggregate_array
user avatar
  • 683
2 votes
Accepted

Properties and columns difference in GEE feature collections

First, it's important to understand that a feature collection is, itself, a sort of feature — or in the lesser-known terminology of the API, an “element”. Thus, like any other feature (or an image or ...
user avatar
  • 8,726
2 votes
Accepted

Zonal statistics with feature collection column (Google Earth Engine)

There are several options, but the most efficient will be to use a grouped reducer (there are detailed examples in the User's Guide at https://developers.google.com/earth-engine/guides/...
user avatar
2 votes
Accepted

Feature collection to binary image results in single value image in Google Earth Engine

You wrote HND0.where({test:PAs1, value:PAs1}). where replaces pixels in an image wherever the test image's value is nonzero. But PAs1 is always zero (or masked). To get a useful result, you can use ...
user avatar
  • 8,726
2 votes
Accepted

Sampling areas based on water mask using Google Earth Engine

The docs for sample() explicitly state: Note that the default behavior is to drop features that intersect masked pixels, which result in null-valued properties. Even though you've only got 1 class, ...
user avatar
2 votes
Accepted

Creating multi-ring buffers (donuts) on a feature collection GEE

If it can be done in a Feature, it can also be done in each Feature inside a FeatureCollection using the map function. ////A function to add buffer rings to the refugee sites, recommended buffer size ...
user avatar
2 votes
Accepted

Select features in feature collection where two properties are equal in Google Earth Engine (GEE)

Comparing field to field, you use the leftField, rightField arguments in ee.Filter.equals. (Also, you should basically never use filterMetadata) data.filter(ee.Filter.equals({leftField: 'Field1date', ...
user avatar
2 votes
Accepted

How to get Feature Collection from PostGIS with GeoAlchemy?

You can do it using the following import json myfeatures = [('{"type": "Feature", "geometry": {"type":"Point","coordinates":[-4.259949,55....
user avatar
  • 28.7k
2 votes

Generating feature collection from image band statistics

You're removing all features where count is null, however there is no count property in your output, because the reducer produces properties with the same name as the bands. Removing that filter, you ...
user avatar
2 votes
Accepted

Get list mapped over featureCollection for multiple regions

You are trying to perform a GEE server-side operation on a Python list object, which is not possible. Try making an ee.List from it first: multiStateList = ee.List([1960,1961,1955])
user avatar
  • 7,291
1 vote

Display points from CSV table (feature collection) in Google Earth Engine

When I print your asset to the console, it looks like the latitude/longitude values have not transferred to coordinates. Instead each feature in the collection has properties labeled latitude and ...
user avatar
  • 124
1 vote

Feature property uploads as null- Google Earth Engine

Issue is probably due to inappropriate upload of CSV file to your assets. In following image of your table, it can be observed there are not coordinates for whatever feature. In my case, however, ...
user avatar
  • 26.2k
1 vote
Accepted

Feature property uploads as null- Google Earth Engine

The property name seems to have a U+FEFF "Byte Order Mark" at the beginning of it, which is an invisible character some programs insert at the beginning of files (even though it really only ...
user avatar
  • 8,726
1 vote

Select points outside of polygon in Google Earth Engine

var filtered = dataset1.filter(ee.Filter.bounds(eu).not())
user avatar
  • 908
1 vote
Accepted

GEE: Indexing a List of Lists inside a property of a FeatureCollection

I believe that what you want is this: ltPoints.toList(ltPoints.size()) .map(function(feature){ return ee.Feature(feature).getArray('LandTrendr').get([3,-2]) })
user avatar
  • 578

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