|
Nik2Img
Nik2img.pyA command line utility to take a cascadenik mml or mapnik xml file as input and output an image. InstallationTo run this program:
To Install manually:
$ tar xvf nik2img-*.tar.gz # * denotes the release number $ cd nik2img-* $ sudo python setup.py install To Install the latest release with easy_install do: $ sudo easy_install -U nik2img Test Installation of command-line script: $ nik2img.py # should be able to tab complete... $ which nik2img.py # should show install location $ nik2img.py -h # should display usage To run the full test suite for nik2img:
$ svn co http://mapnik-utils.googlecode.com/svn/trunk/nik2img/ nik2img-svn $ cd nik2img-svn $ python tests/run_tests.py Usage Examples
Output an 8-bit png image: $ nik2img.py mapfile.xml map.png -f png256 Loop through verbosely outputting all possible image formats and a custom tile size: $ nik2img.py mapfile.xml maps/ -f all -d 256 256 -v Generate a map in spherical mercator projection by supplying Long/Lat bounding box (of the United States): $ nik2img.py mapfile.xml mercator.png --srs 900913 --bbox -124.73 24.95 -66.96 49.37 -v Generate that same map in spherical mercator projection but by supplying the projected coordinates (in mercator): $ nik2img.py mapfile.xml mercator.png --srs 900913 --projected-extent -13885038.383 2870337 -7455049 6338174 -v |
Sign in to add a comment