[Mapserver-users] Error Parsing POSTGIS connection informatio n

christian.schuster at rsag.ch christian.schuster at rsag.ch
Wed Jan 29 21:37:30 PST 2003


This is a multipart message in MIME format.
--=_alternative 001EE6A8C1256CBE_=
Content-Type: text/plain; charset="US-ASCII"

ps -ef  |grep postgres

gives the folowing result

$ ps -ef | grep postgres
    user    1044    1556 con  09:23:25 /usr/bin/postgres
    user    2028    1044 con  09:23:29 /usr/bin/postgres
    user    1628    2028 con  09:23:29 /usr/bin/postgres

I am working on Win2000 station on which I have installed Cygwin. I do not 
really have a Linux server. I hope this will not be the problem. I just do 
not get where the problem really is. If it is PostgreSQL or PostGIS or 
MapServer.

After I built MapServer I checked the capabilities of it which are

$ ./mapserv -v
MapServer version 3.6.3 OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP SUPPORTS=PROJ 
SUPPORTS=TTF SUPPORTS=WMS_SERVER INPUT=EPPL7 INPUT=JPEG
INPUT=POSTGIS INPUT=SHAPEFILE

I also tried some geometric functions like area in Postgre SQL which 
worked fine. Therefore, I assume I have a problem in the Map file. I am 
really not sure what is the min I have to define in the Map file.
The demo applikation is working fine and so I created my mapfile with 
parts from there. My map file looks like this right now:

#################################################################################
### Start of map file    ###
#################################################################################
MAP
  NAME "MapServer"
 
  STATUS ON
  SIZE 600 600
  EXTENT 0 0 100 100
  UNITS METERS
 
  #SHAPEPATH "data"
 
  IMAGECOLOR 255 255 255
  IMAGETYPE JPG
  INTERLACE ON
 
  SYMBOLSET "symbols/symbols.sym"

##############################################################################
### Start of reference map ###
##############################################################################
REFERENCE
  ### reference picture which must be a gif file acording to specs 3.6
  ### this is WRONG !!! GD 1.8 and higher do not support gif anymore
  ### For me it worked with a jpg or png picture
  IMAGE "symbols/reference.png"

  EXTENT 0 0 100 100
  SIZE 50 50
  STATUS ON
  COLOR -1 -1 -1
  OUTLINECOLOR 255 0 0
END ### end of reference

##############################################################################
### Start of web interface definition (including WMS enabling metadata) 
###
##############################################################################
WEB
  TEMPLATE   demo.html
  MINSCALE   0
  MAXSCALE   1000
  IMAGEPATH  "set in demo_init.html" # no change required
  IMAGEURL     "set in demo_init.html" # no change required
  METADATA
    WMS_ACCESSCONSTRAINTS none

    ### change this value to match your setup
    WMS_ONLINERESOURCE "http://localhost:8300/chstest/demo.html"
  END
END ### end of web
 
##############################################################################
### Start of layer definitions ###
##############################################################################
LAYER
  CONNECTIONTYPE postgis
  NAME "points"

  ### Connect to a remote spatial database
  CONNECTION "user=*** dbname=myGISdb host=localhost port=5432"

  ### Get the points from the 'col1' column of the 't1' table
  DATA "col1 from t1"
  STATUS ON
  TYPE POINT

  CLASS
    COLOR 255 0 0 
  END
END
### end of layer definitions

END ### end of map File

Christian Schuster

Rudolf Schuster AG
Postfach 277
CH - 3000 Bern 11

http://www.rsag.ch
++41 31 348 05 30
--=_alternative 001EE6A8C1256CBE_=
Content-Type: text/html; charset="US-ASCII"


<br><font size=2>ps -ef  |grep postgres</font>
<br>
<br><font size=2 face="sans-serif">gives the folowing result</font>
<br>
<br><font size=2 face="sans-serif"><b>$ ps -ef | grep postgres</b></font>
<br><font size=2 face="sans-serif"><b>    user    1044
   1556 con  09:23:25 /usr/bin/postgres</b></font>
