[postgis-users] Postgis -> Mapserver white background

pcreso at pcreso.com pcreso at pcreso.com
Wed Apr 27 13:12:37 PDT 2011


I'm not sure if is just the email doing it or if your CONNECTION string is entirely on one line or not. You might try having a single line if it is wrapped.

You can enable DEBUG in the mapfile & see any error messages.
http://mapserver.org/optimization/debugging.html
eg:
MAP
  ...
  CONFIG "MS_ERRORFILE" "/tmp/ms_error.txt"
  DEBUG 5
  ...
  LAYER
    ...
  END
END

This might have a bit of a learning curve, but is very useful to allow you to view & interact in an onscreen map context with both the source data and the mapserver output.

Install QGIS (or uDIG/JUMP/gvSIG/etc) and open the Postgis table directly in that to make sure you see what you expect to.

Then modify the mapfile to create a WMS service from the layer (pretty straightforward, as long as you have Apache installed) and then open this at the same time in QGIS, so you can see the native Postgis data & the mapserver WMS version are identical (aligned when they overlay each other) 
 
http://mapserver.org/ogc/wms_server.html

HTH

  Brent Wood

--- On Wed, 4/27/11, Graham Walker <gwalker84 at gmail.com> wrote:

From: Graham Walker <gwalker84 at gmail.com>
Subject: [postgis-users] Postgis -> Mapserver white background
To: postgis-users at postgis.refractions.net
Date: Wednesday, April 27, 2011, 7:26 PM

Hi all, fairly new to all this. I was wondering if you could help me
with the following issue. I can't seem to display my postgis table in
mapserver. I can display shapefiles and html templates fine, but when
I try to connect to my postgis table I simply get a white background
(or whatever colour I set it as).

I have managed to display postgis tables before in mapserver, but I am
having no luck in this one and cannot see any differences. Both the
shapefile and postgis table can display in qgis. My map file is listed
below. I have intentionally tried to simplify this down to the basics
so it has no projection details, etc at present. Any help would be
greatly appreciated.  Thanks

MAP
 NAME "test"
IMAGETYPE      PNG
    SIZE 400 500
    STATUS ON
    EXTENT 200949 883531 347001 979508
    SHAPEPATH "C:\ms4w\Apache\htdocs\test"
    UNITS METERS
END

    WEB
          IMAGEPATH "c:\ms4w\tmp\ms_tmp\"
       IMAGEURL "/ms_tmp/"
    END

#Region Polygons
    LAYER
        NAME "North"
        CONNECTIONTYPE postgis
    CONNECTION "user=postgres password=1
    dbname=test host=localhost port=5432"
        DATA "the_geom from North"
        TYPE POLYGON
        STATUS DEFAULT
        CLASS
            STYLE
                COLOR 1 1 1
                OUTLINECOLOR 1 1 1
            END
        END
    END
_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20110427/a1e6beaa/attachment.html>


More information about the postgis-users mailing list