[mapserver-users] MapServer 3.5 & Postgis

Sean Gillies sgillies at i3.com
Wed May 15 11:20:55 EDT 2002


I see that for your shapefile layer you have "STATUS DEFAULT"
and for the PostGIS layer you have "STATUS ON".  This is your
problem.  You will either need to change the PostGIS layer
STATUS to DEFAULT or explicitly draw the layer with a
"&layer=mines" in your CGI query string.  "STATUS ON" is a
bit misleading -- it doesn't mean that the layer will be
drawn, only that it _can_ be drawn.

good luck,
Sean

lists wrote:
> Hi
> 
> I'm a newbie with GIS, so please have patience :)
> 
> I have installed the PostGIS 0.7 extension with Postgresql 7.2 (RedHat 
> 7.3), and PostGIS seems fine. I have managed to convert and input shp file 
> data.
> 
> I have also compiled mapserver 3.5 and the itasca demo works fine.
> I compiled mapserver with this ./configure :
> 
> ./configure --with-proj=/usr/local/lib --with-postgis=yes --with-wmsclient
> 
> I then wrote a simple map file for the data I had input into postgres. 
> This is the abandoned mine land data from http://www.nationalatlas.gov/atlasftp.html
> 
> When reading directly from shp files, this .map file works :
> 
> NAME EX1
> EXTENT -159.6 28.77 -71.4667 70.5
> SIZE 400 300
> SHAPEPATH "../data"
> LAYER # start of the "mines" layer object
>   NAME "mines"
>   DATA abnminx020
>   STATUS DEFAULT
>   TYPE POINT
>   CLASS
>     COLOR 120 120 220
>     OUTLINECOLOR 10 10 0
>   END # end of class object
> END # end of layer object
> END # end of map file
> 
> However, if I add :
>   CONNECTIONTYPE local
> into the LAYER section, I get this error :
> 
> <HTML>
> <HEAD><TITLE>MapServer Message</TITLE></HEAD>
> <!-- MapServer version 3.5 OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP 
> SUPPORTS=PROJ SUPPORTS=TTF SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT 
> INPUT=TIFF INPUT=EPPL7 INPUT=JPEG INPUT=POSTGIS INPUT=SHAPEFILE -->
> <BODY BGCOLOR="#FFFFFF">
> getSymbol(): Symbol definition error. (local):(5)
> </BODY></HTML>
> 
> 
> If I change the map file to read from the database :
> 
> NAME EX2
> EXTENT -159.6 28.77 -71.4667 70.5
> SIZE 400 300
> LAYER # start of the "mines" layer object
>   CONNECTIONTYPE postgis
>   NAME "mines"
>   CONNECTION "user=xxx password=xxx dbname=mines host=localhost port=5432"
>   DATA "the_geom from themines"
>   STATUS ON
>   TYPE POINT
>   CLASS
>     COLOR 120 120 220
>     OUTLINECOLOR 10 10 0
>   END # end of class object
> END # end of layer object
> END # end of map file
> 
> then I get a plain white .png with no detail at all.
> 
> Any help would be much appreciated - I'm rather stumped at the moment !
> 
> Regards and thanks in advance
> 
> Arif Saleem
> 
> 
> 


-- 
Sean Gillies             Applications Developer
i-cubed : information integration & imaging LLC
970-482-4400 voice
970-482-4499 fax              http://www.i3.com




More information about the mapserver-users mailing list