Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
experimental mapnik datasource plugin to mongodb
Branch: master
Pull request Compare This branch is 34 commits behind springmeyer:master.

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
test
.gitignore
Makefile
README.md
build.py
mongo_datasource.cpp
mongo_datasource.hpp
mongo_featureset.cpp
mongo_featureset.hpp
notes.txt

README.md

mongo mapnik plugin

This is a experimental connector to mongodb point data in the form of a mapnik C++ plugin.

It is only a proof of concept at this point.

Setup

1) Install mongodb - you need libmongoclient (c++ lib)

Recommended to install from https://github.com/mongodb/mongo.git

git clone https://github.com/mongodb/mongo.git
cd mongo
scons install .

I had to edit a few paths in SConstruct to get it working....

More details at http://www.mongodb.org/pages/viewpage.action?pageId=21266598

2) Start mongodb

In another terminal:

mkdir db
cd db
mongod --dbpath .

3) Import a shapefile

In another terminal:

cd test/
python import.py

4) Run test.py

cd test/
python test.py

Trouble

If you get:

RuntimeError: field not found, expected type 2

It likely means you don't have a proper 2d index created.

Something went wrong with that request. Please try again.