[mapserver-users] Postgres/Postgis on a different machine than mapserver
Paul Ramsey
pramsey at refractions.net
Wed Nov 27 08:49:12 PST 2002
To be slightly more detailed:
a) you need a PostGIS-enabled mapserver
b) you need the PostgreSQL client libraries (libpq)
libpq supports network connections transparently, exactly the same as
normal connections, just specify a host in the connect string.
P.
Jan Hartmann wrote:
> 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
>
--
__
/
| Paul Ramsey
| Refractions Research
| Email: pramsey at refractions.net
| Phone: (250) 885-0632
\_
More information about the MapServer-users
mailing list