[Mapserver-users] simple mapserver configuration

Eric Sokolowsky eric.sokolowsky at gsfc.nasa.gov
Thu Jan 22 09:13:37 EST 2004


On Wed, 21 Jan 2004, Pericles S. Nacionales wrote:

> On Wednesday 21 January 2004 03:42 pm, Eric Sokolowsky wrote:
> > On Tue, 20 Jan 2004, Pericles Nacionales wrote:
> > > Eric,
> > >
> > > I don't know if this is relevant in WMS servers or not but how about
> > > adding IMAGEURL in your WEB object?
> >
> > Okay, done.  Didn't seem to change anything though.
> >
> > > By the way, does your app generate a
> > > map with a standard MapServer CGI url, ie:
> > > http://svsdev.gsfc.nasa.gov/esok/cgi-bin/map?map=/path/to/your/mapfile.ma
> > >p&layer=EARTH_PNG&mode=map
> >
> > It generates the following message when I try that:
> >
> > msDrawMap(): General error message. Image dimensions not specified.
> > msCalculateScale(): General error message. Invalid image width or height.
> >
> > > Another question, did you check that your IMAGEPATH (IMAGEURL) is
> > > writeable by your web server's user/owner?
> >
> > Yes, after reading the documentation a few more times, I got the mapserv
> > to write to my error log file.  However, I still see a blank image in my
> > WMS client.  It returns an image of the right size, but it is completely
> > black.  Here's an example query:
> >
> > http://svsdev.gsfc.nasa.gov/esok/cgi-bin/map?REQUEST=GetMap&SRS=EPSG:4326&V
> >ERSION=1.1.0&FORMAT=image/png&STYLES=default&LAYERS=EARTH_JPEG&BBOX=-110,-20
> >,-70,20&WIDTH=512&HEIGHT=512&TRANSPARENT=TRUE
> >
> > I know that the map file is being obtained correctly because when I issue
> > getcapabilities request I get back an xml file with all of the correct
> > layers.
> >
> > Any other suggestions anyone?
> 
> Well, I checked your capabilities and it looks fine except that the only LAYER 
> available is EARTH_PNG.  Presumably you're editing things.  So, the only 

Yeah, Norman Vine suggested that I simplify my map file.  I am including it
again below.

> other idea I have has to do with recompiling MapServer.  I went back to your 
> original post and looked at your "./mapserv -v" output.  I noticed you had 
> GDAL, TIFF, and JPEG as input.  Please turn TIFF and JPEG off (use 
> "--without-tiff" and "--without-jpeg" when running configure)  if you're 
> using GDAL.  Or turn GDAL off (--without-gdal) and turn on TIFF and JPEG.
> 
> This may or may not have anything to do with your WMS issue but having TIFF 
> and JPEG input enabled along with GDAL is known to cause problems.

Yeah, I tried to make the mapserver simpler.  I disabled everything that
I could, and here is now the output of mapserv -v:

MapServer version 4.0.1 OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER INPUT=GDAL INPUT=SHAPEFILE

But it still only generates a blank image.

Here is my map file now:


# Start of wms.map file

MAP
  NAME SVS
  EXTENT -180 -90 180 90
  STATUS ON

  PROJECTION
    "init=epsg:4326"
  END

  WEB
    METADATA
      "wms_abstract" "Provided by the Scientific Visualization Studio."
      "wms_accessconstraints" "none"
      "wms_fees" "none"
      "wms_onlineresource" "http://svsdev.gsfc.nasa.gov/esok/cgi-bin/map?"
      "wms_title" "NASA GSFC SVS Animation Catalog"
    END
  END

  OUTPUTFORMAT
    NAME png
    DRIVER "GD/PNG"
    MIMETYPE "image/png"
    IMAGEMODE RGB
    EXTENSION "png"
  END

  LAYER
    NAME "EARTH_PNG"
    TYPE RASTER
    STATUS ON
    DATA "earth.png"
    METADATA
      "wms_title" "Earth png"
      "wms_extent" "-110 -20 -70 20"
    END
  END

END

-- 
    ____   __     Eric Sokolowsky    (GST)  NASA Goddard Space Flight Center 
   / __/__/_/__  Visualization Programmer    Scientific Visualization Studio
  / __/ _/ / _/ 301.286.3751                  Mailstop 935.0 Bldg 28 Rm E102
 /___/_//_/__/ eric.sokolowsky at gsfc.nasa.gov   Greenbelt, MD 20771




More information about the mapserver-users mailing list