uploading .shp files into the earth engine

Yeah! Goodbye fusion tables!

Step 1: go to this website.

Step 2: Download the shapefile of Thailand.

thailandshp.png

Step 3: extract the files.

Step 4: Open the file: THA_adm1.shp in Qgis

Step 5: Click the select single feature button.

selectfeature.png

Step 6: Select your province of interest.

Step 7: click right on the layer and choose save selection as.

saveselection.png

Step 8: save the selection as an esri shapefile.

savevector.png

Step 9: Open the code editor.

Step 10: Go to the Assets tab and select table upload

tableUpload

Step 11: Select all the files you just stored.

selectfiles.png

Step 12: wait for you data ingestion to finish

assetupload.png

Step 13: Open the sharing options and share the table.

Step 14: Click on the table and import it.

Phitsanuloktableimport.png

Step 15: Use the code below to visualise the shapfile and use it for clipping. Fill appropriate values for the ??.

// import the dem
var dem = ee.Image("USGS/SRTMGL1_003")

// clip the dem
var demClip = dem.clip(Phitsanulok)

// set viz parameters
var viz = {min:??,max:??,palette:["??","??","??"]}

// add layer to map
Map.addLayer(Phitsanulok,undefined,"Phitsanulok")
Map.addLayer(demClip,viz,"dem Phitsanulok")

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s