Earth Engine
سطوح سهمیه غیرتجاری را برای محافظت از منابع محاسباتی مشترک و تضمین عملکرد قابلاعتماد برای همه معرفی کرده است. پروژههای غیرتجاری بهطور پیشفرض از «سطح انجمن» استفاده میکنند، اما هرزمان بخواهید میتوانید سطح پروژه را تغییر دهید.
Google برای ترجمه محتوا به زبان ترجیحی شما از فناوری هوشواره استفاده میکند. ترجمههای هوشوارهای ممکن است اشتباه داشته باشند.
Export.table.toDrive
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
یک تکلیف دستهای برای صادر کردن FeatureCollection بهصورت جدول به Drive ایجاد میکند. تکالیف را میتوان از برگه «تکالیف» شروع کرد.
| کاربرد | بازگشتیها |
|---|
Export.table.toDrive(collection, description, folder, fileNamePrefix, fileFormat, selectors, maxVertices, priority) | |
| متغیر مستقل | نوع | جزئیات |
|---|
collection | FeatureCollection | مجموعه عارضه برای صادر کردن. |
description | رشته، اختیاری | نام تکلیف قابلخواندن برای انسان. میتواند شامل حروف، اعداد، -، _ (بدون فاصله) باشد. بهطور پیشفرض «myExportTableTask» است. |
folder | رشته، اختیاری | پوشه Google Drive که فایل صادرشده در آن قرار خواهد گرفت. توجه: (الف) اگر نام پوشه در هر سطحی وجود داشته باشد، خروجی در آن نوشته میشود، (ب) اگر نامهای پوشه تکراری وجود داشته باشد، خروجی در پوشهای که اخیراً اصلاح شده است نوشته میشود، (ج) اگر نام پوشه وجود نداشته باشد، پوشه جدیدی در ریشه ایجاد میشود، و (د) نامهای پوشه با جداکنندهها (مثلاً «path/to/file») بهعنوان رشتههای دقیق تفسیر میشوند، نه مسیرهای سیستم. بهطور پیشفرض به ریشه Drive میرود. |
fileNamePrefix | رشته، اختیاری | پیشوند نام فایل. میتواند شامل حروف، اعداد، -، _ (بدون فاصله) باشد. بهطور پیشفرض به توضیحات میرود. |
fileFormat | رشته، اختیاری | قالب برونداد: «CSV» (پیشفرض)، «GeoJSON»، «KML»، «KMZ»، یا «SHP»، یا «TFRecord». |
selectors | List[String]|String، اختیاری | فهرستی از داراییها برای گنجاندن در صادر کردن؛ یا یک رشته تکی با نامهای جداشده با کاما یا فهرستی از رشتهها. |
maxVertices | شماره، اختیاری | حداکثر تعداد رأسهای برشنخورده در هر هندسه؛ هندسههایی که رأسهای بیشتری دارند به قطعاتی کوچکتر از این اندازه برش داده میشوند. |
priority | شماره، اختیاری | اولویت تکلیف در پروژه. تکالیف با اولویت بالاتر زودتر زمانبندی میشوند. باید عدد صحیحی بین ۰ و ۹۹۹۹ باشد. پیشفرض ۱۰۰ است. |
مثالها
ویرایشگر کد (جاوا اسکریپت)
// A Sentinel-2 surface reflectance image.
var img = ee.Image('COPERNICUS/S2_SR_HARMONIZED/20210109T185751_20210109T185931_T10SEG');
Map.setCenter(-122.359, 37.428, 9);
Map.addLayer(img, {bands: ['B11', 'B8', 'B3'], min: 100, max: 3500}, 'img');
// Sample the image at 20 m scale, a point feature collection is returned.
var samp = img.sample({scale: 20, numPixels: 50, geometries: true});
Map.addLayer(samp, {color: 'white'}, 'samp');
print('Image sample feature collection', samp);
// Export the image sample feature collection to Drive as a CSV file.
Export.table.toDrive({
collection: samp,
description: 'image_sample_demo_csv',
folder: 'earth_engine_demos',
fileFormat: 'CSV'
});
// Export a subset of collection properties: three bands and the geometry
// as GeoJSON.
Export.table.toDrive({
collection: samp,
description: 'image_sample_demo_prop_subset',
folder: 'earth_engine_demos',
fileFormat: 'GeoJSON',
selectors: ['B8', 'B11', 'B12', '.geo']
});
// Export the image sample feature collection to Drive as a shapefile.
Export.table.toDrive({
collection: samp,
description: 'image_sample_demo_shp',
folder: 'earth_engine_demos',
fileFormat: 'SHP'
});
راهاندازی Python
برای اطلاعات درباره Python API و استفاده از
geemap برای توسعه تعاملی، به صفحه
محیط Python مراجعه کنید.
import ee
import geemap.core as geemap
Colab (Python)
# A Sentinel-2 surface reflectance image.
img = ee.Image('COPERNICUS/S2_SR_HARMONIZED/20210109T185751_20210109T185931_T10SEG')
m = geemap.Map()
m.set_center(-122.359, 37.428, 9)
m.add_layer(
img, {'bands': ['B11', 'B8', 'B3'], 'min': 100, 'max': 3500}, 'img'
)
# Sample the image at 20 m scale, a point feature collection is returned.
samp = img.sample(scale=20, numPixels=50, geometries=True)
m.add_layer(samp, {'color': 'white'}, 'samp')
display(m)
display('Image sample feature collection', samp)
# Export the image sample feature collection to Drive as a CSV file.
task = ee.batch.Export.table.toDrive(
collection=samp,
description='image_sample_demo_csv',
folder='earth_engine_demos',
fileFormat='CSV',
)
task.start()
# Export a subset of collection properties: three bands and the geometry
# as GeoJSON.
task = ee.batch.Export.table.toDrive(
collection=samp,
description='image_sample_demo_prop_subset',
folder='earth_engine_demos',
fileFormat='GeoJSON',
selectors=['B8', 'B11', 'B12', '.geo'],
)
task.start()
# Export the image sample feature collection to Drive as a shapefile.
task = ee.batch.Export.table.toDrive(
collection=samp,
description='image_sample_demo_shp',
folder='earth_engine_demos',
fileFormat='SHP',
)
task.start()
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2026-11-02 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2026-11-02 بهوقت ساعت هماهنگ جهانی."],[],["This function exports a FeatureCollection as a table to Google Drive. Key actions include specifying the `collection`, task `description`, target `folder`, `fileNamePrefix`, and `fileFormat` (CSV, GeoJSON, KML, KMZ, SHP, or TFRecord). Optional actions include specifying `selectors` to limit exported properties, setting `maxVertices` to manage geometry size, and `priority` to control task scheduling. Multiple examples show how to export sampled image data to Drive in various formats.\n"]]