[postgis-users] use mapserver with Postgis data
Tyler Mitchell
TMitchell at lignum.com
Fri Jun 28 08:31:28 PDT 2002
>Apparently to be able to use different machines, you have to change
>something on the PostgreSQL side to allow other connections, but I haven't
>figured that out.
Yup, you need to add entries to /usr/local/pgsql/data/pg_hba.conf to let
specific databases be accessed from other IP Addresses or hosts.
Works like a charm.
Tyler
|---------+------------------------------------------->
| | "Hankley, Chip" |
| | <Chip.Hankley at GASAI.Com> |
| | Sent by: |
| | postgis-users-admin at postgis.refr|
| | actions.net |
| | |
| | |
| | 06/28/2002 06:43 AM |
| | Please respond to postgis-users |
| | |
|---------+------------------------------------------->
>------------------------------------------------------------------------------------------------------------------------------|
| |
| To: "'postgis-users at postgis.refractions.net'" <postgis-users at postgis.refractions.net> |
| cc: |
| Fax to: |
| Subject: RE: [postgis-users] use mapserver with Postgis data |
>------------------------------------------------------------------------------------------------------------------------------|
Cedric -
There are a couple of docs you might refer to:
The postGIS docs have a section on working w/ MapServer
http://postgis.refractions.net/docs/x424.html#AEN489
The following document also has a sample layer definition for MapServer
http://www.gasai.com/gisapps/WindowsHowTo.html#BuildaTable
I've just gone through this process myself, the big thing for me was the
following statement in the layer definition:
CONNECTIONTYPE postgis
CONNECTION "user=postgres dbname=myGISdb host=localhost"
These two lines are the keys... they are really the only thing that seems
to
separate the layer definition from a regular layer... the CONNECTION line
can be a little tricky. The PostGIS docs say that some of these are
optional... this was the only combination that I could get to work, and I
HAD to specify "localhost" as the host... my regular machine name would NOT
work. Note that for my setup, PostGIS and MapServer are running ON THE SAME
MACHINE. That is the only reason why LOCALHOST will work (I think).
Apparently to be able to use different machines, you have to change
something on the PostgreSQL side to allow other connections, but I haven't
figured that out.
Anyway, try those layer definitions. If it doesn't work, MS should return
some errors - search the PostGIS and MapServer archives using these errors
and they should help you figure it out.
Chip
-----Original Message-----
From: Cedric BERNIER [mailto:cedric.bernier at thales-is.com]
Sent: Friday, June 28, 2002 8:27 AM
To: postgis-users at postgis.refractions.net
Cc: gleeming at refractions.net
Subject: [postgis-users] use mapserver with Postgis data
Hi all !
I would like to visualize my data stored with PostGIS using mapserver.
I have installed and configured mapserver (itasca demo works fine), is
anyone
could tell me how to use my data stored in my database as input of the
mapserver
?
Maybe something to read before ?
I have configure mapserver with --postgis flag and it seems to be ok.
_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users
More information about the postgis-users
mailing list