After reading this document you should be able to create a simple rendered map using Python or C++.
TODO: add final rendered image
First of all you need to install Mapnik library to your system. There are to two basic ways to do it, you can either download binaries or build library yourself from source. Installation from soruce if far more complex and it documented in ..link to document...
Installation depends on your operating system and following sections describe this process.
Installing Mapnik on windows consists of following steps:
- Install prerequisites
- Download and unzip Mapnik binary
- Set your system and/or users environment variables
Each of this steps is explained in detail ..here..!
Most modern Linux distributions include Mapnik binaries in their repositories. Installation method depends your distribution:
Debian or Ubuntu
# aptitude install python-mapnik
Fedora
# yum install mapnik-python
Archlinux
# pacman -S mapnik
Dane Springmeyer kindly hosts and builds MacOSX Mapnik binaries, you can find more information on his download page http://dbsgeo.com/downloads/.
Easiest way to test if you have successfully installed and configured Mapnik is to start up your Python interpreter and try to import mapnik library:
$ python Python 2.6.5 (r265:79063, Apr 1 2010, 05:28:39) [GCC 4.4.3 20100316 (prerelease)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import mapnik >>>
If there are no errors or complaints, you're on the right track. You can also try to find out which Mapnik version are you currently running by executing following code:
>>> import mapnik >>> mapnik.mapnik_version() 701 >>>
That's it you are ready to create your first map using Python scripting language.