-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGISdataAttributesAccess.js
More file actions
25 lines (22 loc) · 931 Bytes
/
GISdataAttributesAccess.js
File metadata and controls
25 lines (22 loc) · 931 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// lvb_catchment_areas is a shapefile containing the Lake Victorian Basins. It was downloaded and locally stored in the Google Earth Engine Environmnet.
var table = ee.FeatureCollection('projects/ee-bkibetcheuiyot/assets/lvb_catchment_areas');
// print('Feature names:', table.aggregate_array('NAME'));
// =====================================================
// Saving to excel
// =====================================================
// Aggregate names
var featureNames = table.aggregate_array('NAME');
// Print feature names
print('Feature names:', featureNames);
// Convert feature names to a FeatureCollection
var featureCollection = ee.FeatureCollection(
featureNames.map(function(name) {
return ee.Feature(null, {'Name': name});
})
);
// Export feature collection to CSV
Export.table.toDrive({
collection: featureCollection,
description: 'Lake_Victorian_Basins_to_excel',
fileFormat: 'CSV'
});