>
>     ll = (7.0, 47.5, 8, 47.6)
>
>     #---------------------------------------------------
>
>     z = 10
>     imgx = 500 * z
>     imgy = 1000 * z
>
>     m = Map(imgx,imgy)
>     load_map(m,mapfile)
>     prj = Projection("+proj=longlat +ellps=WGS84 +datum=WGS84  
> +no_defs")
>     c0 = prj.forward(Coord(ll[0],ll[1]))
>     c1 = prj.forward(Coord(ll[2],ll[3]))


OK, you bounding box coordinates in Geographical (lat/lon) projection  
already, no need to project them again :


     bbox = Envelope(ll[0],ll[1],ll[2],ll[3])
     m.zoom_to_box(bbox)
     im = Image(imgx,imgy)
     render(m, im)
     view = im.view(0,0,imgx,imgy) # x,y,width,height
     view.save(map_uri, 'png')


HTH
Artem
_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users

Reply via email to