Ankündigung: Alle nicht kommerziellen Projekte, die vor dem
15. April 2025 für die Nutzung von Earth Engine registriert wurden, müssen
die Berechtigung zur nicht kommerziellen Nutzung bestätigen, um den Zugriff aufrechtzuerhalten. Wenn Sie Ihren Status nicht bis zum 26. September 2025 bestätigen, wird Ihr Zugriff möglicherweise eingeschränkt.
ee.FeatureCollection.copyProperties
Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Kopiert Metadateneigenschaften von einem Element in ein anderes.
| Nutzung | Ausgabe |
|---|
FeatureCollection.copyProperties(source, properties, exclude) | Element |
| Argument | Typ | Details |
|---|
So gehts: destination | Element, Standard: null | Das Objekt, dessen Eigenschaften überschrieben werden sollen. |
source | Element, Standard: null | Das Objekt, aus dem die Eigenschaften kopiert werden sollen. |
properties | Liste, Standard: null | Die zu kopierenden Eigenschaften. Wenn sie weggelassen werden, werden alle normalen (d.h. nicht systembezogenen) Attribute kopiert. |
exclude | Liste, Standard: null | Die Liste der Properties, die beim Kopieren aller Properties ausgeschlossen werden sollen. Darf nicht angegeben werden, wenn „properties“ angegeben ist. |
Beispiele
Code-Editor (JavaScript)
// Import a Landsat 8 surface reflectance image to sample.
var image = ee.Image('LANDSAT/LC08/C02/T1_L2/LC08_038032_20170722')
// Select the optical bands.
.select(['SR_B.']);
// Get the image geometry to define the geographical bounds of the sample.
var imageBounds = image.geometry();
// Sample the image at a set of random points; a feature collection is returned.
var pointSampleFc = image.sample(
{region: imageBounds, scale: 30, numPixels: 5, geometries: true});
// Copy image properties to the FeatureCollection; three options follow.
print('All non-system image properties copied to the FeatureCollection',
pointSampleFc.copyProperties(image));
print('Selected image properties copied to the FeatureCollection',
pointSampleFc.copyProperties({
source: image,
properties: ['system:time_start', 'SPACECRAFT_ID']
}));
print('All but selected image properties copied to the FeatureCollection',
pointSampleFc.copyProperties({
source: image,
exclude: ['TIRS_SSM_MODEL', 'TIRS_SSM_POSITION_STATUS']
}));
Python einrichten
Informationen zur Python API und zur Verwendung von geemap für die interaktive Entwicklung finden Sie auf der Seite
Python-Umgebung.
import ee
import geemap.core as geemap
Colab (Python)
# Import a Landsat 8 surface reflectance image to sample.
image = ee.Image('LANDSAT/LC08/C02/T1_L2/LC08_038032_20170722').select(
# Select the optical bands.
['SR_B.'])
# Get the image geometry to define the geographical bounds of the sample.
image_bounds = image.geometry()
# Sample the image at a set of random points; a feature collection is returned.
point_sample_fc = image.sample(
**{'region': image_bounds, 'scale': 30, 'numPixels': 5, 'geometries': True})
# Copy image properties to the FeatureCollection; three options follow.
display('All non-system image properties copied to the FeatureCollection:',
point_sample_fc.copyProperties(image))
display('Selected image properties copied to the FeatureCollection:',
point_sample_fc.copyProperties(**{
'source': image,
'properties': ['system:time_start', 'SPACECRAFT_ID']
}))
display('All but selected image properties copied to the FeatureCollection:',
point_sample_fc.copyProperties(**{
'source': image,
'exclude': ['TIRS_SSM_MODEL', 'TIRS_SSM_POSITION_STATUS']
}))
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-10-30 (UTC).
[null,null,["Zuletzt aktualisiert: 2025-10-30 (UTC)."],[],[]]