[Mapserver-users] Transparency and WMS
Matthew Perry
mtperry78 at sbcglobal.net
Thu Jan 15 02:53:06 PST 2004
Hello,
I've been trying to get mapserver to display a
partially transparent shaded relief over a DRG. Both
layers are WMS and display correctly individually. I
have tried many combinations of image types and
various mapfile settings but no luck. Am I
understanding TRANSPARENCY correctly.. that it makes
all pixels semi-transparent? Or does it make certain
classes of pixels completely transparent? Is
TRANSPARENCY set to work with WMS layers or just local
images??
Thanks for any help!!
Matthew Perry
Environmental and Natural Resource Sciences
Humboldt State University
##########################
Here is the version info:
---
MapServer version 4.0.1 OUTPUT=PNG OUTPUT=JPEG
OUTPUT=WBMP OUTPUT=PDF SUPPORTS=PROJ SUPPORTS=FREETYPE
SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT
SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT INPUT=TIFF
INPUT=EPPL7 INPUT=JPEG INPUT=POSTGIS INPUT=OGR
INPUT=GDAL INPUT=SHAPEFILE
Here is the mapfile:
---
NAME TEST
STATUS ON
SIZE 800 600
EXTENT 495601.000000 4497668.787234 510859.000000
4515663.212766
UNITS METERS
SHAPEPATH "/data/"
IMAGECOLOR 255 255 255
WEB
IMAGEPATH "/tmp/ms_tmp/"
IMAGEURL "/ms_tmp/"
END
OUTPUTFORMAT
NAME PNG
DRIVER "GD/PNG" # Would GDAL work??
IMAGEMODE RGBA # SHOULD THIS BE RGB, PC256,
FLoat32??
TRANSPARENT ON # This seems to refer to a
different sort of transparency...
# just turing off certain
pixels in a raster image
END
PROJECTION
"init=epsg:26910" # UTM
zone 10, Nad83, meters
END
##### WMS Layer: Topo quad from terraserver #####
LAYER
NAME "wms_map"
TYPE RASTER
STATUS DEFAULT
CONNECTION "http://terraservice.net/OgcMap.ashx?"
CONNECTIONTYPE WMS
METADATA
"wms_srs" "EPSG:26910"
"wms_name" "DRG"
"wms_server_version" "1.1.1"
"wms_format" "image/jpeg"
"wms_layers" "drg"
END
PROJECTION
"init=epsg:26910"
END
END
##### WMS Layer: shaded relief from usgs national
elevation dataset #####
LAYER
NAME "wms_ned"
TYPE RASTER
STATUS DEFAULT
TRANSPARENCY 50 # Set
transparency to 50% .... DOESNT WORK?????
#PROCESSING "COLOR_MATCH_THRESHOLD=3" # Suggest
in listserv for transparencies
#OFFSITE 0 0 0 # SEEMS
TO REMOVE PIXELS OF A CERTAIN VALUE
CONNECTION
"http://gisdata.usgs.net:80/servlet/com.esri.wms.Esrimap?servicename=USGS_WMS_NED&"
CONNECTIONTYPE WMS
METADATA
"wms_srs" "EPSG:4326"
"wms_name" "US_NED_Shaded_Relief"
"wms_server_version" "1.0.0"
"wms_format" "image/jpeg"
END
PROJECTION
"init=epsg:26910"
END
END
END
More information about the MapServer-users
mailing list