- In Code Editor, shapefiles can be uploaded to the assets. In the code editor, on the left side panel, go to Assets.
- Click NEW and Table upload.
- In the popup screen. Make sure you have the correct path for the asset. Click SELECT. Point to the directory that has your shapefile. Earth Engine takes these extensions to be valid shapefile.
a) .dbf
b) .shx
c) .cpg
d) .fix
e) .qix
f) .sbn
g) .prj
h) .shp
i) .shp.xml
Note: the .sbx and .qpj file is not considered valid. - Click OK and let it finish upload the shapefile. You can check the status of the file upload on the Tasks tab on the right-side panel on the GEE playground.
- Once it finishes uploading, on the code editor, locate your assets. It will be the same name that was given while uploading.
- Click on the import icon. Now on the editor, you will see it as named default. You can rename it as you want. Use .geometry() function to get the geometry of the uploaded table.
var vietnam = ee.FeatureCollection('users/biplov/vietnam'); vietnam = vietnam.geometry(); Map.centerObject(vietnam); Map.addLayer(vietnam, {color: 'red'}, 'vietnam');
Betty
Great one.
Caio Valente
Hi everyone!
I have a doubt.
When I upload a shapefile containing a date column to GEE it changes to a Long type column and it returns some weird big numbers.
Does anyone know how can I solve this problem?
Omid
Thanks!!!