お知らせ :
2025 年 4 月 15 日 より前に Earth Engine の使用を登録したすべての非商用プロジェクトは、アクセスを維持するために
非商用目的での利用資格を確認 する必要があります。2025 年 9 月 26 日までに確認が完了していない場合、アクセスが保留されることがあります。
フィードバックを送信
Export.table.toDrive
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
FeatureCollection をテーブルとしてドライブにエクスポートするバッチタスクを作成します。タスクは [タスク] タブから開始できます。
用途 戻り値 Export.table.toDrive(collection, description , folder , fileNamePrefix , fileFormat , selectors , maxVertices , priority )
引数 タイプ 詳細 collection
FeatureCollection エクスポートするフィーチャー コレクション。 description
文字列、省略可 人が読める形式のタスク名。英字、数字、-、_ を使用できます(スペースは使用できません)。デフォルトは「myExportTableTask」です。 folder
文字列、省略可 エクスポートが保存される Google ドライブ フォルダ。注: (a)フォルダ名が任意のレベルに存在する場合、出力はそのフォルダに書き込まれます。(b)重複するフォルダ名が存在する場合、出力は最後に変更されたフォルダに書き込まれます。(c)フォルダ名が存在しない場合、ルートに新しいフォルダが作成されます。(d)区切り文字を含むフォルダ名(「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"]]