Export.table.toDrive

Drive में टेबल के तौर पर FeatureCollection एक्सपोर्ट करने के लिए, एक बैच टास्क बनाता है. Tasks टैब से टास्क शुरू किए जा सकते हैं.

इस्तेमालरिटर्न
Export.table.toDrive(collection, description, folder, fileNamePrefix, fileFormat, selectors, maxVertices, priority)
आर्ग्यूमेंटटाइपविवरण
collectionFeatureCollectionएक्सपोर्ट करने के लिए फ़ीचर कलेक्शन.
descriptionस्ट्रिंग, ज़रूरी नहींटास्क का ऐसा नाम जिसे आसानी से पढ़ा जा सकता है. इसमें अक्षर, संख्याएं, -, _ (कोई स्पेस नहीं) शामिल हो सकते हैं. डिफ़ॉल्ट रूप से, "myExportTableTask" पर सेट होता है.
folderस्ट्रिंग, ज़रूरी नहींGoogle Drive का वह फ़ोल्डर जिसमें एक्सपोर्ट की गई फ़ाइल सेव होगी. ध्यान दें: (a) अगर फ़ोल्डर का नाम किसी भी लेवल पर मौजूद है, तो आउटपुट उसमें लिखा जाता है, (b) अगर फ़ोल्डर के डुप्लीकेट नाम मौजूद हैं, तो आउटपुट हाल ही में बदले गए फ़ोल्डर में लिखा जाता है, (c) अगर फ़ोल्डर का नाम मौजूद नहीं है, तो रूट में एक नया फ़ोल्डर बनाया जाएगा, और (d) सेपरेटर वाले फ़ोल्डर के नाम (उदाहरण के लिए, 'path/to/file') को सिस्टम पाथ के बजाय लिटरल स्ट्रिंग के तौर पर समझा जाता है. डिफ़ॉल्ट रूप से, Drive के रूट पर सेट होता है.
fileNamePrefixस्ट्रिंग, ज़रूरी नहींफ़ाइल के नाम का प्रीफ़िक्स. इसमें अक्षर, संख्याएं, -, _ (कोई स्पेस नहीं) शामिल हो सकते हैं. डिफ़ॉल्ट रूप से, ब्यौरा दिखता है.
fileFormatस्ट्रिंग, ज़रूरी नहींआउटपुट फ़ॉर्मैट: "CSV" (डिफ़ॉल्ट), "GeoJSON", "KML", "KMZ" या "SHP" या "TFRecord".
selectorsList<String>|String, ज़रूरी नहींएक्सपोर्ट में शामिल करने के लिए प्रॉपर्टी की सूची. यह सूची, कॉमा लगाकर अलग किए गए नामों वाली एक स्ट्रिंग या स्ट्रिंग की सूची हो सकती है.
maxVerticesनंबर, ज़रूरी नहींहर ज्यामिति में बिना काटे गए वर्टिक्स की ज़्यादा से ज़्यादा संख्या; ज़्यादा वर्टिक्स वाली ज्यामितियों को इस साइज़ से छोटे टुकड़ों में काटा जाएगा.
priorityनंबर, ज़रूरी नहींप्रोजेक्ट में टास्क की प्राथमिकता. ज़्यादा प्राथमिकता वाले टास्क जल्दी शेड्यूल किए जाते हैं. यह 0 और 9999 के बीच का पूर्णांक होना चाहिए. डिफ़ॉल्ट रूप से, यह 100 पर सेट होती है.

उदाहरण

कोड एडिटर (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 सेटअप

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/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()