Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Za pomocą Export.table możesz wyeksportować FeatureCollection jako plik CSV, SHP (plik kształtu), GeoJSON, KML, KMZ lub TFRecord. FeatureCollection może reprezentować wektory lub po prostu tabelę danych. W tym drugim przypadku obiekty w zbiorze będą miały geometrię null.
Pamiętaj o dodatkowych ograniczeniach podczas pracy z pewnymi formatami plików, w tym:
KML wszystkie geometrie FeatureCollection wyeksportowane do pliku KML zostaną przekształcone do nieprzekształconych współrzędnych (WGS84).
SHP plik FeatureCollection wyeksportowany do pliku Shape musi zawierać elementy o tym samym typie geometrii i projekcji oraz musi mieścić się w limitach rozmiaru pliku Shape. Nazwy kolumn są obcinane do 10 znaków, a nie mogą tworzyć zduplikowanych nazw kolumn.
Aby wyeksportować FeatureCollection jako zasób Earth Engine, użyj Export.table.toAsset(). Na przykład, używając zdefiniowanej wcześniej właściwości features:
Rozmiar i kształt zasobów tabeli Earth Engine są objęte kilkoma ograniczeniami:
Maksymalnie 100 milionów funkcji
Maksymalnie 1000 właściwości (kolumn)
Maksymalnie 100 tys. wierzchołków w geometrii każdego wiersza
Maksymalnie 100 tysięcy znaków na wartość ciągu znaków
do BigQuery.
Możesz wyeksportować FeatureCollection do tabeli BigQuery za pomocą Export.table.toBigQuery().
Dzięki temu możesz integrować dane Earth Engine z innymi danymi i narzędziami dostępnymi w BigQuery. Więcej informacji znajdziesz w przewodniku po eksportowaniu do BigQuery.
Pamiętaj, że format wyjściowy jest określony jako KML, aby obsługiwać dane geograficzne (SHP również nadaje się do eksportowania tabeli z geometrią). Aby wyeksportować tylko tabelę danych bez żadnych informacji geograficznych, wyeksportuj elementy z geometrią null w formacie CSV. Ten przykład pokazuje, jak za pomocą funkcji Export.table.toDrive() uzyskać wyniki potencjalnie długiego procesu redukcji:
[null,null,["Ostatnia aktualizacja: 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)."]]