Google Drive is a popular data sharing platform from Google. I have been using it for many years to keep some data in particular the data that I want to share with others. I'm sure that many people also using Google Drive out there including you. There are many kinds of data that can be stored in Google Drive like document, image, music, and many more including GIS data. If we want to share the data, simply it can be done in the sharing option to get a sharing link and then we send the link to other people which allow him/her to access the data.
Access GIS Vector Data From Google Drive
Figure 1. Save/Export data into another format in QGIS
3. The Save Vector Layer as... window will be shown as in figure 2.
In the Format option select GeoJSON and in the
File name, specify the output path and also the name of output file.
If you want to change the coordinate system, define it in
Figure 2. Export/Save data into GeoJSON
Upload the data into Google drive. Then set the sharing option for the file. Right click the file in the google drive and select Share as seen in figure 3.
Figure 3. Share a file in Google Drive
Under Get Link part, click Change. The Get link menu will
appear as in figure 4. Select Anyone with the link and set is as
Viewer. Based on the sharing setting, a sharing link will be created.
Copy it by selecting Copy link.
|Figure 4. Change file sharing option|
The sharing link will be look as follow:
We already have a sharing link, but we can't use it to access the shared data in QGIS. We have to modify it a little bit to be like the following format. Be careful not to to change the red highlighted text. Because that is the file ID and it's unique for each file.
Now let's try to open the shared data in Google drive with QGIS. Select
Data Source Manager, and choose Vector on the left menu. In
the Source Type option select Protocol: HTTP(S), cloud, etc.
Under Protocol select GeoJSON for Type and in the
URI fill in with the modified google drive sharing link. Finally push
Add button. See figure 5.
|Figure 5. Open GeoJSON data from Google Drive|
Figure 6. GeoJSON data from Google Drive added into QGIS map canvas
Open GIS Raster Data From Google Drive
After opening directly a vector data from Google drive. Now let's try to open raster data. The main steps are the same with the previous step. Here we need to upload a raster data in geotiff format into google drive and set and modify the sharing link to be as follow.
Open Data Source Manager again. Now select Raster, then
choose Protocol: HTTP(S), cloud, etc. Under the
Protocol, select HTTP/HTTPS/FTP in the Type option and
in URI parameter fill in with the modified raster sharing link as in
|Figure 7. Open Raster data from Google Drive|
Figure 8. Geotiff data from Google Drive added into QGIS map canvas