[mapserver-users] RE: Images returning blank

Fawcett, David (MPCA) David.Fawcett at state.mn.us
Tue Jan 19 13:27:45 PST 2010



Based on the errors, it looks like you will need EXTENT to your map file at the MAP level.

What do you get when you run ogrinfo against the two shapefiles?  Any difference?

Are you adding a URL var for the layer name?  Try setting LAYER STATUS to DEFAULT for both layers and see if you get an image back.

David.

From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Kent Morrison
Sent: Tuesday, January 19, 2010 3:17 PM
To: 'mapserver-users at lists.osgeo.org'
Subject: [mapserver-users] Images returning blank

I have mapserver 5.4.2 installed.

I have two different shape files, one renders properly the other only returns blank images

The debug log for the one that does not work returns:

[Tue Jan 19 20:34:59 2010].212000 CGI Request 1 on process 1180
[Tue Jan 19 20:34:59 2010].212000 mapserv(): Web application error. No way to generate map extent.
[Tue Jan 19 20:34:59 2010].212000 msCalculateScale(): General error message. Invalid image extent, minx=-1.000000, miny=-1.000000, maxx=-1.000000, maxy=-1.000000.
[Tue Jan 19 20:34:59 2010].212000 msTileSetExtent (-13090872.991896, 6046512.903143) (-13071381.549686, 6066004.345353)
[Tue Jan 19 20:34:59 2010].227000 msDrawMap(): Layer 0 (SpokaneTrafficFlows), 0.000s
[Tue Jan 19 20:34:59 2010].227000 msDrawMap(): Drawing Label Cache, 0.000s
[Tue Jan 19 20:34:59 2010].227000 msDrawMap() total time: 0.015s
[Tue Jan 19 20:34:59 2010].274000 msSaveImage() total time: 0.047s
[Tue Jan 19 20:34:59 2010].274000 mapserv request processing time (loadmap not incl.): 0.062s
[Tue Jan 19 20:34:59 2010].274000 msFreeMap(): freeing map at 01A5AF00.
[Tue Jan 19 20:34:59 2010].274000 freeLayer(): freeing layer at 020E4160.

the map file is:

MAP
    IMAGETYPE AGG
    SIZE 256 256
    SHAPEPATH "/MapServerData/ShapeFiles/1"
    IMAGECOLOR 255 255 255
    TRANSPARENT ON
    FONTSET "../../fonts/fonts.list"

CONFIG PROJ_LIB "c:\ms4w\proj\nad\"
CONFIG MS_ERRORFILE "c:\ms4w\tmp\errors2.txt"
DEBUG 5

    PROJECTION
        "init=epsg:4326"
    END

    OUTPUTFORMAT
        NAME 'AGG'
        DRIVER AGG/PNG
        IMAGEMODE RGB
    END #Outputformat

    LAYER
        NAME SpokaneTrafficFlows
        DATA TrafficFlow_2007
        STATUS ON
        TYPE LINE

        DEBUG 5

        CLASS
            NAME "classSpokaneTrafficFlows"

            STYLE
                COLOR 127 255 64
                OPACITY 50
                OUTLINECOLOR 255 128 64
                WIDTH 3
            END #style
        END #class
    END #layer
END #Map

running shp2img.exe returns:
msLoadMap(): Image handling error. Unable to initialize image
msCalculateScale(): General error message. invalid image extent ....

I get the same results for shp2img on the working shapefile/map file.


THE FOLLOWING WORKS:

MAP

  IMAGETYPE      AGG
  SIZE           256 256
  SHAPEPATH      "/MapServerData/ShapeFiles/1"
  IMAGECOLOR     255 255 255
  TRANSPARENT    ON
  FONTSET        "../../fonts/fonts.list"

CONFIG PROJ_LIB "c:\ms4w\proj\nad\"

  PROJECTION
     "init=epsg:4326"
  END

  OUTPUTFORMAT
    NAME 'AGG'
    DRIVER AGG/PNG
    IMAGEMODE RGB
  END #Outputformat

  LAYER
    NAME          TxCounties
    DATA   co48_d00
    STATUS      ON
    TYPE        Polygon

    CLASS
        NAME  "classTxCounties"

        STYLE
            COLOR         0 255 0
            OPACITY      25
            OUTLINECOLOR  0 0 0
            WIDTH       2
        END #style
    END #class
  END #layer
END #Map



Anyone have any idea's why this might not work in the first case? Or what else can I do to debug the problem?


Kent

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20100119/d119d3f8/attachment.htm>


More information about the MapServer-users mailing list