Announcing QMap: A simple data collection application using QGIS


I would like to announce QMap: A simple data collection application built using QGIS and Python.

QMap is a QGIS based field data collection application that was built by myself and a work college at Southern Downs Regional Council.  QMap is now opened source under the same licence as QGIS, GPLv2.  The project homepage can be found at http://nathanw2.github.com/qmap/ and source at https://github.com/NathanW2/qmap.

Before I go into to many more details I will preface with: The application is currently under active development and as such there might be bugs or little rough bits that I haven’t cleaned up yet. However having said that, the program is functional and we are using it at work for the purpose it was built.

Features

  • Simple to use
  • Simple to manage
  • Simple to install
  • Forms built using Qt Designer
  • Loads normal QGIS projects
  • Anything QGIS supports QMap does too (snapping, PostGIS, etc)
  • It’s just QGIS with a tablet friendlier interface.
  • Syncing support (MS SQL 2008 only at the moment)

The Story

The program was developed after we looked around and decided that nothing really fit our needs quite right and to our satisfaction. (Within budget of course)

We had a list of, I think simple, requirements:

  • Must be simple to use by field staff
  • Can deal with complex or simple forms
  • Fully offline but with a syncing option
  • GPS support
  • Easy maintenance

The first point for me is a big one.  I have a seen a lot of data collection applications and unfortunately this is where I feel a lot of them fall down.  Most seem to be designed with people like me in mind, people who understand computers, understand menu systems, etc. If you work in local government or with an older age group of outside workforce you will know that this assumption doesn’t hold true.   Most of our field staff are not computer people, a few don’t even have home computer, expecting them to navigate a menu just to enable the GPS, or click on a small 16×16 pixel icon, on a tablet PC is not a option.

I decided to take the same approach as QGIS and use Qt Designer to build the forms. Why invent another tool? Using Qt Designer can also give us the flexibly of creating simple or complex forms in our own layout.

We do have pretty good 3G connection coverage over our region however we only have limited bandwidth to play with and having a solution that is full connected doesn’t really give the best user experience.  I would rather just store everything locally on the device and then sync when needed.  As all our layers are stored in MS SQL Server 2008 for the syncing we decided to use .NET Sync framework.  I would love to have sync support for PostGIS, Spatialite, or any other normal files, but it was out of scope for the project (at the moment).

For me easy maintenance means two things: not having to deal with crap loads of configurations; and having the power to change what I don’t like. For the first point I’m a big fan of convention over configuration.  I like to just drop stuff in a folder with a certain naming convention and it should just pick it up and work.  This also goes for the form bindings, just name the control the same as the field in the layer and QMap will bind it for you.  If I can follow a convention for things I have. Conventions make setup easier and consistent.

Once you have tasted the open source kool aid it can be quite hard to go back. Knowing that if there is a bug in QGIS I can fix it to make my project better is a comforting feeling.  There is also the lack of licence fees which makes open source very attractive for jobs with small budgets.

How does it work?

At the moment the core of the application is built as a QGIS plugin, however there is one little trick here that is worth mentioning. QMap is really a script that loads QGIS and sets the –configpath in order to load all the QGIS settings from a supplied path, inside the supplied path is the plugin. Think of it as a sandboxed QGIS which only loads the QMap plugin.  I’m also using the new customization function to remove all unneeded interface items.

Notes

Here are some notes worth bring up:

The application is still under development so things might change.
There is only point support at the moment, although adding line and region support wouldn’t be hard.
Syncing only works using MS SQL 2008 and the code is a bit rough. Will be cleaned up over time.
The build script only works on Windows and there is some win32 stuff for power management in the code. This is not because I don’t want to support the other platforms just that it was out of scope at work.
You need to be using the latest development build of QGIS (qgis-dev for those using OSGeo4W) this is because there have been a few bug fixes that make the application work as expected that aren’t in 1.8.

