ee.FeatureCollection.geometry

Extracts and merges the geometries of a collection. Requires that all the geometries in the collection share the projection and edge interpretation.

UsageReturns
FeatureCollection.geometry(maxError)Geometry
ArgumentTypeDetails
this: collectionFeatureCollectionThe collection whose geometries will be extracted.
maxErrorErrorMargin, optionalAn 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())