[MS4W-Users] MS4W -- Shapefile not drawing via mapserver

Stephen Woodbridge woodbri at swoodbridge.com
Sun Sep 30 12:00:48 EST 2012

On 9/30/2012 11:23 AM, Jeff McKenna wrote:
>> That lead me to see what was going on via shp2img, using "-map_debug 3"
>> parameter. shp2img.exe returned to me the following responses:
>> C:\ms4w\Apache\cgi-bin>shp2img -m
>>> c:\ms4w\apps\testpage\htdocs\kristenm
>>> c:\ms4w\apps\testpage\htdocs\test.png
>>> -map_debug 3
>>> msDrawMap(): rendering using outputformat named png (AGG/PNG).
>>> msDrawMap(): WMS/WFS set-up and query, 0.000s
>>> msDrawMap(): Drawing Label Cache, 0.000s
>>> msDrawMap() total time: 0.000s
>>> msSaveImage(c:\ms4w\apps\testpage\htdocs\test.png) total time: 0.141s
> Hello Kristen,
> I can give some quick thoughts, but i'm out of the office this week so
> others will have to followup with you here on this mailing list.  Some
> thoughts:
> - there is no error with shp2img, as it seems MapServer was never told to
> draw your layer.  Make sure you have STATUS ON in your trouble layer, or
> maybe use the layer switch (-l ?) to call that layer specifically with
> shp2img.
> - maybe also use the shp2img switch '-all_debug 5' instead of
> '-map_debug', to see even more output
> - also verify the commandline utility 'ogrinfo' can read your shapefile
> - maybe set your SHAPEPATH to "./data/" (assuming that is the path from
> your mapfile) and make sure your 'land_poly.shp' lives in that data folder
> I hope others step in here on this mailing list with their thoughts if I
> cannot reply in time.

A few more thoughts. Depending on the version of mapserver you may need 
to have DUMP TRUE in the later definition and/or be sure you have 
enabled WFS requests in the layer. That was disabled by default in one 
of the new versions and needs to be enable in the OWS metadata for the 

-Steve W

More information about the MS4W-Users mailing list