Collecting GIS Data in the Field Using QGIS and QField

Jeff Oppong

Updated:

GIS users are not always stuck at their desks, creating geospatial data and making maps. Sometimes field GIS data collection is a necessary part of the job. The broader QGIS ecosystem offers QField, a smartphone app that extends the capabilities of QGIS into the field, acting as a mobile companion that enables in-situ data collection and editing. QField was developed by  OPENGIS.ch and released under a GNU Public License (GPL).

Using QField to synchronize GIS data collection with QGIS

QField is designed to seamlessly work with QGIS projects. This means that users can prepare a QGIS project, including layer symbolization, and then easily transfer the GIS data and map project to QField on their mobile devices. While out in the field, data can then be added or modified before being synchronized back into the QGIS desktop application.

What is covered by this QGIS and QField tutorial

For this tutorial, an area of interest (boundary with MB satellite imagery tiles) was defined in QGIS, covering the area where field data will be gathered. The MB tiles help to visualize the region of interest by using high-resolution satellite imagery. Point vector feature data was created for collecting the spatial-attribute information (name of school, website of school, and contact of school) for schools in the region of interest.

The Qfield sync plugin in QGIS helped to set preferences that guided the data collection tour after installing Qfield app on a mobile phone device. The mobile smartphone app (Qfield) was used for collecting the necessary data along with their attributes. After data collection, the Qfield app was synchronized with QGIS to visualize the data collected from the field. 

Defining a geographic area of interest and preparing QGIS project files 

  1. Open and create a new Project in QGIS.
  2. Save the project using the Save as command from the Project tab. 
  3. From the Browser window, right-click on XYZ tiles and select “New connection” to import a Google satellite image base layer. 
  4. Set Name to Google satellite and set the URL to https://mt1.google.com/vt/lyrs=y&x={x}&y={y}&z={z}.
  5. Click Ok. 
Screenshot showing the interface for setting up the ability to view Google satellite images in QGIS.
Figure 2: Creating a new tiles connection for Google Satellite.
  1. From the Plugins tab on the menu bar, select “Manage and install plugins.” 
  2. From the search bar on the Plugins window, type and search “Geocoding” and select Install.
Screenshot showing the geocoding plugin for QGIS.
Figure 3: Installing the geocoding plugin.
  1. From the Plugins tab, select geocoding. A search window appears. Enter the area where the field data collection is to be conducted and click Ok. 

A new polygon shapefile layer is created to define our boundary:



Free weekly newsletter

Fill out your e-mail address to receive our newsletter!
Email:  

By entering your email address you agree to receive our newsletter and agree with our privacy policy.
You may unsubscribe at any time.



  1. From the layer tab, select “Create layer.”
  2. Select “New shapefile layer.”
  3. Set “File name” to boundary. 
  4. Set “Geometry type” to polygon.
  5. From the “New field,” set “Name” to Name and click “add to fields list.” 
  6. Highlight “Id” from the fields list and click “Remove field.”
  7. Click Ok. 
  8. Select Boundary from the Layers panel and toggle editing by clicking on the light yellow pencil. .
  9. Click on “Add polygon” and hover the mouse over the region of interest to digitize. 
  10. Specify name as boundary and click Ok. 
  11. Right-click on the boundary layer from the Layers panel and select properties.
  12. From the “symbology” window, set the “symbol layer type” to outline: simple line and click Ok. 
Screenshot showing the symbology settings for a layer in QGIS.
Figure 4: Setting the symbology of the boundary layer in QGIS.

To create a point feature layer for schools in QGIS:

  1. Select “New shapefile layer.”
  2. Set “File name” to schools. 
  3. Set “Geometry type” to point.
  4. From the “New field,” set “Name” to Name and click “add to fields list.” 
  5. Highlight “Id” from the fields list and click “Remove field.”
  6. Set “Name” to Contact, type to “integer,” and click “add to fields list.” 
  7. Set “Name” to Website, type to “text (string),”length to 400, and click “add to fields list.” 
  8. Click Ok. 
Screenshot showing how to create a new shapefile layer in QGIS called schools.
Figure 5: Creating a new shapefile layer for schools in QGIS.

To style the school layer:

  1. Right-click on the school layer on the Layer panel.
  2. Select Properties. 
  3. From the Labels window, select “Single labels.”
  4. Set value to name. 
  5. Check the “draw text on buffer” from the buffer window.
  6. From placement window, set distance to 3.
  7.  Click Apply.

Next, save a high-resolution image for our area of interest that will be a base layer along with the boundary layer during data collection:

  1. From the menu toolbar, select “Processing.”
  2. Select Toolbox.
  3. Select Raster tools and select “Generate XYZ tiles (MBTiles).”
  4. Set minimum zoom to 18.
  5. Set DPI to 300.
  6. Set Tile format to JPG. 
  7. Set Quality (JPG only) to 85 and specify output. 
Screenshot showing the generate MB tiles interface in QGIS.
Figure 6: Generating XYZ tiles (MBTiles) for area of interest in QGIS.

To install Qfield sync plugin in QGIS:

  1. From the Plugins tab on the menu bar, select “Manage and install plugins.” 
  2. From the search bar on the Plugins window, type and search “Qfield sync” and select Install. 
  3. From Plugins tab, select Qfield sync. 
  4. Select preferences.
  5. Set your “default packaging import directory” and “default packaging export directory.”
  6. Click Ok.

Installing Qfield on a smartphone and synchronizing with QGIS

  1. From Plugins tab, select Qfield sync. 
  2. Select Qfield sync. 
  3. Select “Package Project for Qfield.” Be sure to specify the same directory as the “default packaging export directory.”
  4. Click Create. 
Screenshot showing the interface for packaging a project from QGIS for the QField app.
Figure 7: Packaging project for Qfield app.

For this task, I used an iPhone for the field data collection although synchronizing a QGIS project can be done with Android devices and other cloud-based storage options. Visit the QF Field support documentation page for more help.

  • I logged into my iCloud with my login details. From my iCloud drive, I created a new folder and uploaded all the field data files generated after packaging my project for my Qfield phone app; Google satellite, point school feature, and boundary. 
  • On my iphone, I installed the Qfield app from app store and moved the folder created for my project from my icloud into my Qfield working directory. 
  • From the Qfield app, I clicked “open local file” to access my project files and import them unto Qfield.
  • From the schools layer, I toggled digitizing mode and began to select the schools over my area of interest (AOI). I clicked on the green plus to begin keying in details about the building; name, contact, and website.
  • Once I was done, I copied the project files from Qfield directory from my phone onto the “default packaging import directory.”
  • From the plugins tab, I selected Qfield and selected “Synchronize project.” I set the directory to “default packaging import directory” and clicked synchronize to import the project files back into QGIS. 

The GIS data and attribute information collection in the field can then be resynchronized back with the applicable QGIS map project.

The GIS data I collected using QField now looks like this in QGIS.

More QGIS tutorials

Photo of author
About the author
Jeff Oppong
Jeff Oppong holds a BSc in Geomatic Engineering and currently a graduate student at Hohai University in China, where he's studying MSc. Harbor, Coastal, and Offshore Engineering. Jeff is a prolific researcher and a GIS/Remote sensing expert who aspires to be a change-agent and a renowned Engineer. Jeff Oppong can be contacted via email