User Toolkit to download MapBiomas data with Google Earth Engine. This tutorial is about the script mapbiomas-user-toolkit-download.js
- Access and download data using user's vector
- Updated to collection 4.0
- Updated assets
- New transitions periods
How to use
1. Getting the code
Access the repository directly in Google Earth Engine. The repository will appear at Reader Session of your scripts tab.
2. Create a MAPBIOMAS folder
- Go to the Assets tab and click on the New menu. Then choose the Folder option.
- Select your primary account if you have others linked to your structure. In this example, we see the mapbiomas account, but your structure will apper like this: users/MYACCOUNT. Examples: users/mary/, users/joao/, users/john/, users/tyler/.
- Create a MAPBIOMAS folder (all capital letters) in your assets structure.
3. Upload a new table asset
- In GEE vectors are called tables.
- Access the menu New > Table upload to add a table.
- Press the SELECT button to choose your shapefile. Browse to the file on your computer.
- Remember to use files with the extension .shp, .shx, .prj, and .dbf. Alternatively, you can compress them into a zip file to upload.
- Note that you must enter the MAPBIOMAS folder name to add the file directly within this folder.
- Click on OK to start the upload task.
- The table will appear inside the MAPBIOMAS folder. Press the refresh button to view all your new files.
- You can also move/copy a table asset from elsewhere in your structure into the MAPBIOMAS folder.
4. Accessing the data
- Run the script now. Open it in Code Editor and click the Run button.
- Select a table or choose one of the default tables.
- The table (vector) will be loaded on the map.
- In the Properties menu, select the attribute (column name) that will identify each of the vector polygons.
- In the Features menu, select the polygon name you want to work with.
- The toolkit will zoom into the selected polygon.
- It is possible to apply a buffer between 1 and 5 km. This buffer will only have effect on data export.
- Select from the Layers menu the years you want to view and export. Layers are active in the menu and appear in the default list of layers in the Code Editor.
5. Exporting data
- To export the data to your Google Drive, click the Export images to Google Drive button. Go to Tasks tab and click the RUN button.
- Now just wait for the images to be saved to your Google Drive.
- A MAPBIOMAS-EXPORT folder will be created in your Google Drive root and all the mapbiomas data that you exported will be there.