Extracts and merges the geometries of a collection. Requires that all the geometries in the collection share the projection and edge interpretation.
Usage | Returns | FeatureCollection.geometry(maxError) | Geometry |
Argument | Type | Details | this: collection | FeatureCollection | The collection whose geometries will be extracted. |
maxError | ErrorMargin, optional | An error margin to use when merging geometries. |
Examples
Code Editor (JavaScript)
// FeatureCollection of power plants in Belgium.
var fc = ee.FeatureCollection('WRI/GPPD/power_plants')
.filter('country_lg == "Belgium"');
print("Point FeatureCollection's geometry", fc.geometry());
Python setup
See the
Python Environment page for information on the Python API and using
geemap
for interactive development.
import ee
import geemap.core as geemap
Colab (Python)
from pprint import pprint
# FeatureCollection of power plants in Belgium.
fc = ee.FeatureCollection('WRI/GPPD/power_plants').filter(
'country_lg == "Belgium"')
print("Point FeatureCollection's geometry:")
pprint(fc.geometry().getInfo())