I recently had the need to plot geographic data stored in MongoDB on a map. The data are points (latitude and longitude) for a project at WHERE, Inc. I was using Quantum GIS and the “Delimited Text” plugin that lets you load CSV files (back in the day of ArcView this was called adding an “Event Theme”). So the process was to export the data from MongoDB into a CSV file, editing that file so that latitude and longitude are separate columns, and then loading this edited file into Quantum GIS. This was fine once, maybe twice, but after that I was looking for a more automated solution. The result of this motivation is my MongoDB plugin for Quantum GIS.
Writing the plugin has been a bit of a challenge because I have not used Python before. A big thank you goes to Jason Sundram for helping me get up and running with Python. After getting past the python learning curve, I encountered some specific issues with PyQt. I.e., I was not able to install PyQt on OS X (I had to turn to Ubuntu) and that I found the buttons would fire a click event twice (I worked around it by using the “released” events instead). Overall, the plugin is simple. It lets you connect to MongoDB and load all the records in one collection as a layer to the map. There is no support to dynamically load content based on the map view and no writing to MongoDB. The plugin makes use of the PyMongo library, a Python driver for MongoDB.