Skip to content

Instantly share code, notes, and snippets.

@mapbutcher
mapbutcher / gist:5623849
Last active December 17, 2015 14:19
Python class which uses mapnik to create a static map based upon a coordinate.
import mapnik
from shapely.geometry import *
class StaticMap:
srs = '+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs'
wgs = '+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs'
stylesheet = 'REA_Bright_Local.xml'
markername = 'rea.png'
exportpath = 'output/'