Duyuru:
15 Nisan 2025'ten önce Earth Engine'i kullanmak için kaydedilen tüm ticari olmayan projelerin erişimlerini sürdürebilmeleri için
ticari olmayan uygunluklarını doğrulamaları gerekir. 26 Eylül 2025'e kadar doğrulama yapmazsanız erişiminiz bekletilebilir.
Export.table.toDrive
Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
Bir FeatureCollection'ı tablo olarak Drive'a aktarmak için toplu görev oluşturur. Görevler, Görevler sekmesinden başlatılabilir.
Kullanım | İadeler |
---|
Export.table.toDrive(collection, description, folder, fileNamePrefix, fileFormat, selectors, maxVertices, priority) | |
Bağımsız Değişken | Tür | Ayrıntılar |
---|
collection | FeatureCollection | Dışa aktarılacak özellik koleksiyonu. |
description | Dize, isteğe bağlı | Görevin kullanıcılar tarafından okunabilecek adı. Harf, rakam, -, _ içerebilir (boşluk içermez). Varsayılan olarak "myExportTableTask" kullanılır. |
folder | Dize, isteğe bağlı | Dışa aktarılan dosyanın bulunacağı Google Drive klasörü. Not: (a) Klasör adı herhangi bir düzeyde varsa çıkış bu klasöre yazılır, (b) klasör adları yineleniyorsa çıkış en son değiştirilen klasöre yazılır, (c) klasör adı yoksa kökte yeni bir klasör oluşturulur ve (d) ayırıcı içeren klasör adları (ör. "path/to/file") sistem yolları olarak değil, değişmez dizeler olarak yorumlanır. Varsayılan olarak Drive kökü kullanılır. |
fileNamePrefix | Dize, isteğe bağlı | Dosya adı ön eki. Harf, rakam, -, _ içerebilir (boşluk içermez). Varsayılan olarak açıklama kullanılır. |
fileFormat | Dize, isteğe bağlı | Çıkış biçimi: "CSV" (varsayılan), "GeoJSON", "KML", "KMZ", "SHP" veya "TFRecord". |
selectors | List<String>|String, isteğe bağlı | Dışa aktarmaya dahil edilecek özelliklerin listesi; virgülle ayrılmış adlara sahip tek bir dize veya dizelerin listesi. |
maxVertices | Numara, isteğe bağlı | Geometri başına maksimum kesilmemiş köşe sayısı. Daha fazla köşe içeren geometriler bu boyuttan daha küçük parçalara ayrılır. |
priority | Numara, isteğe bağlı | Görev önceliği Daha yüksek önceliğe sahip görevler daha erken planlanır. 0 ile 9999 arasında bir tam sayı olmalıdır. Varsayılan olarak 100 değerine ayarlanır. |
Örnekler
Kod Düzenleyici (JavaScript)
// A Sentinel-2 surface reflectance image.
var img = ee.Image('COPERNICUS/S2_SR/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 kurulumu
Python API'si ve etkileşimli geliştirme için geemap
kullanımı hakkında bilgi edinmek üzere
Python Ortamı sayfasına bakın.
import ee
import geemap.core as geemap
Colab (Python)
# A Sentinel-2 surface reflectance image.
img = ee.Image('COPERNICUS/S2_SR/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()
Aksi belirtilmediği sürece bu sayfanın içeriği Creative Commons Atıf 4.0 Lisansı altında ve kod örnekleri Apache 2.0 Lisansı altında lisanslanmıştır. Ayrıntılı bilgi için Google Developers Site Politikaları'na göz atın. Java, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2025-07-25 UTC.
[null,null,["Son güncelleme tarihi: 2025-07-25 UTC."],[],["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"]]