[postgis-users] shp2img OK, mapserver not OK

Bill Wheaton gisgeek at nc.rr.com
Fri Jan 31 05:11:22 PST 2003


Hello Listers:

I've built postgresql, postgis, and mapserver (with postgis support).   
I can load a shapefile into postgis and everything looks good.  I know  
my mapserver install works because I can display shapefiles with it.   
But when I try to use a postgis connection as the data source, I get a  
white box.  When I run shp2img with the same map file, it gives no  
errors and successfully returns an image of data that came out of  
postgis.  So, ultimately, the problem is that mapserver won't return an  
image from a postgis source whereas shp2img will return an image from  
the same mapfile.  When running the mapfile through mapserver, the log  
file indicates that it completes normally, but no image.  I can add a  
second layer to this same mapfile that accesses a shapefile and that  
shapefile is returned by mapserver, but not the layer whose source is  
postgis.  Any ideas on how to troubleshoot this?  I'm somewhat of a  
newbie to this, so apologies if this is something I should  
know...thanks in advance...

environment:
postgreSQL 7.3
postgis 0.7.3 (from CVS about a week ago)
mapserver 3.6.4
Macosx 10.2.3

Mapfile:
------------------------------------------------------------------------ 
-------
NAME TEST
SIZE 300 150
EXTENT -180 -90 180 90
SHAPEPATH "data"

WEB
    LOG "pgmap.log"
END


LAYER
      CONNECTIONTYPE postgis
      NAME "countries"
      CONNECTION "user=postgres dbname=test host=192.168.0.2"
      DATA "the_geom from cntry_tab"
      STATUS ON
      TYPE POLYGON
      CLASS
        COLOR 205 92 82
      END
END

END
----------------------------------------------------------------------

html file:
---------------------------------------------------------------------
<HTML>

<BODY>

<img border="1"  
src="/cgi-bin/mapserv?map=/Library/WebServer/Documents/slm/map_server/ 
pgmap.map&mode=map">

</BODY>
</HTML>
------------------------------------------------------------------------ 
---

Cheers...
Bill




More information about the postgis-users mailing list