Pengumuman: Semua project nonkomersial yang terdaftar untuk menggunakan Earth Engine sebelum 15 April 2025 harus memverifikasi kelayakan nonkomersial untuk mempertahankan akses Earth Engine.
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Anda dapat mengekspor FeatureCollection sebagai CSV, SHP (shapefile), GeoJSON, KML, KMZ, atau TFRecord menggunakan Export.table. FeatureCollection dapat mewakili vektor
atau hanya tabel data. Dalam kasus kedua, fitur dalam koleksi akan memiliki geometri null.
Perhatikan beberapa batasan tambahan saat menggunakan beberapa format file, termasuk:
KML: FeatureCollection yang diekspor ke file KML akan memiliki semua geometri yang ditransformasikan ke koordinat yang tidak diproyeksikan (WGS84).
SHP: FeatureCollection yang diekspor ke Shapefile harus berisi fitur dengan jenis dan proyeksi geometri yang sama serta harus sesuai dengan batas ukuran Shapefile. Nama kolom
dipotong menjadi 10 karakter atau kurang, dan hal ini tidak boleh membuat
nama kolom duplikat.
Untuk mengekspor FeatureCollection sebagai aset Earth Engine, gunakan
Export.table.toAsset(). Misalnya, menggunakan features yang ditentukan sebelumnya:
Ada beberapa batasan pada ukuran dan bentuk aset tabel Earth Engine:
Maksimum 100 juta fitur
Maksimum 1.000 properti (kolom)
Maksimum 100.000 vertex untuk setiap geometri baris
Maksimum 100.000 karakter per nilai string
ke BigQuery
Anda dapat mengekspor FeatureCollection ke tabel BigQuery menggunakan Export.table.toBigQuery().
Hal ini memungkinkan Anda mengintegrasikan data Earth Engine dengan data dan alat lain yang tersedia di BigQuery. Untuk informasi selengkapnya, lihat
Panduan mengekspor ke BigQuery.
Perhatikan bahwa format output ditentukan sebagai KML untuk menangani data geografis (SHP juga akan sesuai untuk mengekspor tabel dengan geometri). Untuk hanya mengekspor tabel data, tanpa informasi geografis, ekspor fitur dengan geometri null dalam format CSV. Berikut ini menunjukkan penggunaan
Export.table.toDrive() untuk mendapatkan hasil pengurangan yang berpotensi berjalan lama:
[null,null,["Terakhir diperbarui pada 2025-07-25 UTC."],[[["\u003cp\u003e\u003ccode\u003eExport.table\u003c/code\u003e allows you to export \u003ccode\u003eFeatureCollection\u003c/code\u003e data from Earth Engine in various formats like CSV, SHP, GeoJSON, KML, KMZ, and TFRecord, which can represent vector data or simply a table.\u003c/p\u003e\n"],["\u003cp\u003eWhen exporting, be aware of format-specific constraints such as coordinate systems for KML and geometry type/size limits for SHP.\u003c/p\u003e\n"],["\u003cp\u003eYou can export \u003ccode\u003eFeatureCollection\u003c/code\u003e data to your Google Drive, Cloud Storage, or as an Earth Engine asset using designated functions like \u003ccode\u003etoDrive()\u003c/code\u003e, \u003ccode\u003etoCloudStorage()\u003c/code\u003e, and \u003ccode\u003etoAsset()\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eFor exporting data without geographic information, use features with null geometry and export in CSV format, but be mindful of potential data type conversions in Google Drive.\u003c/p\u003e\n"],["\u003cp\u003eEarth Engine table assets have limitations on the number of features, properties, geometry vertices, and string value lengths.\u003c/p\u003e\n"]]],[],null,["# Exporting Table and Vector Data\n\nYou can export a `FeatureCollection` as CSV, SHP (shapefile), GeoJSON, KML, KMZ\nor TFRecord using `Export.table`. The `FeatureCollection` may represent vectors\nor simply a table of data. In the latter case, the features in the collection\nwill have null geometry.\n\nNote some additional constraints when working with some file formats, including:\n\n- **KML** : A `FeatureCollection` exported to a KML file will have all the geometries transformed to unprojected (WGS84) coordinates.\n- **SHP** : A `FeatureCollection` exported to a Shapefile must contain features with the same geometry type and projection and must fit within the [Shapefile size\n limits](https://support.esri.com/en/technical-article/000010813). Column names are truncated to 10 characters or fewer, and this must not create duplicate column names.\n- **TFRecord** : See [this page](/earth-engine/guides/tfrecord#exporting-tables).\n\n| **Note:** If you need control over the precision of geometries in your export, `map()` a function over the collection to be exported: `map(function(f) { return f.transform(targetProj, maxErr); })`\n\nto Cloud Storage\n----------------\n\nTo export a `FeatureCollection` to Cloud Storage, use\n`Export.table.toCloudStorage()`. For example, using the `features` defined\npreviously:\n\n### Code Editor (JavaScript)\n\n```javascript\n// Make a collection of points.\nvar features = ee.FeatureCollection([\n ee.Feature(ee.Geometry.Point(30.41, 59.933), {name: 'Voronoi'}),\n ee.Feature(ee.Geometry.Point(-73.96, 40.781), {name: 'Thiessen'}),\n ee.Feature(ee.Geometry.Point(6.4806, 50.8012), {name: 'Dirichlet'})\n]);\n\n// Export a KML file to Cloud Storage.\nExport.table.toCloudStorage({\n collection: features,\n description:'vectorsToCloudStorageExample',\n bucket: 'your-bucket-name',\n fileNamePrefix: 'exampleTableExport',\n fileFormat: 'KML'\n});\n```\nPython setup\n\nSee the [Python Environment](/earth-engine/guides/python_install) page for information on the Python API and using\n`geemap` for interactive development. \n\n```python\nimport ee\nimport geemap.core as geemap\n```\n\n### Colab (Python)\n\n```python\n# Make a collection of points.\nfeatures = ee.FeatureCollection([\n ee.Feature(ee.Geometry.Point(30.41, 59.933), {'name': 'Voronoi'}),\n ee.Feature(ee.Geometry.Point(-73.96, 40.781), {'name': 'Thiessen'}),\n ee.Feature(ee.Geometry.Point(6.4806, 50.8012), {'name': 'Dirichlet'}),\n])\n\n# Export a KML file to Cloud Storage.\ntask = ee.batch.Export.table.toCloudStorage(\n collection=features,\n description='vectorsToCloudStorageExample',\n bucket='your-bucket-name',\n fileNamePrefix='exampleTableExport',\n fileFormat='KML',\n)\ntask.start()\n```\n\nto Asset\n--------\n\nTo export a `FeatureCollection` as an Earth Engine asset, use\n`Export.table.toAsset()`. For example, using the `features` defined previously:\n\n### Code Editor (JavaScript)\n\n```javascript\n// Export an ee.FeatureCollection as an Earth Engine asset.\nExport.table.toAsset({\n collection: features,\n description:'exportToTableAssetExample',\n assetId: 'exampleAssetId',\n});\n```\nPython setup\n\nSee the [Python Environment](/earth-engine/guides/python_install) page for information on the Python API and using\n`geemap` for interactive development. \n\n```python\nimport ee\nimport geemap.core as geemap\n```\n\n### Colab (Python)\n\n```python\n# Export an ee.FeatureCollection as an Earth Engine asset.\ntask = ee.batch.Export.table.toAsset(\n collection=features,\n description='exportToTableAssetExample',\n assetId='projects/your-project/assets/exampleAssetId',\n)\ntask.start()\n```\n\nThere are several limitations on the size and shape of Earth Engine table\nassets:\n\n- Maximum of 100 million features\n- Maximum of 1,000 properties (columns)\n- Maximum of 100,000 vertices for each row's geometry\n- Maximum of 100,000 characters per string value\n\nto BigQuery\n-----------\n\nYou can export a `FeatureCollection` to a BigQuery table using\n[`Export.table.toBigQuery()`](/earth-engine/apidocs/export-table-tobigquery).\nThis lets you integrate your Earth Engine data with other data and tools\navailable in BigQuery. For more information, see the\n[Exporting to BigQuery guide](/earth-engine/guides/exporting_to_bigquery).\n\n### Code Editor (JavaScript)\n\n```javascript\nExport.table.toBigQuery({\n collection: features,\n table: 'myproject.mydataset.mytable',\n description: 'put_my_data_in_bigquery',\n append: true,\n overwrite: false\n});\n```\nPython setup\n\nSee the [Python Environment](/earth-engine/guides/python_install) page for information on the Python API and using\n`geemap` for interactive development. \n\n```python\nimport ee\nimport geemap.core as geemap\n```\n\n### Colab (Python)\n\n```python\ntask = ee.batch.Export.table.toBigQuery(\n collection=features,\n table='myproject.mydataset.mytable',\n description='put_my_data_in_bigquery',\n append=True,\n overwrite=False,\n)\ntask.start()\n```\n\nto Drive\n--------\n\nTo export a `FeatureCollection` to your Drive account, use\n`Export.table.toDrive()`. For example:\n\n### Code Editor (JavaScript)\n\n```javascript\n// Export the FeatureCollection to a KML file.\nExport.table.toDrive({\n collection: features,\n description:'vectorsToDriveExample',\n fileFormat: 'KML'\n});\n```\nPython setup\n\nSee the [Python Environment](/earth-engine/guides/python_install) page for information on the Python API and using\n`geemap` for interactive development. \n\n```python\nimport ee\nimport geemap.core as geemap\n```\n\n### Colab (Python)\n\n```python\n# Export the FeatureCollection to a KML file.\ntask = ee.batch.Export.table.toDrive(\n collection=features, description='vectorsToDriveExample', fileFormat='KML'\n)\ntask.start()\n```\n\nNote that the output format is specified as KML to handle geographic data (SHP\nwould also be appropriate for exporting a table with geometry). To export just a\ntable of data, without any geographic information, export features with null\ngeometry in CSV format. The following demonstrates using\n`Export.table.toDrive()` to get the results of a potentially long running\nreduction:\n\n### Code Editor (JavaScript)\n\n```javascript\n// Load a Landsat image.\nvar image = ee.Image('LANDSAT/LC08/C02/T1_TOA/LC08_044034_20140318');\nvar projection = image.select('B2').projection().getInfo();\n\n// Create an arbitrary rectangle.\nvar region = ee.Geometry.Rectangle(-122.2806, 37.1209, -122.0554, 37.2413);\n\n// Get a dictionary of means in the region.\nvar means = image.reduceRegion({\n reducer: ee.Reducer.mean(),\n geometry: region,\n crs: projection.crs,\n crsTransform: projection.transform,\n});\n\n// Make a feature without geometry and set the properties to the dictionary of means.\nvar feature = ee.Feature(null, means);\n\n// Wrap the Feature in a FeatureCollection for export.\nvar featureCollection = ee.FeatureCollection([feature]);\n\n// Export the FeatureCollection.\nExport.table.toDrive({\n collection: featureCollection,\n description: 'exportTableExample',\n fileFormat: 'CSV'\n});\n```\nPython setup\n\nSee the [Python Environment](/earth-engine/guides/python_install) page for information on the Python API and using\n`geemap` for interactive development. \n\n```python\nimport ee\nimport geemap.core as geemap\n```\n\n### Colab (Python)\n\n```python\n# Load a Landsat image.\nimage = ee.Image('LANDSAT/LC08/C02/T1_TOA/LC08_044034_20140318')\nprojection = image.select('B2').projection().getInfo()\n\n# Create an arbitrary rectangle.\nregion = ee.Geometry.Rectangle(-122.2806, 37.1209, -122.0554, 37.2413)\n\n# Get a dictionary of means in the region.\nmeans = image.reduceRegion(\n reducer=ee.Reducer.mean(),\n geometry=region,\n crs=projection['crs'],\n crsTransform=projection['transform'],\n)\n\n# Make a feature without geometry and set the properties to the dictionary of means.\nfeature = ee.Feature(None, means)\n\n# Wrap the Feature in a FeatureCollection for export.\nfeature_collection = ee.FeatureCollection([feature])\n\n# Export the FeatureCollection.\ntask = ee.batch.Export.table.toDrive(\n collection=feature_collection,\n description='exportTableExample',\n fileFormat='CSV',\n)\ntask.start()\n```\n\nNote that the format is set to 'CSV' in this example since there is no geometry\nin the output.\n| **Caution:** Depending on your Google Drive settings, CSV tables that you export from Earth Engine can be converted to XSLX files with unintended effects, such as data type conversions. The behavior can be modified with [Google Drive\n| settings](/earth-engine/faq#tables_exported_to_drive_as_csv_format_are_converted_to_xslx_format)."]]