[mapserver-users] WMS from netCDF returns white/transparent image

William Hudspeth bhudspeth at edac.unm.edu
Mon Jun 22 08:51:16 PDT 2015


Hello,

I am trying to generate WMS services from layers in a NetCDF file. WCS 
services already work well...While a WMS call does return an image (ex. 
PNG), it is all white or transparent, whereas a WCS call to the same 
layer returns an image with a range of pixel values. I have run gdalinfo 
on the layer to get the data range, and have tried using the data range 
to set the PROCESSING DIRECTIVE to scale the output (e.g. PROCESSING 
"SCALE=311.76470947266 ,423.52941894531 " ). I have also used the 
SCALE=AUTO directive, but both just return a white image. When I try 
using WMS on this layer in QGIS, it is correctly projected, but 
invisible (zoom to extents on the imported WMS layer is correct). Below 
is the output from gdalinfo to get the original data range, and then the 
mapfile entry for the layer to see how I have set this up....

gdalinfo NETCDF:"flat_sample.nc":I_lw

Band 1 Block=170x1 Type=Float32, ColorInterp=Undefined

Min=311.765 Max=423.529
Minimum=311.765, Maximum=423.529, Mean=344.247, StdDev=16.599
NoData Value=9.96920996838686905e+36
Metadata:
ipw_desc=incoming thermal (long-wave) radiation
NETCDF_DIM_time=14
NETCDF_VARNAME=I_lw
standard_name=downwelling_longwave_flux_in_air
STATISTICS_MAXIMUM=423.52941894531
STATISTICS_MEAN=344.24709697293
STATISTICS_MINIMUM=311.76470947266
STATISTICS_STDDEV=16.598777681661
units=W m-2

********************************************************************************

LAYER

DATA 
'NETCDF:"/geodata/watershed-data/8c/8c18e10f-44b0-4462-bf4f-1c27c984aece/flat_sample.nc":I_lw'
EXTENT -116.142905556 43.7294055556 -116.137583333 43.7326972222
METADATA
"wcs_label" "downwelling_longwave_flux_in_air"
"layer_title" "downwelling_longwave_flux_in_air"
"raster_selected" "yes"
"wms_metadataurl_type" "FGDC-STD-001-1998"
"ows_keywordlist" ""
"wcs_formats" "GEOTIFF_16"
"background" "no"
"wcs_bands_description" "ISNoBal Timesteps 1-16"
"ows_abstract" "incoming thermal (long-wave) radiation"
"wcs_rangeset_name" "Timesteps"
"wms_metadataurl_href" 
"http://129.24.63.85//apps/vwp/datasets/05e73f4f-51d3-417c-9757-e376b5969a9c/metadata/FGDC-STD-001-1998.xml"
"wcs_bands_values" "1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16"
"legend_display" "yes"
"queryable" "no"
"wcs_rangeset_label" "netCDF flat_sample.nc"
"time_sensitive" "no"
"ows_srs" "epsg:26911"
"wcs_bands_name" "Timestep"
"wcs_bands_rangeitem" "_bands"
"ows_title" "incoming thermal (long-wave) radiation""static" "no"
"wms_metadataurl_format" "text/xml"
"wcs_bands_label" "Timestep Number"
"wcs_rangeset_axes" "bands"
"wms_encoding" "UTF-8"
"wcs_enable_request" "*"
"layer_data_units" "W m-2"
"annotation_name" "downwelling_longwave_flux_in_air: 2015-06-19 
20:30:29.202558"
END # METADATANAME "downwelling_longwave_flux_in_air"
PROCESSING "CLOSE_CONNECTION=DEFER"
PROCESSING "SCALE=311.76470947266 ,423.52941894531 "
#PROCESSING “SCALE=AUTO”
PROJECTION
"init=epsg:26911"
END # PROJECTION
STATUS ON
TILEITEM "location"
TYPE RASTER
UNITS METERS
END # LAYER

********************************************************************************

It seems I am missing something here....would appreciate any insight 
into how to return a valid image in WMS....

Thanks, Bill


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20150622/c310d750/attachment.html>


More information about the mapserver-users mailing list