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, {'...
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 ...
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 ...
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 ...
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
//...
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.
...
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]....
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() ...
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.
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 ...
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 ...
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 ...
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....
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(
[[-...
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. ...
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
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 ...
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/...
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 ...
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, ...
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 ...
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', ...
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....
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 ...
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])
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 ...
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, ...
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 ...
1
vote
Select points outside of polygon in Google Earth Engine
var filtered = dataset1.filter(ee.Filter.bounds(eu).not())
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])
})
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
feature-collection × 77google-earth-engine × 70
google-earth-engine-javascript-api × 14
javascript × 5
geometry × 5
export × 5
image × 5
list × 4
google-earth-engine-python-api × 4
csv × 3
modis × 3
landsat × 3
centroids × 3
reducers × 3
python × 2
shapefile × 2
geojson × 2
point × 2
spatial-join × 2
features × 2
ndvi × 2
table × 2
dissolve × 2
masking × 2
time-series × 2