Get started with QField cloud
Tags: qfield, qgis, gis
Published: 2023-07-26 12:39:30

Web and Desktop Opensource Geographic Information System (GIS) softwares are growing fastly and offers many analysis solutions.
However, on-field data acquisition solutions should also take into account.
Let's try one of those solutions called QField.

### What's QField?

QField is an OS/Android/Windows GIS app where we can process field work.
Concretly, geospatial data can be digitalized, edited and well managed.

https://qfield.org/

### And QField cloud?

Qfield projects can be cloudly stored like Google Drive.
It allows to be synchronized, be accessed by multi devices and/or users, and also to work on-field even offline.

https://qfield.cloud/

### QField sync to manage field projects

QField sync is a QGIS plugin that allows to manage plugin projects on QGIS.
This is the strongest point of QField because it opens field data to whole GIS great functionalities.

https://plugins.qgis.org/plugins/qfieldsync/

![QFieldsync](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k1v5lt1h46y9ohh5megh.png)

### To summarize QField work architecture

This architecture allows to work from QGIS and QField application by a syncronization logic like GitHub.
![QField work architecture](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/19atjm3jcdcm5v32c8qr.png)


## 1. Setup

Many steps have to be done to create an operational QField project.
You can follow detailed steps from [QField website](https://docs.qfield.org/fr/get-started/tutorials/get-started-qfc/), but it may be good to also have a look in below summary to understand easier how it works.

1- On Web browser:

- If you don't have a QFieldCloud account, sign up
- Login to your account and create a project

2- On QGIS:

- install QFieldSync plugin
- login to your QFieldCloud account 
- retrieve project created in QField cloud and synchronize 
- add data, configure and design it
- synchronize (Push to cloud)

3- On field device (smartphone, tablet etc.)
- install QField application
- login to your QFieldCloud account 
- retrieve project created in QField cloud and synchronize 
- start your field work!



## 2. Use case: Locate vending machines with QField

Japan is full of drink vending machines, but density becomes low when going to countrysides.
Bad experiences occured when running long distance in summer, or when simply want to have a coffee break with no store and café around.

![Vending machine japan](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/58gjyetaujcl55vk3hv3.png)

Project idea is to gather location of vending machines (and also toilets and stores) to be a good companion for runners, hikers and cyclists.

Here is how I getted started step by steps.

### Prepare project layers on QGIS and push to cloud

Layers : 
- vending_machine
- toilet

![Layers Preparation](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m8e9bhhfk165zol94gzn.png)

Push to cloud:
clic on synchronize

![Synchronize](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sqqmet6vo9j3mwcb1cqa.png)

check and perform actions
![before synchronize](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2a8lhhb5isi50mgyk0yo.png)




### Survey with QField

Let's run on the road and add feature when find a vending machine.
- On QField, retrieve target project.

- Turn in editing mode

![Turn editing](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qpzb4mltkqhktjcpo2ne.png)

- Target point can be fit to current position, and feature is added with following buttons

![Survey buttons](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/45al3ff5acqr8x7hkzvf.png)

- Populate attributes and save

![Populate attributes](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q0wnkpws1fczk44gqwz6.png)

- Once finished, edited features (here 5) can be push to the cloud as shown

![Push Editing](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d8jxrivcsbycvg87bkw1.png)

- Choose push only or synchronize
![qfield sync](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y3katju2ltekd15wnyqh.png)

### Get surveyed data on QGIS

On QGIS, clic on synchronize button :

**Be Careful to the stream way!**
I synchronization frame, upload is displayed, but in that case we need to download surveyed features from cloud.
Click on `Prefer Cloud` before `Perform Actions` .
Action list should be turned on _Download_
![download way](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p8sc3ewo25f9xpqo9lhv.png)


Well done!
![QGIS result](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qu36irt7jgb2lt64nclz.png)
Only 4 refresh spots and 5 vending machines were found after run 4 kilometers by 35°C...


## 3. Issues encountered

This section to summarize issues encountered and its solution if any.
It may be a technical issue or something I missed when setting parameters.
To be updated as far as I use.
Any suggestion is welcomed.

### [enhancement] detect appropriate upload/download way
as written above
![download way](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p8sc3ewo25f9xpqo9lhv.png)

### Dropping feature on QField device may not be detected when synchronizing in QGIS

Context
-  Point layer named `store` has been added.
- 1 feature has been added on QGIS at the same place of toilet


![add store](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8f21wyksmvq3mjxs1a67.png)




- Feature has then been dropped in QField...

![store drop QField](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9lsbzkihq0pk1abgl2ll.png)

- ...but editing cannot be detected on QGIS side.

![store is missing](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6bt1h60tyocu1pnd30fi.png)