<br><font size=2 face="sans-serif"><b>    user    2028
   1044 con  09:23:29 /usr/bin/postgres</b></font>
<br><font size=2 face="sans-serif"><b>    user    1628
   2028 con  09:23:29 /usr/bin/postgres</b></font>
<br>
<br><font size=2 face="sans-serif">I am working on Win2000 station on which
I have installed Cygwin. I do not really have a Linux server. I hope this
will not be the problem. I just do not get where the problem really is.
If it is PostgreSQL or PostGIS or MapServer.</font>
<br>
<br><font size=2 face="sans-serif">After I built MapServer I checked the
capabilities of it which are</font>
<br>
<br><font size=2 face="sans-serif"><b>$ ./mapserv -v</b></font>
<br><font size=2 face="sans-serif"><b>MapServer version 3.6.3 OUTPUT=PNG
OUTPUT=JPEG OUTPUT=WBMP SUPPORTS=PROJ SUPPORTS=TTF SUPPORTS=WMS_SERVER
INPUT=EPPL7 INPUT=JPEG</b></font>
<br><font size=2 face="sans-serif"><b>INPUT=POSTGIS INPUT=SHAPEFILE</b></font>
<br>
<br><font size=2 face="sans-serif">I also tried some geometric functions
like area in Postgre SQL which worked fine. Therefore, I assume I have
a problem in the Map file. I am really not sure what is the min I have
to define in the Map file.</font>
<br><font size=2 face="sans-serif">The demo applikation is working fine
and so I created my mapfile with parts from there. My map file looks like
this right now:</font>
<br>
<br><font size=2 face="sans-serif"><b>#################################################################################</b></font>
<br><font size=2 face="sans-serif"><b>### Start of map file    
                     
                     
        ###</b></font>
<br><font size=2 face="sans-serif"><b>#################################################################################</b></font>
<br><font size=2 face="sans-serif"><b>MAP</b></font>
<br><font size=2 face="sans-serif"><b>  NAME "MapServer"</b></font>
<br><font size=2 face="sans-serif"><b>  </b></font>
<br><font size=2 face="sans-serif"><b>  STATUS ON</b></font>
<br><font size=2 face="sans-serif"><b>  SIZE 600 600</b></font>
<br><font size=2 face="sans-serif"><b>  EXTENT 0 0 100 100</b></font>
<br><font size=2 face="sans-serif"><b>  UNITS METERS</b></font>
<br><font size=2 face="sans-serif"><b>  </b></font>
<br><font size=2 face="sans-serif"><b>  #SHAPEPATH "data"</b></font>
<br><font size=2 face="sans-serif"><b>  </b></font>
<br><font size=2 face="sans-serif"><b>  IMAGECOLOR 255 255 255</b></font>
<br><font size=2 face="sans-serif"><b>  IMAGETYPE JPG</b></font>
<br><font size=2 face="sans-serif"><b>  INTERLACE ON</b></font>
<br><font size=2 face="sans-serif"><b>  </b></font>
<br><font size=2 face="sans-serif"><b>  SYMBOLSET "symbols/symbols.sym"</b></font>
<br>
<br><font size=2 face="sans-serif"><b>##############################################################################</b></font>
<br><font size=2 face="sans-serif"><b>### Start of reference map  
                     
                     
  ###</b></font>