19 thoughts on “Announcing QMap: A simple data collection application using QGIS

  1. Dear Nathan, Im really excited about this new app. I am an ecologist and always struggle to collect data in the field using complex forms and live GPS. Currently Im using ArcPad but it has its limitations. Will QMap allow you to have subforms where several records can be linked to a single spatial and temporal point?
    Im not much of a computer wiz and I do not have access to .NET and SQL server, how long do you think it will take to develop a version of QMap that can be downloaded straight onto windows for dummies like me?

    1. Hey Yolanda,

      I have thought about subforms and I’m sure they will make it in at some stage just no ETA at the moment.

      As QMap is just QGIS with a more tablet friendly interface you can just use any data source QGIS supports, not need for .NET or SQL Server. If you would like to use shapefiles just make a copy on the device and create a project that uses them, want to use Spatailite you can do that too. We only use SQL Server because we have to not because I want to. See https://github.com/NathanW2/qmap#id9 for how you can layout your data if you want to use shapefiles.

      I plan on adding a switch that you use to turn off the .NET stuff and SQL Server stuff, will let you know once that is done.

  2. This may be helpful to others trying to setup (I think) http://trac.osgeo.org/osgeo4w/wiki/ExternalPythonPackages …I had to install nose. Currently stuck on `File “build.py”, line 11, in
    from PyQt4.QtGui import QApplication
    ImportError: DLL load failed: %1 is not a valid Win32 application.` Will file issue on GitHub. I think a little more guidance on setup/install would be helpful, but I understand things are still under active development and a little rough :-)

    1. Thanks for the report Joe. I have removed the need to have nose installed now. I might add it in back later but for now I don’t really need it in there.

      That is a strange error. Can you give me some more details on the GitHub issue entry.

      Yeah more setup and install docs will be coming hopefully soon.

  3. Nathan. Nice work!

    Some questions:
    * Why can’t we edit lines and polygons, please be technical with me as maybe I’ll get involved!
    * What about images, have you thought about adding the ability to capture them?
    * How does the data sync work, can it go one way/both ways/merge and resolve differences?

    1. * Why can’t we edit lines and polygons, please be technical with me as maybe I’ll get involved!

      Nothing really stopping it I just haven’t got time at the moment and work didn’t need it. You would just need to create a new line and polygon capture map tool (easy) and create a new way to handle in the UI. As most tablets don’t have/or have limited right click you would have to create a way to handle the drawing and finishing the line without double or right click. I have considered maybe having a Finished Drawing button that you can press to finish the line/polygon.

      * What about images, have you thought about adding the ability to capture them?

      Yeah I have thought about it, just didn’t add it as again we don’t need it at work. I’m sure it can be done although I don’t know if there is a “Qt” way and you might have to do it per device, not sure yet.

      * How does the data sync work, can it go one way/both ways/merge and resolve differences?

      – one way
      Yes
      – both ways
      Yes
      – merge and resolve differences
      Not at the moment. Currently the code is just in a “server always wins mode” but I’m sure you could do something to handle it. If you can use PostGIS you could always integrate with the PostGIS versioning plugin.

  4. Hi Nathan, this looks interesting! I am wondering if anyone in the community is moving towards data collection from mobile apps? If QGIS could consume even simplistic field data from something like Fulcrum or Geopaparazzi it would be very useful, too! Thanks for your hard work on this.

    1. There is currently a QGIS Android GSoC project that is building a better UI (more Android style) using QML. So far it’s only very simple but is looking good. Once that gets bit more mature I would be keen to build something that is mobile device based.

      I only just found out about Geopaparazzi, looks pretty interesting.

  5. We wuld like to use this saftware in our day2day survay operation but we don’t seem to understend how to preform the installetion – we have QGIS-Mobile installed on one of our Samsung-Note NG7000 running Android 4.0.4.
    Is there a step-by-step setup instracture

  6. A little late to the party..
    The project looks interesting, however as others have asked;
    HOW do I install it?
    I’m running QGIS on Windows…
    I’ve downloaded your package, however no clue about how to install it.

    thanks!

Leave a reply to Nathan Cancel reply