[mapserver-users] Postgres/Postgis on a different machine than mapserver

Jan Hartmann jhart at frw.uva.nl
Wed Nov 27 07:24:54 EST 2002


Klaus,

You don't need PostGIS on the MapServer machine. However, you need to 
have MapServer compiled with PostGIS support. With that, you can just 
give the Internet address, database name, port and user of the 
PostgreSQL/PostGIS database in the layer's CONNECTION line.

Note that this could give poor performance, as the whole vector layer 
has to be sent over the line to be rasterized by MapServer. Once you get 
things running with simple PostGIS tables, try to restrict on the 
PostGIS side what you will send to MapServer, e.g.

- use SQL selects instead of MapServer FILTERs
- don't send whole tables; send subselects with just the variables you 
need (OID, the_geom and one CLASS variable).
- create PostgreSQL views and use them in your MapServer DATA line. See 
  http://postgis.refractions.net/docs/x549.html#AEN607

Jan Hartmann

Klaus Zahradnik wrote:
> Hy there!
> We have the following problem:
> 
> We have one machine with Postgres/-gis and Mapserver installed and running.
> We also have a second machine, with only the Mapserver running on it. We
> want the  second machine to use the database of the first one (since the
> first one is way bigger).
> 
> Do we have to compile and install postgres and postgis on the second
> machine, just to be able to use the postgis database on the second machine?
> We tried just to connect to it, but get the unsupported error (sonce we did
> not install and compile postgres/gis on the second machine)
> 
> best regards and thanks in advance
> Klaus Zahradnik
> 
>





Jan Hartmann
Department of Geography
University of Amsterdam
jhart at frw.uva.nl




More information about the mapserver-users mailing list