Uploading table assets
You can use the Asset Manager or command line interface (CLI) to upload datasets in the Shapefile format. (See Importing Raster Data for details on importing rasters using the Code Editor or CLI.) Your uploaded assets are initially private, but can be shared as described in the Sharing Assets Section.
To upload a Shapefile from the Code Editor, click the button, then select Table upload. Earth Engine presents an upload dialog which should look similar to Figure 1. Click the SELECT button and navigate to a Shapefile or Zip archive containing a Shapefile on your local file system. When selecting a .shp file, be sure to select the related .dbf, .shx and .prj files. Earth Engine will default to WGS84 (longitude, latitude) coordinates if a .prj file is not provided. If you are uploading a Zip archive, make sure it contains only one Shapefile (set of .shp, .dbf, .shx, .prj, etc.) and no duplicate filenames. Make sure filenames do not include additional periods or dots. (Filenames will include a single period before the extension.)
Give the table an appropriate asset ID (which doesn't already exist) in your user folder. Click OK to start the upload.
Once you have started the upload, an 'Asset ingestion' task appears on the Tasks tab at the right side of the Code Editor. Hovering over the task in the task manager shows a ? icon which you can use to check the upload status. To cancel an upload, click on the spinning icon next to the task. Once the ingestion is complete, the asset will appear in your user folder with aicon.
Loading a table asset to your script
To create a
FeatureCollection in your script from a table asset, import it as
described on the Managing Assets
Importing Tables with Fusion Tables
You can also use table data stored in Google Fusion Tables in Earth Engine.
To upload table data to a Fusion Table:
- Log into to your Earth Engine account then create a Fusion Table. (Learn more about Fusion Tables at this link).
- In the ‘Import new table dialog’, click Choose File and navigate to table data (which may or may not contain a geometry column) stored in a file on your computer. For simple geometries (e.g. points), a two-column location in tabular data can be used. (Note: two-column locations are not supported in the Earth Engine Explorer interface). For complex geometries, KML is usually preferrable.
- Click Next and inspect the table preview.
- If the data are correctly imported, click Next again, fill in the relevant metadata fields, then click Finish. The imported Fusion Table will be created in your Google Drive account and you will be taken to the Fusion Table page.
- Go to the File menu and select About this table.
- In the ‘About this table’ dialog, find the Id and copy it into the Earth Engine FeatureCollection constructor.
Alternatively, the website shpescape.com can create a Fusion Table directly from a Shapefile.
Loading a Fusion Table to your script
To create a
FeatureCollection from a Fusion Table in your script:
// Load a Fusion Table from the ID using the FeatureCollection constructor. var fc = ee.FeatureCollection('ft:11SfWB6oBS1iWGiQxEOqF_wUgBJL7Bux-pWU-mqd5');
Note that everything after the
ft: is the ID from the ‘About this table’ dialog.
(Alternatively, find the ID in the URL of the table).
For others to be able to use a Fusion Table you created (e.g. when you email your script link to collaborators), click the Share button in the Fusion Tables interface, then set the access level such that it is shared with whoever you want to have access. See the Fusion Tables page for more information.