Hi Dane, Thanks for your reply. I have tried with estimate_extent & extent parameter. Now my average rendering time is decreased to 20 sec. At very low zoom level time decreases to 6 sec even and at higher zoom level it tends to 25 to 30 sec.
For all layers in my python script I am using following stuff: Power_lyr.datasource = PostGIS(host='localhost', dbname='postgis_europe', user='balram', password='decos', table="(select way from planet_osm_line where power='line') as power",estimate_extent='false',extent='-20037508,-19929239,20037508,19929239') Power_lyr.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 +nadgri...@null +no_defs +over" and after that I am doing m.zoom_to_box(Envelope(3.06293548889,51.1743208093,6.5670669221,52.4263865259)) to zoom to netherlands map. Being honest, I don't know exact meaning of value passed to "extent" parameter. I have supplied this value which I found on mapnik forum. Could you please explain me in more detail "extent" parameter? What extent value shall I specify for europe data for each layer? Please find attached complete python script file, which render europe map that I am using. Please help me, if possible. Thanks Balram Dane Springmeyer wrote: > > First make sure you have built indexes for any large shapefiles you > might be pulling from. > > For large postgis datasets you should set estimate_extent=false and > then provide the 'extent' parameter, essentially hardcoding the right > extent for each layer. > > Either way, the problem you describe in terms of 5-6 minute renders > sounds more like either a messed up Postgres database with maybe > indexes that are corrupted or you are running on a system without > enough memory for these types of queries. I've never seen a basic > select query take that long even with osm size databases as I would > assume it is the postgraduate query that is taking a long time(even > hanging) not actually the mapnik rendering. > > I would advise putting effort toward debugging your data and Postgres > before playing with mapnik settings. For example, test basic select > queries against your data inside the psql interperer. > > Also you should subscribe to the list. > > Dane > > > > On Oct 5, 2009, at 1:18 AM, Balram wrote: > >> >> Hi friends, >> >> Hope you find this mail in good health. >> >> I have created a map rendering application using Mapnik & Python. I >> have >> implemented basic operation on map rendering too. >> >> The major problem is large time taken by Mapnik to render a map. >> >> I am rendering a map by firing queries on postgreSql database & >> assigning >> this data to various layers of map & finally rendering map by calling >> function render_to_file(). >> I have defined various styles & rules function similar to osm.xml >> style >> sheet with filter, maxscale & minscale parameters to filter our data >> at >> various zoom level. >> >> When I am rendering map using Europe data & it is taking time about >> 5 to 6 >> minutes for rendering map image. >> Again whenever I perform some operation like zoom in, zoom out, pan >> etc ; it >> takes same amount of time. >> >> Most people recommended tile server as solution to this problem but >> I can’t >> use tile server. >> Because I have to provide “route planning & management” as one of >> the >> feature of my project, and I guess this will not be possible using >> tile >> server. >> >> I guessed using estimate_extent parameter in PostGIS function could >> help me >> out of this. >> But when I tried it skipped most of the data from query result and >> rendered >> map with very low details. >> >> Could you please help me out of this problem? >> Please do provide me some concrete solution for this issue. >> >> Expecting your helping hands toward me. >> >> Thanks in Advance >> BalRam >> -- >> View this message in context: >> http://www.nabble.com/worst-time-taken-by-Mapnik-while-rendering-map-tp25746800p25746800.html >> Sent from the Mapnik - Users mailing list archive at Nabble.com. >> >> _______________________________________________ >> Mapnik-users mailing list >> [email protected] >> https://lists.berlios.de/mailman/listinfo/mapnik-users > _______________________________________________ > Mapnik-users mailing list > [email protected] > https://lists.berlios.de/mailman/listinfo/mapnik-users > > http://www.nabble.com/file/p25798913/europe_map.py europe_map.py -- View this message in context: http://www.nabble.com/worst-time-taken-by-Mapnik-while-rendering-map-tp25746800p25798913.html Sent from the Mapnik - Users mailing list archive at Nabble.com.
_______________________________________________ Mapnik-users mailing list [email protected] https://lists.berlios.de/mailman/listinfo/mapnik-users

