ประกาศ : โปรเจ็กต์ที่ไม่ใช่เชิงพาณิชย์ทั้งหมดที่ลงทะเบียนเพื่อใช้ Earth Engine ก่อนวันที่
15 เมษายน 2025 ต้อง
ยืนยันการมีสิทธิ์ที่ไม่ใช่เชิงพาณิชย์ เพื่อรักษาสิทธิ์เข้าถึง หากคุณไม่ยืนยันภายในวันที่ 26 กันยายน 2025 ระบบอาจระงับสิทธิ์เข้าถึงของคุณ
ส่งความคิดเห็น
Export.table.toDrive
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
สร้างงานแบบกลุ่มเพื่อส่งออก FeatureCollection เป็นตารางไปยังไดรฟ์ คุณเริ่มงานได้จากแท็บ Tasks
การใช้งาน การคืนสินค้า Export.table.toDrive(collection, description , folder , fileNamePrefix , fileFormat , selectors , maxVertices , priority )
อาร์กิวเมนต์ ประเภท รายละเอียด collection
FeatureCollection คอลเล็กชันฟีเจอร์ที่จะส่งออก description
สตริง ไม่บังคับ ชื่อของงานที่มนุษย์อ่านได้ อาจมีตัวอักษร ตัวเลข ขีดกลาง ขีดล่าง (ไม่มีช่องว่าง) ค่าเริ่มต้นคือ "myExportTableTask" folder
สตริง ไม่บังคับ โฟลเดอร์ Google ไดรฟ์ที่จะมีไฟล์ที่ส่งออก หมายเหตุ: (ก) หากมีชื่อโฟลเดอร์ในระดับใดก็ตาม ระบบจะเขียนเอาต์พุตไปยังโฟลเดอร์นั้น (ข) หากมีชื่อโฟลเดอร์ที่ซ้ำกัน ระบบจะเขียนเอาต์พุตไปยังโฟลเดอร์ที่แก้ไขล่าสุด (ค) หากไม่มีชื่อโฟลเดอร์ ระบบจะสร้างโฟลเดอร์ใหม่ที่รูท และ (ง) ระบบจะตีความชื่อโฟลเดอร์ที่มีตัวคั่น (เช่น "path/to/file") เป็นสตริงตามตัวอักษร ไม่ใช่เส้นทางของระบบ ค่าเริ่มต้นคือรูทของไดรฟ์ fileNamePrefix
สตริง ไม่บังคับ คำนำหน้าชื่อไฟล์ อาจมีตัวอักษร ตัวเลข ขีดกลาง ขีดล่าง (ไม่มีช่องว่าง) ค่าเริ่มต้นคือคำอธิบาย fileFormat
สตริง ไม่บังคับ รูปแบบเอาต์พุต: "CSV" (ค่าเริ่มต้น), "GeoJSON", "KML", "KMZ" หรือ "SHP" หรือ "TFRecord" selectors
List<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 ()
ส่งความคิดเห็น
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-25 UTC
หากต้องการบอกให้เราทราบเพิ่มเติม
[[["เข้าใจง่าย","easyToUnderstand","thumb-up"],["แก้ปัญหาของฉันได้","solvedMyProblem","thumb-up"],["อื่นๆ","otherUp","thumb-up"]],[["ไม่มีข้อมูลที่ฉันต้องการ","missingTheInformationINeed","thumb-down"],["ซับซ้อนเกินไป/มีหลายขั้นตอนมากเกินไป","tooComplicatedTooManySteps","thumb-down"],["ล้าสมัย","outOfDate","thumb-down"],["ปัญหาเกี่ยวกับการแปล","translationIssue","thumb-down"],["ตัวอย่าง/ปัญหาเกี่ยวกับโค้ด","samplesCodeIssue","thumb-down"],["อื่นๆ","otherDown","thumb-down"]],["อัปเดตล่าสุด 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"]]