Instructions on how to use QGIS or Google Earth Engine (GEE)
Click on the "Layer" menu bar option which will pop various options to choose from
Select "Add Layer" and choose the type of layer you want to add
You can also use the toolbar tool to add the layer from there
After clicking the tool / Add layer from the menu bar this dialog box appears from where you can select the different type of layers
Click on ... button to choose the layer path
Add the layer in the QGIS
Adding a layer "Administrative Boundary: Gaya" to the QGIS
From the Layers Panel, Select 1. Add Group or Right Click on the Panel area and click on Add Group, it will create groups in the Layers Panel where we can arrange the layers.
You can drag and arrange the groups as per your need
Select the Raster option while adding the layers
Select the raster layer from your path
Add it to the layers in QGIS
You can see all your layers in the Layer Panel on the left.
The layers can be dragged and arranged in different groups and you can show / hide a selected layer by clicking on the checkbox [Linux, Windows] or on the eye [macOS]
In case you are not able to see the "Layers Panel", you can click on View in the menu bar and from there hover on to Panels and then select Layers from there
We upload layers in the Google Earth Engine Assets. The assets are either in the format of shapefiles / zip of shapefiles / CSV / as Tables or GeoTiff / TfRecord as Image.
Our generated layers are of GeoJSON format.
We will first convert this into required format (Shapefile in our case)
We can either use a 3rd party website [mapshaper] for the conversion or use the QGIS Desktop to export the given layer to the required format
We can then upload the shapefiles / GeoTiff files as Table / Image in the GEE Assets
Click on select and choose the GeoJSON file you want to convert
After selecting the GeoJSON file a pop up will appear
Checkbox detect line intersections
Click on Import
The GeoJSON layer will appear
From there you can select on Export and a dialog box will appear
Select Shapefile option from the given options
And click on Export button
Choose the location where you want to save the Zip file
Similarly, we can use QGIS Desktop to export a GeoJSON layer in the Shapefile file format
Right click on a layer in the Layers Panel inside QGIS Desktop
Select Export > Save Feature As ...
A new window will appear, click on the Format and select ESRI Shapefile from the list of options
Choose the path where you want to save the Shapefile
Click on Ok button
Import shapefiles as assests in GEE
Click on Assets inside Google Earth Engine code editor
Click on New and a sheet will appear
Select "Table Upload" and click on Shape files
Select the Zip Shape file from the path where you saved the shape file earlier
Click on Upload
NOTE: You can keep the Asset Name as you want. By default it takes the name of what the zip file is named.
Once clicked on Upload you can see the task running in the right panel of the code editor
From the Assets Panel on the left sidebar click on the right arrow to import the layer in your script
You can see the imports you made on the top of the script
In line 1, we imported the asset from the table
In line 2, we added the layer on the map
You can see the map beneath the code editor after you click on "Run" button once you write these lines
Similarly, we can upload a GeoTiff file in the assets of the GEE
Once the assets are uploaded you can import them as image in your code editor by clicking on the right arrow
You can see the arrow as you hover over the asset on the left sidebar of Assets Panel
You can see the imported assets as image on top of your code editor
Name the variable as you want, gaya in this case
In line 1, we are adding the raster layer on the map beneath the code editor which you can see after you click on the Run button