Skip to main content
English usage
Source Link
Vince
  • 20.3k
  • 16
  • 48
  • 65

how How to get FeatureCollection column names?

I'm using a FeatureCollection and I would like to discover the column names as a ee.List. lookingLooking at the documentation, I only find ways to reduce them but you need to know their names.

forFor example from  :

var collection = ee.FeatureCollection([
  ee.Feature(ee.Geometry.Point(77.58, 13), {date:'2020-10-02', count:1, x:1}),
  ee.Feature(ee.Geometry.Point(77.58, 13), {date:'2020-10-04', count:1, x:1}),
  ee.Feature(ee.Geometry.Point(77.58, 13), {date:'2020-10-02', count:3, x:0}),
  ee.Feature(ee.Geometry.Point(77.58, 13), {date:'2020-10-01', count:2, x:0})
]);

I would like to extract

ee.List(["system:index", "date", "count", "x"])

how to get FeatureCollection column names?

I'm using a FeatureCollection and I would like to discover the column names as a ee.List. looking at the documentation I only find ways to reduce them but you need to know their names.

for example from  :

var collection = ee.FeatureCollection([
  ee.Feature(ee.Geometry.Point(77.58, 13), {date:'2020-10-02', count:1, x:1}),
  ee.Feature(ee.Geometry.Point(77.58, 13), {date:'2020-10-04', count:1, x:1}),
  ee.Feature(ee.Geometry.Point(77.58, 13), {date:'2020-10-02', count:3, x:0}),
  ee.Feature(ee.Geometry.Point(77.58, 13), {date:'2020-10-01', count:2, x:0})
]);

I would like to extract

ee.List(["system:index", "date", "count", "x"])

How to get FeatureCollection column names

I'm using a FeatureCollection and I would like to discover the column names as a ee.List. Looking at the documentation, I only find ways to reduce them but you need to know their names.

For example from:

var collection = ee.FeatureCollection([
  ee.Feature(ee.Geometry.Point(77.58, 13), {date:'2020-10-02', count:1, x:1}),
  ee.Feature(ee.Geometry.Point(77.58, 13), {date:'2020-10-04', count:1, x:1}),
  ee.Feature(ee.Geometry.Point(77.58, 13), {date:'2020-10-02', count:3, x:0}),
  ee.Feature(ee.Geometry.Point(77.58, 13), {date:'2020-10-01', count:2, x:0})
]);

I would like to extract

ee.List(["system:index", "date", "count", "x"])
Source Link

how to get FeatureCollection column names?

I'm using a FeatureCollection and I would like to discover the column names as a ee.List. looking at the documentation I only find ways to reduce them but you need to know their names.

for example from :

var collection = ee.FeatureCollection([
  ee.Feature(ee.Geometry.Point(77.58, 13), {date:'2020-10-02', count:1, x:1}),
  ee.Feature(ee.Geometry.Point(77.58, 13), {date:'2020-10-04', count:1, x:1}),
  ee.Feature(ee.Geometry.Point(77.58, 13), {date:'2020-10-02', count:3, x:0}),
  ee.Feature(ee.Geometry.Point(77.58, 13), {date:'2020-10-01', count:2, x:0})
]);

I would like to extract

ee.List(["system:index", "date", "count", "x"])