ee.FeatureCollection.getDownloadURL
Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Ruft eine Download-URL ab. Wenn auf die URL zugegriffen wird, wird die FeatureCollection in einem von mehreren Formaten heruntergeladen.
Gibt eine Download-URL zurück oder „undefined“, wenn ein Callback angegeben wurde.
Nutzung | Ausgabe |
---|
FeatureCollection.getDownloadURL(format, selectors, filename, callback) | Objekt|String |
Argument | Typ | Details |
---|
So gehts: featurecollection | FeatureCollection | Die FeatureCollection-Instanz. |
format | String, optional | Das Format des Downloads, eines der folgenden:
"csv", "json", "geojson", "kml", "kmz" (bei "json" wird GeoJSON ausgegeben). Wenn nichts angegeben ist, wird standardmäßig „csv“ verwendet. |
selectors | List<String>|String, optional | Namen der Feature-Properties, die zum Auswählen der herunterzuladenden Attribute verwendet werden. Wenn nichts angegeben ist, werden alle Properties einbezogen. |
filename | String, optional | Name der herunterzuladenden Datei. Die Erweiterung wird standardmäßig angehängt. Wenn nicht angegeben, wird standardmäßig „table“ verwendet. |
callback | Funktion (optional) | Ein optionaler Callback. Wenn nicht angegeben, erfolgt der Aufruf synchron. |
Beispiele
Code-Editor (JavaScript)
// FeatureCollection of power plants in Belgium.
var fc = ee.FeatureCollection('WRI/GPPD/power_plants')
.filter('country_lg == "Belgium"');
// Get a download URL for the FeatureCollection.
var downloadUrl = fc.getDownloadURL({
format: 'CSV',
selectors: ['capacitymw', 'fuel1'],
filename: 'belgian_power_plants'
});
print('URL for downloading FeatureCollection as CSV', downloadUrl);
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)
# FeatureCollection of power plants in Belgium.
fc = ee.FeatureCollection('WRI/GPPD/power_plants').filter(
'country_lg == "Belgium"')
# Get a download URL for the FeatureCollection.
download_url = fc.getDownloadURL(**{
'filetype': 'CSV',
'selectors': ['capacitymw', 'fuel1'],
'filename': 'belgian_power_plants',
})
print('URL for downloading FeatureCollection as CSV:', download_url)
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)."],[],["The `FeatureCollection.getDownloadURL` method generates a URL for downloading a FeatureCollection in various formats (CSV, JSON, GeoJSON, KML, KMZ). Users can specify the `format`, `selectors` (properties to include), and `filename`. If a `callback` function is used, the method returns `undefined`. If not, it will return the download URL synchronously. If format and filename are not specified, they default to CSV and \"table\" respectively, all properties are included.\n"],null,[]]