FeatureCollection Information and Metadata

Methods for getting information from image collections are directly applicable to feature collections. (See the ImageCollection Information and Metadata section for details). You can use the aggregation shortcuts to count the number of features or summarize an attribute:

// Load watersheds from a Fusion Table.
var sheds = ee.FeatureCollection('ft:1IXfrLpTHX4dtdj1LcNXjJADBB-d93rkdJ9acSEWK');

// Display the table and print its first element.
Map.addLayer(sheds, {}, 'watersheds');

// Print the number of watersheds.
print('Count: ', sheds.size());

// Print stats for an area property.
print('Area stats:', sheds.aggregate_stats('AreaSqKm'));

For more general purpose FeatureCollection aggregation tools, see the Reducing a FeatureCollection page.

Enviar comentarios sobre…

Google Earth Engine API