Mergin Maps and DB Sync

Mar 8, 2024 | MerginMaps, QGIS

I don’t know if I would label this exercise as fun but I’ve learned alot.

I don’t do a ton of data collection these days. At one time a few years ago I was out in the field with Fulcrum, a laptop, and sketchy internet for days at a time. These days I’m hardly ever without internet for long.

I’ve been using Mergin Maps (hint I’m a BP) and I’ve been learning the ins and outs of data collection with QGIS. My general thoughts on data collection is collect everything you need to collect as quickly as possible. Don’t lose anything. Don’t over collect. Come back in and integrate that data with your important data. Build a Process.

Not to bore you with all the fun but the current question is “Can we collect data and have it magically appear back in our postgresql database?”. Why yes – yes you can. That magic is called DB Sync. DB Sync provides that magic bridge.

With Mergin, You go out and collect data and sync it back to the cloud. Crank open QGIS and sync it back to your desktop. DB Sync takes that process and goes from field back to database if that’s what you need. It also can go back into a geopackage.

In the example below I collect one data point in Mergin on my phone. I hit Sync. In a few seconds the data appears in the database. I could collect data on my desktop and the reverse happens – data from the database appears on my phone. So below you see my phone, qgis, and DB Sync running in Docker creating that magic bridge.

Going back to my overused tn 911 example – you can go out and collect “things”: Structures, fire hydrants, whatever, and it all goes back to the database as you get internet access. Is DB Sync a magic bullet? Sort of. I did have a few problems but honestly I believe they are problems of my own design. It has been a blast learning how it works with QGIS and Postgresql. To collect data and have it magically appear in the database sitting on a box 6 feet behind me is pretty awesome. Check out QGIS. Check out Mergin Maps.

You may also like

PostgreSQL Notifications and QGIS

PostgreSQL Notifications and QGIS

This usually turns up in the QGIS world every two years - So it's my turn to talk about it. This month I did an emergency install of the TN 911 database. Basically client had a problem, we solved it in the most elegant way possible, and I'm still sorting out a few...

First install of the new TN 911 Database

First install of the new TN 911 Database

If you're just tuning in I built a postgis database for the TN NG 911 project. What this has turned into is "small counties who can't/don't want to run with an ESRI solution". I posted the code up on github (and I realize every day I suck at github). So what did I...

QGIS2Web and the Hunt for Bike Lanes

QGIS2Web and the Hunt for Bike Lanes

I was teaching a QGIS class a while back and at one point the discussion drifted into "So this OpenStreetMap thing" and I discussed how I enjoy making edits. Eventually it turned to "I'm trying to get Chattanooga's Bike Lanes into it in my spare time". One thing led...