define projection objects before transform to ensure they stay in scope
This commit is contained in:
parent
57c99a69a2
commit
c92c8f1bfd
1 changed files with 4 additions and 2 deletions
|
@ -156,8 +156,10 @@ def test_raster_warping():
|
||||||
_map.append_style('foo', style)
|
_map.append_style('foo', style)
|
||||||
lyr.styles.append('foo')
|
lyr.styles.append('foo')
|
||||||
_map.layers.append(lyr)
|
_map.layers.append(lyr)
|
||||||
prj_trans = mapnik.ProjTransform(mapnik.Projection(mapSrs),
|
map_proj = mapnik.Projection(mapSrs)
|
||||||
mapnik.Projection(lyrSrs))
|
layer_proj = mapnik.Projection(lyrSrs)
|
||||||
|
prj_trans = mapnik.ProjTransform(map_proj,
|
||||||
|
layer_proj)
|
||||||
_map.zoom_to_box(prj_trans.backward(lyr.envelope()))
|
_map.zoom_to_box(prj_trans.backward(lyr.envelope()))
|
||||||
|
|
||||||
im = mapnik.Image(_map.width,_map.height)
|
im = mapnik.Image(_map.width,_map.height)
|
||||||
|
|
Loading…
Reference in a new issue