ee.FeatureCollection.geometry

  • The geometry() method extracts and merges the geometries of a collection, requiring all geometries to share the same projection and edge interpretation.

  • Using a large or complex collection can negatively impact performance.

  • For just a bounding box of the collection, consider using Collection.bounds instead of 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)

# FeatureCollection of power plants in Belgium.
fc = ee.FeatureCollection('WRI/GPPD/power_plants').filter(
    'country_lg == "Belgium"')

display("Point FeatureCollection's geometry:", fc.geometry())