[postgis-users] Postgis -> Mapserver white background

Graham Walker gwalker84 at gmail.com
Wed Apr 27 01:13:12 PDT 2011


Thanks for the response Ben.

I am accessing it through:
http://127.0.0.1/cgi-bin/mapserv.exe?map=C:\ms4w\Apache\htdocs\test.map&layer=all&mode=map

It just returns a blank png file.Currently, the table itself only
contains one polygon, set with an SRID of 27700. The table has three
columns in total, GID, name and the_geom. It was imported to
postgreSQL using the shapefile and DBF loader. I can connect and get
the polygon to display through QGIS without any issues through "adding
a PostGIS layer" function.

postgis.sql and spatial_ref_sys.sql have both been run.

Is there anything else that might help? What do you require for me to
attach the table definition?

Thanks,

On 27 April 2011 08:45, Ben Madin <lists at remoteinformation.com.au> wrote:
> Graham,
>
> It looks OK to me. Although the brevity is good, it might help if you could also attach the table definition - is it just producing a blank png image? is it in the same projection etc...? How are you accessing it (ie through WMS, mapscript or standard mapserver output).
>
> I've also copied this back to MapServer list...
>
> cheers
>
> Ben
>
>
>
> On 27/04/2011, at 3:26 PM, Graham Walker wrote:
>
>> 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
>
> _______________________________________________
> 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