<s> import mapnik <EOL> srs = '<STR_LIT>' <EOL> m = mapnik . Map ( <NUM_LIT> , <NUM_LIT> , srs ) <EOL> m . zoom_to_box ( mapnik . Box2d ( <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> ) ) <EOL> hillshade_lyr = mapnik . Layer ( '<STR_LIT>' , srs ) <EOL> hillshade_raster = mapnik . Gdal ( <EOL> file = r'<STR_LIT>' ) <EOL> hillshade_lyr . datasource = hillshade_raster <EOL> hillshade_rule = mapnik . Rule ( ) <EOL> hillshade_rule . symbols . append ( mapnik . RasterSymbolizer ( ) ) <EOL> hillshade_style = mapnik . Style ( ) <EOL> hillshade_style . rules . append ( hillshade_rule ) <EOL> m . append_style ( '<STR_LIT>' , hillshade_style ) <EOL> hillshade_lyr . styles . append ( '<STR_LIT>' ) <EOL> topo_lyr = mapnik . Layer ( '<STR_LIT>' , srs ) <EOL> topo_raster = mapnik . Gdal ( <EOL> file = r'<STR_LIT>' ) <EOL> topo_lyr . datasource = topo_raster <EOL> topo_sym = mapnik . RasterSymbolizer ( ) <EOL> topo_sym . opacity = <NUM_LIT> <EOL> topo_rule = mapnik . Rule ( ) <EOL> topo_rule . symbols . append ( topo_sym ) <EOL> topo_style = mapnik . Style ( ) <EOL> topo_style . rules . append ( topo_rule ) <EOL> m . append_style ( '<STR_LIT>' , topo_style ) <EOL> topo_lyr . styles . append ( '<STR_LIT>' ) <EOL> m . layers . append ( hillshade_lyr ) <EOL> m . layers . append ( topo_lyr ) <EOL> mapnik . render_to_file ( m , r'<STR_LIT>' ) </s>
