[mapserver-users] raster layer problem in mapfile
Balázs Bámer
bamerbalazs at gmail.com
Thu Feb 19 11:41:53 PST 2009
Hi All,
I try to make a simple classified raster mapfile. However, Mapserver
5.2.1 always ends up with this in log: msWMSLoadGetMapParams(): WMS
server error. Invalid layer(s) given in the LAYERS parameter.
OS is Ubuntu Linux 8.10, Mapserver was compiled with ./configure
--with-oci --with-oraclespatial=/usr/local/instantclient_11_1
--with-proj --with-threads --with-gdal --with-ogr --with-jpeg
--with-png=/usr/lib --with-php=/usr/include/php5
The jpg file is greyscale, and there is also a vakterkep.wld world
file. Paths should be OK because it was derived from an earlier one
using shapefiles. Server response is
<ServiceExceptionReport version="1.1.1">
<ServiceException code="LayerNotDefined">
msWMSLoadGetMapParams(): WMS server error. Invalid layer(s) given in
the LAYERS parameter.
</ServiceException>
</ServiceExceptionReport>
What is the problem?
Thank you in advance, best regards: Balázs Bámer
mapfile contents:
#
# Start of GMAP map file
#
#
MAP
NAME KATEGORIAS
STATUS ON
SIZE 650 500
# xmin ymin xmax ymax?
EXTENT 420000 40000 950000 370000
UNITS METERS
PROJECTION
"init=epsg:23700"
END
SHAPEPATH "."
IMAGECOLOR 200 200 200
DEBUG 5
CONFIG "MS_ERRORFILE" "/var/log/mapserver/error.txt"
CONFIG "ON_MISSING_DATA" "LOG"
#
# Start of web interface definition
#
WEB
MINSCALE 10000
MAXSCALE 1000000
IMAGEPATH "/tmp"
IMAGEURL "/tmp"
LOG "/var/log/mapserver/ms_error.txt"
METADATA
"wms_title" "kategorias proba"
"wms_onlineresource" "http://att-it.homelinux.net:22080/cgi-bin/kategorias"
END
END
#
# Start of legend
#
LEGEND
LABEL
TYPE BITMAP
SIZE MEDIUM
COLOR 0 0 89
END
STATUS ON
END
#
# Start of scalebar
#
SCALEBAR
IMAGECOLOR 255 255 255
LABEL
COLOR 0 0 0
SIZE SMALL
END
SIZE 150 5
COLOR 255 255 255
BACKGROUNDCOLOR 0 0 0
OUTLINECOLOR 0 0 0
UNITS meters
INTERVALS 5
STATUS ON
END
QUERYMAP
STYLE HILITE
COLOR 255 0 0
END
#
# Start of layer definitions
#
LAYER
NAME kategorias
METADATA
"DESCRIPTION" "kategorias"
"wms_title" "kategorias"
# "wms_srs" "EPSG:23700" nem kell orokli terkepet
"ows_include_items" "all"
END
PROJECTION
"init=epsg:23700"
END
TYPE RASTER
STATUS ON
DATA "vakterkep.jpg"
CLASS
EXPRESSION ([pixel]<64)
STYLE
COLOR 0 32 64
END
END
CLASS
EXPRESSION ([pixel]>=64 and [pixel]<128)
STYLE
COLOR 0 64 128
END
END
CLASS
EXPRESSION ([pixel]>=128 and [pixel]<192)
STYLE
COLOR 0 96 192
END
END
CLASS
EXPRESSION ([pixel]>=192)
STYLE
COLOR 0 128 255
END
END
END # layer
END # Map File
More information about the MapServer-users
mailing list