[ms4w-users] WMS format question
Smith, Michael
Michael.Smith at maine.gov
Tue Dec 4 16:37:21 EST 2007
Greetings,
I am a newbie to MapServer and WMS, but an old ESRI hand. I have
MapServer (MS4W) running with ka-Map on a Windows XP PC. I have created
a simple MapServer .map file which works fine in ka-Map. Since it is
based on raster data (MrSID file which is 24-bit NAIP 2007 orthophoto
mosaic), I set the output format to JPEG. This works fine in ka-Map and
looks the way I want it. However, when I add this WMS to ArcMap, it
appears to make 8-bit files.
I can see in my temp folders that indeed, the ka-Map output is JPEG like
I want, but the ArcMap output is PNG. The JPEGs are nice 24-bit images
and the PNGs 8-bit garbage.
Any suggestions? My .map file is below. Looking at web resources, it
seems like I need a "wms_format" "img/jpeg" somewhere, but after many
permutations of those parameters in my map file, I still can't seem to
get jpegs in ArcGIS, only PNGs.
***********
Michael Smith
Maine DEP/OIT
#
# Start of GMAP map file
#
#
NAME GMAP_DEMO
STATUS ON
SIZE 400 300
SYMBOLSET ../etc/symbols.sym
EXTENT 413000 4837000 446000 4894000
UNITS METERS
SHAPEPATH "../medata"
IMAGECOLOR 255 255 255
FONTSET ../etc/fonts.txt
OUTPUTFORMAT
NAME jpeg
DRIVER "GD/JPEG"
IMAGEMODE RGB
EXTENSION "jpeg"
FORMATOPTION "QUALITY=75,PROGRESSIVE=TRUE"
END
#
# Start of web interface definition
#
WEB
# Scales commented out for WMS
# MINSCALE 5000
# MAXSCALE 350000
#
# On Windows systems, /tmp and /tmp/ms_tmp/ should be created at the
root
# of the drive where the .MAP file resides.
#
IMAGEPATH "/ms4w/tmp/ms_tmp/"
IMAGEURL "/ms_tmp/"
# For WMS
METADATA
"wms_title" "wms_demo"
"wms_onlineresource"
"http://csu-eia1pcgis2.som.w2k.state.me.us/cgi-bin/mapserv.exe?map=c:/ms
4w/apps/gmap/htdocs/gmap75.map&"
"wms_srs" "EPSG:26919"
END
END
#
# Projection - required for WMS
#
PROJECTION
"init=epsg:26919"
END
#
# Start of reference map
#
REFERENCE
IMAGE meimages/keymap.png
EXTENT 413000 4837000 446000 4894000
STATUS ON
COLOR -1 -1 -1
OUTLINECOLOR 255 0 0
SIZE 116 116
END
#
# Start of legend
#
LEGEND
KEYSIZE 18 12
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 kilometers
INTERVALS 5
STATUS ON
END
QUERYMAP
STYLE HILITE
COLOR 255 0 0
END
#
# Start of layer definitions
#
LAYER
NAME naip2007
METADATA
"wms_title" "NAIP 2007"
END
TYPE RASTER
STATUS ON
DATA sagadahoc.sid
PROJECTION
"init=epsg:26919"
END
END
END # Map File
More information about the ms4w-users
mailing list