Balram wrote: > (...) But the thing which makes me surprise is when i am > at higher zoom level my output is just various country border & names of > countries. Ideally this should take less amount of time because it has to > process less amount of data (I guess so). But it is taking more time to > render at high zoom level as compared to low zoom level. As I am increasing > my zoom level from low to high, the rendering time increase in proportion. (snip)
This reminds me of a performance problem I had yesterday with a big (>4Gb) vector dataset I stored in postgres. The problem turned out to be that the spatial index on the geometry column was not being used because the query planner thought that a sequential scan would be faster (due to the relatively small number of total rows but very large geometries). Since the spatial predicate had to be evaluated on *every* geometry the database was doing much more work than it needed. This problem is described in here [1] (section 5.1) and one of the proposed workarounds fixed it for me: Create a another geometry column to store the pre-calculated envelope of each geometry, create an index on that and, optionally, CLUSTER the table on that index. You should then first filter out all non-overlapping rows using this index (which is very fast) before operating on the real geometry column (on a, hopefully, much reduced recordset) I'm not sure if Mapnik can be configured to filter on a geometry column different than the one that it is rendering (haven't got there yet) but you could "split up" the table into several views (one for each region) using this index internally and then configure each one as an individual datasource using the "real" geometry column. Alternatively you could configure each Mapnik layer using a sub-select that does the filtering, explained here [2]. Hope it helps, Alberto [1] http://postgis.refractions.net/documentation/manual-1.3/ch05.html [2] http://trac.mapnik.org/wiki/PostGIS _______________________________________________ Mapnik-users mailing list [email protected] https://lists.berlios.de/mailman/listinfo/mapnik-users