<br><font size=2 face="sans-serif"><b>##############################################################################</b></font>
<br><font size=2 face="sans-serif"><b>REFERENCE</b></font>
<br><font size=2 face="sans-serif"><b>  ### reference picture which
must be a gif file acording to specs 3.6</b></font>
<br><font size=2 face="sans-serif"><b>  ### this is WRONG !!! GD 1.8
and higher do not support gif anymore</b></font>
<br><font size=2 face="sans-serif"><b>  ### For me it worked with
a jpg or png picture</b></font>
<br><font size=2 face="sans-serif"><b>  IMAGE "symbols/reference.png"</b></font>
<br>
<br><font size=2 face="sans-serif"><b>  EXTENT 0 0 100 100</b></font>
<br><font size=2 face="sans-serif"><b>  SIZE 50 50</b></font>
<br><font size=2 face="sans-serif"><b>  STATUS ON</b></font>
<br><font size=2 face="sans-serif"><b>  COLOR -1 -1 -1</b></font>
<br><font size=2 face="sans-serif"><b>  OUTLINECOLOR 255 0 0</b></font>
<br><font size=2 face="sans-serif"><b>END ### end of reference</b></font>
<br>
<br><font size=2 face="sans-serif"><b>##############################################################################</b></font>
<br><font size=2 face="sans-serif"><b>### Start of web interface definition
(including WMS enabling metadata)    ###</b></font>
<br><font size=2 face="sans-serif"><b>##############################################################################</b></font>
<br><font size=2 face="sans-serif"><b>WEB</b></font>
<br><font size=2 face="sans-serif"><b>  TEMPLATE   demo.html</b></font>
<br><font size=2 face="sans-serif"><b>  MINSCALE   0</b></font>
<br><font size=2 face="sans-serif"><b>  MAXSCALE   1000</b></font>
<br><font size=2 face="sans-serif"><b>  IMAGEPATH  "set
in demo_init.html" # no change required</b></font>
<br><font size=2 face="sans-serif"><b>  IMAGEURL     "set
in demo_init.html" # no change required</b></font>
<br><font size=2 face="sans-serif"><b>  METADATA</b></font>
<br><font size=2 face="sans-serif"><b>    WMS_ACCESSCONSTRAINTS
none</b></font>
<br>
<br><font size=2 face="sans-serif"><b>    ### change this value
to match your setup</b></font>
<br><font size=2 face="sans-serif"><b>    WMS_ONLINERESOURCE
"http://localhost:8300/chstest/demo.html"</b></font>
<br><font size=2 face="sans-serif"><b>  END</b></font>
<br><font size=2 face="sans-serif"><b>END ### end of web</b></font>
<br><font size=2 face="sans-serif"><b>  </b></font>
<br><font size=2 face="sans-serif"><b>##############################################################################</b></font>
<br><font size=2 face="sans-serif"><b>### Start of layer definitions  
                     
                    ###</b></font>
<br><font size=2 face="sans-serif"><b>##############################################################################</b></font>
<br><font size=2 face="sans-serif"><b>LAYER</b></font>
<br><font size=2 face="sans-serif"><b>  CONNECTIONTYPE postgis</b></font>
<br><font size=2 face="sans-serif"><b>  NAME "points"</b></font>
<br>
<br><font size=2 face="sans-serif"><b>  ### Connect to a remote spatial
database</b></font>
<br><font size=2 face="sans-serif"><b>  CONNECTION "user=***
dbname=myGISdb host=localhost port=5432"</b></font>
<br>
<br><font size=2 face="sans-serif"><b>  ### Get the points from the
'col1' column of the 't1' table</b></font>
<br><font size=2 face="sans-serif"><b>  DATA "col1 from t1"</b></font>
<br><font size=2 face="sans-serif"><b>  STATUS ON</b></font>
<br><font size=2 face="sans-serif"><b>  TYPE POINT</b></font>
<br>
<br><font size=2 face="sans-serif"><b>  CLASS</b></font>
<br><font size=2 face="sans-serif"><b>    COLOR 255 0 0  
   </b></font>
<br><font size=2 face="sans-serif"><b>  END</b></font>
<br><font size=2 face="sans-serif"><b>END</b></font>
<br><font size=2 face="sans-serif"><b>### end of layer definitions</b></font>
<br>
<br><font size=2 face="sans-serif"><b>END ### end of map File</b></font>
<br><font size=2 face="sans-serif"><br>
Christian Schuster<br>
<br>
Rudolf Schuster AG<br>
Postfach 277<br>
CH - 3000 Bern 11<br>
<br>
http://www.rsag.ch<br>
++41 31 348 05 30</font>
--=_alternative 001EE6A8C1256CBE_=--



More information about the MapServer-users mailing list