Preamble
I work at an humanitarian NGO where we field map in various contexts, particularly in developing countries, and frequently with less GIS-focused users.
We needed a tool to subdivide an AOI into manageable chunks (tasks), which could be assigned to users within a larger team - acting as a coordination layer on top of the actual mapping. We developed such a tool in-house, after a thorough assessment of the options available in 2022.
Since then, the XLSFormsConverter(github(dot)com/opengisch/XLSFormConverter) plugin was developed, which is a big incentive to switch to using QField (in the humanitarian / development sector, may people are already accustomed to XLSForms syntax, from tools such as ODK in the ecosystem). It makes much more sense to contribute towards an already thriving QField community, and the wider FOSS4G community in general, than to develop our own bespoke tool.
(apologies for the lack of links here - as a new user I can only add two links per postâŠ)
What do we have now?
As part of the mentioned in-house tool (open-source), we developed an AOI splitter]( GitHub - hotosm/fmtm-splitter: A utility for splitting an AOI into multiple tasks. ). It uses PostGIS to take an AOI, and split based on criteria, for example:
- Download OpenStreetMap data for the AOI.
- Split the buildings being mapping by linear features that are not easily traversable in the field (such as highways, rivers, railways, airstrips).
- Further group the buildings into a specified âaverage number of buildings per task areaâ.
- Output a final task areas as a layer - we can change the colour based on the mapping status (the helpful âcoordinationâ part for users).
We would love to integrate this approach into QField somehow.
Example:
Options for integration into the QField ecosystem
There are many potential approaches to take, so I would really welcome feedback on which is most practical, feasible, and desired (to save us going down the wrong path!).
Note that each approach has varying degrees of feasibility using the pure PostGIS implementation for task splitting (as mentioned above).
We decided on using PostGIS, as this was integrated into a web app backend, backend by a database. PostGIS is super mature, performant, and ridiculously scalable.
1. As a QField plugin
- There seems to be some interest in project creation within QField: ideas(dot)qfield(dot)org/app-feature-requests/p/ability-to-create-new-projects-within-qfield-app
- That feature is probably some way off, so this probably wouldnât be the first candidate.
- It probably wonât work well porting to a plugin from PostGIS somehow (plugins are JavaScript I believe).
- Not the most realistic option, but noting it down in case project creation becomes a reality and this become the most user-friendly approach to project creation.
Note it would probably make sense to have a QField plugin for tracking task mapping progress once created, something documented here github(dot)com/hotosm/qgis-field-mapper/issues/17
2. As a QGIS plugin
- Using QGIS seems to be the most popular way to create QField project currently - itâs the most flexible and suited to advanced use cases.
- A plugin could be used to take an AOI layer, and subdivide into task areas.
- The problem of this approach is using the PostGIS splitting - we need to explore:
- Porting the PostGIS code to Python instead (makes sense a single user environment of QGIS, plus the libs already exist on the system).
- Requiring a PostGIS connection in QGIS (not user friendly).
- A SpatialLite shim or some other wizardry to run PostGIS directly from the plugin, e.g. via WASI (not keen).
- As mentioned, we often work with a less GIS-focused user base in developing regions (knowledge of tools like QGIS can be pretty good in communities such as OpenStreetMap chapters and universities, but cannot be guaranteed). This approach presupposes the user can use QGIS - a problem that can be solved through training though.
3. As part of QFieldCloud
- This would involve migrating the plugin from one Python/Postgres web app to another, so trivial implementation.
- The question is: is creation of projects from QFieldCloud a preferred option?
- Itâs available in QFieldCLoud due to bundled QGIS+PyQGIS, but do users actually use this approach much over QGIS?
- This would open a can of worms of needing to bundle a web mapping library (OpenLayers / Leaflet / MapLibre) to visualise the AOI and view the task splitting output, something that QFieldCloud doesnât have currently.
- Itâs probably the most user friendly approach though, and probably what I lean in favour of.
This would likely be a large overhaul of the âCreate New Projectâ page in QFieldCloud, adding options to upload an AOI file â> parsed via PyQGIS â> display on a web map. Then selecting options for task splitting, executing, and visualising the created task areas in the map.
4. As an external tool
- We could create these simple beginner friendly projects in an external web application, then export either via:
- QGIS project download (.qgz)
- Pushing directly to QFieldCloud via the [SDK]( GitHub - opengisch/qfieldcloud-sdk-python: The official QFieldCloud SDK and CLI ).
- The platform would be tangential to the QGIS / QField community, but not directly part of it.
Open to other ideas too! Thanks for your time reading this & for any input guidance you may have ![]()
