ee.FeatureCollection.getDownloadURL
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
מקבל כתובת URL להורדה. כשניגשים לכתובת ה-URL, קובץ ה-FeatureCollection מורד באחד מכמה פורמטים.
מחזירה כתובת URL להורדה או undefined אם צוינה קריאה חוזרת (callback).
שימוש | החזרות |
---|
FeatureCollection.getDownloadURL(format, selectors, filename, callback) | אובייקט|מחרוזת |
ארגומנט | סוג | פרטים |
---|
זה: featurecollection | FeatureCollection | מופע FeatureCollection. |
format | מחרוזת, אופציונלי | הפורמט של ההורדה, אחד מהערכים הבאים:
"csv", "json", "geojson", "kml", "kmz" (הערך "json" מוציא פלט GeoJSON). אם לא מציינים ערך, ברירת המחדל היא csv. |
selectors | List<String>|String, optional | שמות מאפייני התכונות שמשמשים לבחירת המאפיינים להורדה. אם לא מציינים מוצרים, כל המוצרים נכללים. |
filename | מחרוזת, אופציונלי | השם של הקובץ להורדה. הסיומת מצורפת כברירת מחדל. אם לא מציינים ערך, ברירת המחדל היא 'טבלה'. |
callback | פונקציה, אופציונלי | קריאה חוזרת אופציונלית. אם לא מספקים את הערך הזה, השיחה מתבצעת באופן סינכרוני. |
דוגמאות
עורך הקוד (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
מידע על Python API ועל שימוש ב-geemap
לפיתוח אינטראקטיבי מופיע בדף
Python Environment.
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)
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-25 (שעון UTC).
[null,null,["עדכון אחרון: 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,[]]