Orthographic reprojection with mapnik

المشرف العام

Administrator
طاقم الإدارة
I am trying to create a google earth like wep application. My problem is that I can't get to render a full view of the earth.

The zoom_all() function generates the following error :

RuntimeError: could not zoom to combined layer extents using zoom_all because proj4 could not back project any layer extents into the map srs (set map 'maximum-extent' to override layer extents) And if I define an envelope, I can only manage to have a cropped view of the earth with

mapnik.Envelope(-4500000, -4500000, 4500000, 4500000) or a blank image with

mapnik.Envelope(-4600000, -4600000, 4600000, 4600000) EDIT : I also tried specifying maximum-extent in the xml file but the result was the same as specifying the envelope in the python script.

What am I doing wrong ? Any hint will be appreciated :)

My configuration is :


This is the python script that renders the image :

#!/usr/bin/python2 import mapnik image = 'world-xml.png' map_config = 'world.xml' m = mapnik.Map(1000, 1000) mapnik.load_map(m, map_config) bbox = mapnik.Envelope(-4500000, -4500000, 4500000, 4500000) m.zoom_to_box(bbox) mapnik.render_to_file(m, image) And this is the xml config file :

projet-carte shape lines.shp

أكثر...
 
أعلى