FeatureCollection – Übersicht
Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Gruppen ähnlicher Features können zu einer FeatureCollection
kombiniert werden, um zusätzliche Vorgänge auf den gesamten Satz anzuwenden, z. B. Filtern, Sortieren und Rendern.
Neben einfachen Elementen (Geometrie + Eigenschaften) können Sammlungen auch andere Sammlungen enthalten.
Der FeatureCollection
-Konstruktor
Eine Möglichkeit, eine FeatureCollection
zu erstellen, besteht darin, dem Konstruktor eine Liste von Funktionen zur Verfügung zu stellen. Die Features müssen nicht denselben Geometriestyp oder dieselben Properties haben. Beispiel:
Code-Editor (JavaScript)
// Make a list of Features.
var features = [
ee.Feature(ee.Geometry.Rectangle(30.01, 59.80, 30.59, 60.15), {name: 'Voronoi'}),
ee.Feature(ee.Geometry.Point(-73.96, 40.781), {name: 'Thiessen'}),
ee.Feature(ee.Geometry.Point(6.4806, 50.8012), {name: 'Dirichlet'})
];
// Create a FeatureCollection from the list and print it.
var fromList = ee.FeatureCollection(features);
print(fromList);
Python einrichten
Auf der Seite
Python-Umgebung finden Sie Informationen zur Python API und zur Verwendung von geemap
für die interaktive Entwicklung.
import ee
import geemap.core as geemap
Colab (Python)
# Make a list of Features.
features = [
ee.Feature(
ee.Geometry.Rectangle(30.01, 59.80, 30.59, 60.15), {'name': 'Voronoi'}
),
ee.Feature(ee.Geometry.Point(-73.96, 40.781), {'name': 'Thiessen'}),
ee.Feature(ee.Geometry.Point(6.4806, 50.8012), {'name': 'Dirichlet'}),
]
# Create a FeatureCollection from the list and print it.
from_list = ee.FeatureCollection(features)
display(from_list)
Einzelne Geometrien können auch in eine FeatureCollection
mit nur einem Feature
umgewandelt werden:
Code-Editor (JavaScript)
// Create a FeatureCollection from a single geometry and print it.
var fromGeom = ee.FeatureCollection(ee.Geometry.Point(16.37, 48.225));
print(fromGeom);
Python einrichten
Auf der Seite
Python-Umgebung finden Sie Informationen zur Python API und zur Verwendung von geemap
für die interaktive Entwicklung.
import ee
import geemap.core as geemap
Colab (Python)
# Create a FeatureCollection from a single geometry and print it.
from_geom = ee.FeatureCollection(ee.Geometry.Point(16.37, 48.225))
display(from_geom)
Tabellendatensätze
In Earth Engine werden verschiedene Tabellendatensätze gehostet. Wenn Sie einen Tabellendatensatz laden möchten, geben Sie dem Konstruktor von FeatureCollection
die Tabellen-ID an. So laden Sie beispielsweise RESOLVE-Daten zu Ökoregionen:
Code-Editor (JavaScript)
var fc = ee.FeatureCollection('RESOLVE/ECOREGIONS/2017');
Map.setCenter(12.17, 20.96, 3);
Map.addLayer(fc, {}, 'ecoregions');
Python einrichten
Auf der Seite
Python-Umgebung finden Sie Informationen zur Python API und zur Verwendung von geemap
für die interaktive Entwicklung.
import ee
import geemap.core as geemap
Colab (Python)
fc = ee.FeatureCollection('RESOLVE/ECOREGIONS/2017')
m = geemap.Map()
m.set_center(12.17, 20.96, 3)
m.add_layer(fc, {}, 'ecoregions')
display(m)
Wie bei Bilddatensätzen können Sie auch nach Tabellendatensätzen im Earth Engine-Datenkatalog suchen.
Zufallsstichproben
So rufen Sie eine Sammlung von Zufallspunkten in einer bestimmten Region ab:
Code-Editor (JavaScript)
// Define an arbitrary region in which to compute random points.
var region = ee.Geometry.Rectangle(-119.224, 34.669, -99.536, 50.064);
// Create 1000 random points in the region.
var randomPoints = ee.FeatureCollection.randomPoints(region);
// Display the points.
Map.centerObject(randomPoints);
Map.addLayer(randomPoints, {}, 'random points');
Python einrichten
Auf der Seite
Python-Umgebung finden Sie Informationen zur Python API und zur Verwendung von geemap
für die interaktive Entwicklung.
import ee
import geemap.core as geemap
Colab (Python)
# Define an arbitrary region in which to compute random points.
region = ee.Geometry.Rectangle(-119.224, 34.669, -99.536, 50.064)
# Create 1000 random points in the region.
random_points = ee.FeatureCollection.randomPoints(region)
# Display the points.
m = geemap.Map()
m.center_object(random_points)
m.add_layer(random_points, {}, 'random points')
display(m)
Sofern nicht anders angegeben, sind die Inhalte dieser Seite unter der Creative Commons Attribution 4.0 License und Codebeispiele unter der Apache 2.0 License lizenziert. Weitere Informationen finden Sie in den Websiterichtlinien von Google Developers. Java ist eine eingetragene Marke von Oracle und/oder seinen Partnern.
Zuletzt aktualisiert: 2025-07-25 (UTC).
[null,null,["Zuletzt aktualisiert: 2025-07-25 (UTC)."],[[["\u003cp\u003e\u003ccode\u003eFeatureCollection\u003c/code\u003es group related features, enabling operations like filtering, sorting, and rendering.\u003c/p\u003e\n"],["\u003cp\u003eYou can create \u003ccode\u003eFeatureCollection\u003c/code\u003es using a list of features, a single geometry, or by loading a table dataset using its ID.\u003c/p\u003e\n"],["\u003cp\u003eEarth Engine provides access to various table datasets, searchable in the Data Catalog.\u003c/p\u003e\n"],["\u003cp\u003eRandom point samples within a specified region can be generated using \u003ccode\u003eee.FeatureCollection.randomPoints()\u003c/code\u003e.\u003c/p\u003e\n"]]],["`FeatureCollection` combines related features, enabling operations like filtering and sorting. You can create one by providing a list of features, even with varied geometries and properties, or from a single geometry. Loading table datasets is done by using the `FeatureCollection` constructor with a table ID. The `randomPoints` method generates random points within a region, and both table data and random points can be displayed.\n"],null,["# FeatureCollection Overview\n\nGroups of related features can be combined into a `FeatureCollection`, to\nenable additional operations on the entire set such as filtering, sorting and rendering.\nBesides just simple features (geometry + properties), feature collections can also contain\nother collections.\n\nThe `FeatureCollection` constructor\n-----------------------------------\n\nOne way to create a `FeatureCollection` is to provide the constructor with\na list of features. The features don't need to have the same geometry type or the same\nproperties. For example:\n\n### Code Editor (JavaScript)\n\n```javascript\n// Make a list of Features.\nvar features = [\n ee.Feature(ee.Geometry.Rectangle(30.01, 59.80, 30.59, 60.15), {name: 'Voronoi'}),\n ee.Feature(ee.Geometry.Point(-73.96, 40.781), {name: 'Thiessen'}),\n ee.Feature(ee.Geometry.Point(6.4806, 50.8012), {name: 'Dirichlet'})\n];\n\n// Create a FeatureCollection from the list and print it.\nvar fromList = ee.FeatureCollection(features);\nprint(fromList);\n```\nPython setup\n\nSee the [Python Environment](/earth-engine/guides/python_install) page for information on the Python API and using\n`geemap` for interactive development. \n\n```python\nimport ee\nimport geemap.core as geemap\n```\n\n### Colab (Python)\n\n```python\n# Make a list of Features.\nfeatures = [\n ee.Feature(\n ee.Geometry.Rectangle(30.01, 59.80, 30.59, 60.15), {'name': 'Voronoi'}\n ),\n ee.Feature(ee.Geometry.Point(-73.96, 40.781), {'name': 'Thiessen'}),\n ee.Feature(ee.Geometry.Point(6.4806, 50.8012), {'name': 'Dirichlet'}),\n]\n\n# Create a FeatureCollection from the list and print it.\nfrom_list = ee.FeatureCollection(features)\ndisplay(from_list)\n```\n\nIndividual geometries can also be turned into a `FeatureCollection` of\njust one `Feature`:\n\n### Code Editor (JavaScript)\n\n```javascript\n// Create a FeatureCollection from a single geometry and print it.\nvar fromGeom = ee.FeatureCollection(ee.Geometry.Point(16.37, 48.225));\nprint(fromGeom);\n```\nPython setup\n\nSee the [Python Environment](/earth-engine/guides/python_install) page for information on the Python API and using\n`geemap` for interactive development. \n\n```python\nimport ee\nimport geemap.core as geemap\n```\n\n### Colab (Python)\n\n```python\n# Create a FeatureCollection from a single geometry and print it.\nfrom_geom = ee.FeatureCollection(ee.Geometry.Point(16.37, 48.225))\ndisplay(from_geom)\n```\n\n### Table Datasets\n\nEarth Engine hosts a variety of table datasets. To load a table dataset, provide the\ntable ID to the `FeatureCollection` constructor. For example, to load\nRESOLVE Ecoregions data:\n\n### Code Editor (JavaScript)\n\n```javascript\nvar fc = ee.FeatureCollection('RESOLVE/ECOREGIONS/2017');\nMap.setCenter(12.17, 20.96, 3);\nMap.addLayer(fc, {}, 'ecoregions');\n```\nPython setup\n\nSee the [Python Environment](/earth-engine/guides/python_install) page for information on the Python API and using\n`geemap` for interactive development. \n\n```python\nimport ee\nimport geemap.core as geemap\n```\n\n### Colab (Python)\n\n```python\nfc = ee.FeatureCollection('RESOLVE/ECOREGIONS/2017')\nm = geemap.Map()\nm.set_center(12.17, 20.96, 3)\nm.add_layer(fc, {}, 'ecoregions')\ndisplay(m)\n```\n\nNote that as with image datasets, you can search for table datasets in the\n[Earth Engine Data Catalog](/earth-engine/datasets).\n\n### Random Samples\n\nTo get a collection of random points in a specified region, you can use:\n\n### Code Editor (JavaScript)\n\n```javascript\n// Define an arbitrary region in which to compute random points.\nvar region = ee.Geometry.Rectangle(-119.224, 34.669, -99.536, 50.064);\n\n// Create 1000 random points in the region.\nvar randomPoints = ee.FeatureCollection.randomPoints(region);\n\n// Display the points.\nMap.centerObject(randomPoints);\nMap.addLayer(randomPoints, {}, 'random points');\n```\nPython setup\n\nSee the [Python Environment](/earth-engine/guides/python_install) page for information on the Python API and using\n`geemap` for interactive development. \n\n```python\nimport ee\nimport geemap.core as geemap\n```\n\n### Colab (Python)\n\n```python\n# Define an arbitrary region in which to compute random points.\nregion = ee.Geometry.Rectangle(-119.224, 34.669, -99.536, 50.064)\n\n# Create 1000 random points in the region.\nrandom_points = ee.FeatureCollection.randomPoints(region)\n\n# Display the points.\nm = geemap.Map()\nm.center_object(random_points)\nm.add_layer(random_points, {}, 'random points')\ndisplay(m)\n```"]]