[postgis-users] Re: PostGIS - server side optimization

Andreas Neumann neumann at karto.baug.ethz.ch
Thu Jan 6 03:57:54 PST 2005


Hi Jordi,

I run into similar problems using postgis and SVG. However, there are 
solutions.

* I organize my data in 2 or more levels of details (2 or more tables)
* I introduce an attribute indicating the level of importance - f.e. in 
a river network: with a large map extent I only select major rivers, 
with smaller extent also smaller rivers
* I use Simplify() to generalize the data if the map extent is smaller
* I use Intersection() of the data and the map bounding box
* I use relative coordinates where applicable
* I reduce the number of decimals using Klaus AsSVG patch
* I use mod_gzip on Apache to gzip the stream between the server and the 
SVG client
* I reduce the number of elements. F.e. one multipolygon in svg is 
preferable to several polygons if the other attributes are the same. the 
number of elements in the SVG DOM tree is also important for the 
performance.

If you are interested, I can provide you an example (work in progress) 
where it results in a rather good performance, even if the input data is 
complex.

Andreas



More information about the postgis-users mailing list