Exporting Table and Vector Data

You can export a FeatureCollection as CSV, SHP (shapefile), GeoJSON, KML, KMZ or TFRecord using Export.table. The FeatureCollection may represent vectors or simply a table of data. In the latter case, the features in the collection will have null geometry.

Note some additional constraints when working with some file formats, including:

  • KML: A FeatureCollection exported to a KML file will have all the geometries transformed to unprojected (WGS84) coordinates.
  • SHP: A FeatureCollection exported to a Shapefile must contain features with the same geometry type and projection and must fit within the Shapefile size limits. Column names are truncated to 10 characters or fewer, and this must not create duplicate column names.
  • TFRecord: See this page.

to Drive

To export a FeatureCollection to your Drive account, use Export.table.toDrive(). For example:

Code Editor (JavaScript)

// Make a collection of points.
var features = ee.FeatureCollection([
  ee.Feature(ee.Geometry.Point(30.41, 59.933), {name: 'Voronoi'}),
  ee.Feature(ee.Geometry.Point(-73.96, 40.781), {name: 'Thiessen'}),
  ee.Feature(ee.Geometry.Point(6.4806, 50.8012), {name: 'Dirichlet'})

// Export the FeatureCollection to a KML file.
  collection: features,
  fileFormat: 'KML'

Note that the output format is specified as KML to handle geographic data (SHP would also be appropriate for exporting a table with geometry). To export just a table of data, without any geographic information, export features with null geometry in CSV format. The following demonstrates using Export.table.toDrive() to get the results of a potentially long running reduction:

Code Editor (JavaScript)

// Load a Landsat image.
var image = ee.Image('LANDSAT/LC08/C02/T1_TOA/LC08_044034_20140318');
var projection = image.select('B2').projection().getInfo();

// Create an arbitrary rectangle.
var region = ee.Geometry.Rectangle(-122.2806, 37.1209, -122.0554, 37.2413);

// Get a dictionary of means in the region.
var means = image.reduceRegion({
  reducer: ee.Reducer.mean(),
  geometry: region,
  crs: projection.crs,
  crsTransform: projection.transform,

// Make a feature without geometry and set the properties to the dictionary of means.
var feature = ee.Feature(null, means);

// Wrap the Feature in a FeatureCollection for export.
var featureCollection = ee.FeatureCollection([feature]);

// Export the FeatureCollection.
  collection: featureCollection,
  description: 'exportTableExample',
  fileFormat: 'CSV'

Note that the format is set to 'CSV' in this example since there is no geometry in the output.

to Cloud Storage

To export a FeatureCollection to Cloud Storage, use Export.table.toCloudStorage(). For example, using the features defined previously:

Code Editor (JavaScript)

// Export a KML file to Cloud Storage.
  collection: features,
  bucket: 'your-bucket-name',
  fileNamePrefix: 'exampleTableExport',
  fileFormat: 'KML'

to Asset

To export a FeatureCollection as an Earth Engine asset, use Export.table.toAsset(). For example, using the features defined previously:

Code Editor (JavaScript)

// Export an ee.FeatureCollection as an Earth Engine asset.
  collection: features,
  assetId: 'exampleAssetId',

There are several limitations on the size and shape of Earth Engine table assets:

  • Maximum of 100 million features
  • Maximum of 1000 properties (columns)
  • Maximum of 100,000 vertices for each row's geometry
  • Maximum of 100,000 characters per string value