WMS を使用して、Web 上でラスター マップを geotiff 形式で表示しようとしています。ラスターファイルを分類したい。これどうやってするの?Windows用のmapserverを使用しています。以下は私の .map ファイルです。私がこれを通して得るものは
MAP
NAME PM10
IMAGECOLOR 255 255 255
SIZE 600 800
IMAGETYPE PNG24 ## use AGG to for anti-aliassing
OUTPUTFORMAT
NAME 'AGG'
DRIVER AGG/PNG
MIMETYPE "image/png"
IMAGEMODE RGB
EXTENSION "png"
END # outputformat
PROJECTION
"init=epsg:3035" #latlon on etrs 1989 laea
END
EXTENT 3487500 2297500 4402500 3202500 # meters extents of region2
WEB
IMAGEPATH "c:/tmp/ms_tmp/"
IMAGEURL "/ms_tmp/"
METADATA
"ows_enable_request" "*"
"map" "C:/ms4w/apps/airpollution/config.map"
"ows_schemas_location" "http://schemas.opengeospatial.net"
"ows_title" "Sample WMS"
"ows_enable_request" "*"
"ows_onlineresource" "http://localhost:7070/cgi-bin/mapserv.exe? map=C:/ms4w/apps/airpollution/config.map&"
"ows_srs" "EPSG:3035 " #latlon
"wms_feature_info_mime_type" "text/plain"
"wms_feature_info_mime_type" "text/html"
"wms_server_version" "1.1.1"
"wms_formatlist" "image/png,image/gif,image/jpeg, image/geotiff"
"wms_format" "image/geotiff"
END #metadata
END #web
LAYER
NAME "pm10"
DATA "pm10.tif"
TYPE RASTER
STATUS ON
METADATA
"ows_title" "pollution"
END #metadata
PROJECTION
"init=epsg:3035"
END #projection
CLASSITEM "[pixel]"
# class using simple string comparison, equivelent to ([pixel] = 0)
CLASS
EXPRESSION "0"
STYLE
COLOR 20 20 20
END
END
# class using an EXPRESSION using only [pixel].
CLASS
EXPRESSION ([pixel] >= 0AND [pixel] < 7)
STYLE
COLOR 255 0 0
END
CLASS
EXPRESSION ([pixel] >= 7AND [pixel] < 20)
STYLE
COLOR 0 255 0
END
END
CLASS
EXPRESSION ([pixel] >= 7AND [pixel] < 50)
STYLE
COLOR 0 0 255
END
END
END #layer pm10
END #map
そして、私が応答として得るのはこの画像です
3行目しか読み取らないようです
IMAGECOLOR 255 255 255