[Mapserver-users] Error Parsing POSTGIS connection informatio n

christian.schuster at rsag.ch christian.schuster at rsag.ch
Thu Jan 30 00:37:30 EST 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 &nbsp;|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>&nbsp; &nbsp; user &nbsp; &nbsp;1044
&nbsp; &nbsp;1556 con &nbsp;09:23:25 /usr/bin/postgres</b></font>
<br><font size=2 face="sans-serif"><b>&nbsp; &nbsp; user &nbsp; &nbsp;2028
&nbsp; &nbsp;1044 con &nbsp;09:23:29 /usr/bin/postgres</b></font>
<br><font size=2 face="sans-serif"><b>&nbsp; &nbsp; user &nbsp; &nbsp;1628
&nbsp; &nbsp;2028 con &nbsp;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 &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; ###</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>&nbsp; NAME &quot;MapServer&quot;</b></font>
<br><font size=2 face="sans-serif"><b>&nbsp; </b></font>
<br><font size=2 face="sans-serif"><b>&nbsp; STATUS ON</b></font>
<br><font size=2 face="sans-serif"><b>&nbsp; SIZE 600 600</b></font>
<br><font size=2 face="sans-serif"><b>&nbsp; EXTENT 0 0 100 100</b></font>
<br><font size=2 face="sans-serif"><b>&nbsp; UNITS METERS</b></font>
<br><font size=2 face="sans-serif"><b>&nbsp; </b></font>
<br><font size=2 face="sans-serif"><b>&nbsp; #SHAPEPATH &quot;data&quot;</b></font>
<br><font size=2 face="sans-serif"><b>&nbsp; </b></font>
<br><font size=2 face="sans-serif"><b>&nbsp; IMAGECOLOR 255 255 255</b></font>
<br><font size=2 face="sans-serif"><b>&nbsp; IMAGETYPE JPG</b></font>
<br><font size=2 face="sans-serif"><b>&nbsp; INTERLACE ON</b></font>
<br><font size=2 face="sans-serif"><b>&nbsp; </b></font>
<br><font size=2 face="sans-serif"><b>&nbsp; SYMBOLSET &quot;symbols/symbols.sym&quot;</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 &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; ###</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>&nbsp; ### reference picture which
must be a gif file acording to specs 3.6</b></font>
<br><font size=2 face="sans-serif"><b>&nbsp; ### this is WRONG !!! GD 1.8
and higher do not support gif anymore</b></font>
<br><font size=2 face="sans-serif"><b>&nbsp; ### For me it worked with
a jpg or png picture</b></font>
<br><font size=2 face="sans-serif"><b>&nbsp; IMAGE &quot;symbols/reference.png&quot;</b></font>
<br>
<br><font size=2 face="sans-serif"><b>&nbsp; EXTENT 0 0 100 100</b></font>
<br><font size=2 face="sans-serif"><b>&nbsp; SIZE 50 50</b></font>
<br><font size=2 face="sans-serif"><b>&nbsp; STATUS ON</b></font>
<br><font size=2 face="sans-serif"><b>&nbsp; COLOR -1 -1 -1</b></font>
<br><font size=2 face="sans-serif"><b>&nbsp; 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) &nbsp; &nbsp;###</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>&nbsp; TEMPLATE &nbsp; demo.html</b></font>
<br><font size=2 face="sans-serif"><b>&nbsp; MINSCALE &nbsp; 0</b></font>
<br><font size=2 face="sans-serif"><b>&nbsp; MAXSCALE &nbsp; 1000</b></font>
<br><font size=2 face="sans-serif"><b>&nbsp; IMAGEPATH &nbsp;&quot;set
in demo_init.html&quot; # no change required</b></font>
<br><font size=2 face="sans-serif"><b>&nbsp; IMAGEURL &nbsp; &nbsp; &quot;set
in demo_init.html&quot; # no change required</b></font>
<br><font size=2 face="sans-serif"><b>&nbsp; METADATA</b></font>
<br><font size=2 face="sans-serif"><b>&nbsp; &nbsp; WMS_ACCESSCONSTRAINTS
none</b></font>
<br>
<br><font size=2 face="sans-serif"><b>&nbsp; &nbsp; ### change this value
to match your setup</b></font>
<br><font size=2 face="sans-serif"><b>&nbsp; &nbsp; WMS_ONLINERESOURCE
&quot;http://localhost:8300/chstest/demo.html&quot;</b></font>
<br><font size=2 face="sans-serif"><b>&nbsp; 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>&nbsp; </b></font>
<br><font size=2 face="sans-serif"><b>##############################################################################</b></font>
<br><font size=2 face="sans-serif"><b>### Start of layer definitions &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ###</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>&nbsp; CONNECTIONTYPE postgis</b></font>
<br><font size=2 face="sans-serif"><b>&nbsp; NAME &quot;points&quot;</b></font>
<br>
<br><font size=2 face="sans-serif"><b>&nbsp; ### Connect to a remote spatial
database</b></font>
<br><font size=2 face="sans-serif"><b>&nbsp; CONNECTION &quot;user=***
dbname=myGISdb host=localhost port=5432&quot;</b></font>
<br>
<br><font size=2 face="sans-serif"><b>&nbsp; ### Get the points from the
'col1' column of the 't1' table</b></font>
<br><font size=2 face="sans-serif"><b>&nbsp; DATA &quot;col1 from t1&quot;</b></font>
<br><font size=2 face="sans-serif"><b>&nbsp; STATUS ON</b></font>
<br><font size=2 face="sans-serif"><b>&nbsp; TYPE POINT</b></font>
<br>
<br><font size=2 face="sans-serif"><b>&nbsp; CLASS</b></font>
<br><font size=2 face="sans-serif"><b>&nbsp; &nbsp; COLOR 255 0 0 &nbsp;
&nbsp; &nbsp;</b></font>
<br><font size=2 face="sans-serif"><b>&nbsp; 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