Overview

Mapnik supports a Plugin architecture read access to a variety of formats.

Some plugins have been written in C++ and require no external dependencies, while others require access to a supporting C or C++ library (like libpq for postgis/postgresql and libgdal for gdal/org support).

Interested in developing a new plugin see: DevelopingPlugins

All current plugins are located in source:trunk/plugins/input/

Name Availability Status Built by default Notes
postgis 0.2.0 Stable yes support for accessing geospatial data through PostGIS, the spatial database extension for PostgreSQL
raster 0.2.0 Stable yes stripped or tiled raster TIFF image dataset support
shape? 0.2.0 Stable yes vector SHP (ESRI Shapefile) parsing
gdal 0.5.0 Beta no support for GDAL datasets
ogr 0.6.0 Beta no support for OGR datasets
osm 0.6.0 Beta no support for reading OpenStreetMap? (OSM) xml datasets
sqlite 0.6.0 Beta no support for sqlite (SQLite) / spatialite (Spatialite) sql vector format
occi 0.6.0 Beta no support for oracle spatial 10g (versions 10.2.0.x) (Oracle Spatial) sql vector format
kismet SVN Alpha no support for kismet GPS support (Kismet); shows little WLAN nodes on the map
rasterlite? SVN Experimental no support for Rasterlite (Rasterlite) sqlite raster with wavelet compression

Note: When compiling Mapnik from source only the PostGIS, Raster, and Shape plugins will be compiled by default.

To request additional plugins to be compiled and installed make sure you have the required dependencies and then specify the list of plugins for SCons to build:

# attempt to build all plugins possible
$ python scons/scons.py INPUT_PLUGINS='all'
# build just the postgis plugin:
$ python scons/scons.py INPUT_PLUGINS='postgis'

Querying plugins

If you compiled Mapnik with DEBUG=True, then the list of plugins registered by the python bindings will during initial import:

Python 2.5.1 (r251:54863, Jan 17 2008, 19:35:17) 
>>> import mapnik
registered datasource : gdal
registered datasource : raster
registered datasource : shape

Otherwise, get a listing of available plugins with this command:

$ python -c "from mapnik import DatasourceCache as c; print ','.join(c.plugin_names())"

These are the registered datasource plugins that Mapnik's python binding currently knows about.

TODO: Propose icons at OSM