Created
November 14, 2011 17:12
-
-
Save skorasaurus/1364479 to your computer and use it in GitHub Desktop.
python script for mapnik [xml]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import mapnik2 | |
mapfile = 'barsoob3.xml' | |
map_output = 'mapnikxmloutput.png' | |
m = mapnik2.Map(800, 600) | |
mapnik2.load_map(m, mapfile) | |
bbox = mapnik2.Envelope(mapnik2.Coord(-81.738, 41.435), mapnik2.Coord(41.459,-81.6723)) | |
m.zoom_to_box(bbox) | |
print "Scale = " , m.scale() | |
mapnik2.render_to_file(m, map_output) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment