MongoDB in QGIS

28 Dec
Displaying my MongoDB Data

Displaying my MongoDB Data

I recently installed the MongoDB Plugin for QGIS. The plugin allows you to connect to a MongoDB and load your data. I stored point data – long and lat – for all the public art in Albuquerque. Using the plugin, I connected to my MongoDB and loaded them.

I had trouble getting the plugin to install. My fix was to install pymongo and BSON to my local Python2.7 then copy it from the site-libs to the QGIS directory (C:\Program Files\Quantum GIS Lisboa\apps\Python27\Lib\site-packages). then I had to turn on the plugin under manage plugins.

This did the trick. Then I fired up my mongod, loaded QGIS and connected using the defaults. It prompted me for a Database and then a Collection. Looks like it requires a GEO2D. You can see my data in the image above.

Can’t wait to start playing….

Advertisements

9 Responses to “MongoDB in QGIS”

  1. Nicole Sigaud June 5, 2014 at 12:43 pm #

    Please could you put this MongoDB plugin available? The original source is gone by now, and there are some people, including me, who are dying to use it. All links to the plugin are dead… If you prefer, please send me by mail (nicole-dot-sigaud-at-gmail-dot-com)

    • paulcrickard June 5, 2014 at 1:00 pm #

      I do not have it. I looked for it again because someone else also wanted it, but looks like the Repo is gone. I did not write the plugin and am not sure who did.

      • Nicole Sigaud June 5, 2014 at 1:27 pm #

        😦 I thought you would still have the installer, but it’s OK. Thanks for the response. Cheers

    • paulcrickard June 5, 2014 at 2:58 pm #

      Found it! Will email shortly.

      • Bernd February 20, 2015 at 9:37 am #

        hi – I am also looking for the installer. could you mail it? Thanks in advance.

      • paulcrickard February 20, 2015 at 6:21 pm #

        What is your email Bernd?

      • Alexandru July 22, 2015 at 9:09 am #

        Hi Paul! Could you please help me with the MongoConnector plugin for QGIS. I was able to connect to MongoDB but I get the following error “Can’t add layer! Collection or collections geometry is improper” Any help will be appreciate it 🙂

      • paulcrickard July 22, 2015 at 1:03 pm #

        The only thing I can think is you need to have a spatial index on the DB:
        db.publicart.create_index([(“loc”,GEO2D)])
        And then you would create a record with (LAT,LONG)
        db.publicart.insert({“loc”:[35.1555,-106.591838],”name”:”Almond Blossom/Astronomy”,”popup”:”http://farm8.staticflickr.com/715″})

        Maybe you are in a different projection when you load?

        Hope one of these two things helps.

  2. Akbarali April 24, 2015 at 10:30 am #

    Hi, I am also looking for the installer. Could you please mail it ? Thanks in advance.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: