What's Wrong With This Picture?

Barbara Zack bz at CESMAIL.NET
Thu Aug 12 18:29:21 EDT 2004


My apologies for bothering the list with this, but I'm running out of
time. I'm primarily a programmer with almost no GIS background. Being
the only available entity, I was asked to get MapServer up and running
as a WMS server. Obviously I have no business doing this, but here I am.
I managed to get a Linux server (Debian sarge) up and running, GDAL
compiled with mrsid support, MapServer compiled, and the demo working.
The map file part is beyond my comprehension. The one I put together,
only half of which I actually understands, produces an XML capabilities
document with no warning messages. However, GetMap gives me a blank png
as output. Below are the results of mapserv -v and gdalinfo in case
that's important. Following that is my first attempt at a map file, for
your amusement. I don't understand about half of what I have in there.
Any pointers would be so greatly appreciated.

Thanks!
Barbara Z

./mapserv -v

MapServer version 4.2.2 OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP SUPPORTS=PROJ
SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WFS_SERVER INPUT=EPPL7
INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE
========================================
gdalinfo /var/www/aviano/aviano.sid

Driver: MrSID/Multi-resolution Seamless Image Database (MrSID)
Size is 89286, 111281
Coordinate System is `'
Origin = (311999.989722,5105471.083134)
Pixel Size = (0.06720000,0.06720000)
Metadata:
  IMAGE__COLOR_SCHEME=0
  IMAGE__DATA_TYPE=0
  IMAGE__INPUT_FILE_SIZE=0.000000
  IMAGE__WIDTH=89286
  IMAGE__HEIGHT=111281
  IMAGE__XY_ORIGIN=312000.023322,5105471.116734
  IMAGE__X_RESOLUTION=0.067200
  IMAGE__Y_RESOLUTION=0.067200
Corner Coordinates:
Upper Left  (  311999.990, 5105471.083)
Lower Left  (  311999.990, 5112949.166)
Upper Right (  318000.009, 5105471.083)
Lower Right (  318000.009, 5112949.166)
Center      (  314999.999, 5109210.125)
Band 1 Block=89286x64 Type=Byte, ColorInterp=Red
Band 2 Block=89286x64 Type=Byte, ColorInterp=Green
Band 3 Block=89286x64 Type=Byte, ColorInterp=Blue
===========================================
MAP
  EXTENT 311999.990 5112949.166 318000.009 5105471.083
  IMAGETYPE png
  SIZE 783 976
  PROJECTION
    "init=epsg:4326"
  END
  OUTPUTFORMAT
    NAME png
    DRIVER "GD/PNG"
    MIMETYPE "image/png"
    IMAGEMODE PC256
    EXTENSION "png"
  END
  WEB
    METADATA
        "wms_title" "Aviano Map"
    "wms_onlineresource"
"http://sid/cgi-bin/mapserv?map=/var/www/aviano/aviano.map&"
    "wms_srs" "EPSG:4326"
    END
  END

  LAYER
    NAME "Aviano1"
    DATA "/var/www/aviano/aviano.sid"
    TYPE raster
    STATUS on
    METADATA
      "wms_title" "Aviano Raster"
      "wms_onlineresource"
"http://sid/cgi-bin/mapserv?map=/var/www/aviano/aviano.map&"
    END
    CLASSITEM "[pixel]"
    CLASS
      EXPRESSION ([pixel] < 64)
      COLOR 0 0 0
    END
    CLASS
      EXPRESSION ([pixel] >= 64 AND [pixel] < 128)
      COLOR 255 0 0
    END
    CLASS
      EXPRESSION ([pixel] >= 128 AND [pixel] < 196)
      COLOR 0 255 0
    END
    CLASS
      EXPRESSION ([pixel] >= 196 AND [pixel] < 256)
      COLOR 0 0 255
    END
  END
END



More information about the mapserver-users mailing list