[mapserver-users] GRIB files

Roberto Garcia,MSc roberto.garcia at cptec.inpe.br
Wed May 13 05:41:48 PDT 2009


Hi, tks for the answers.

According to my gdainfo output file attached, can anyone tell me what 
element could be a CLASSITEM?

I can see my grib using Grads but what tool do I use to translate 
individual bands into GeoTIFF?

Converting the data on-the-fly to an image is the right way to work? 
What are the problems with Apache if I do not do so? 

Tks

Frank Warmerdam wrote:
> Jose Roberto M. Garcia, MSc wrote:
>> Hi all,
>>
>> I'm trying to work with GRIB files in MapServer but it's not working. 
>> I know that when we work with images we need to classify the output 
>> using "[pixel]" as a CLASSITEM and make classes for each value but 
>> how is it for GRIB files? I have several levels an variables in it. 
>> How do I classify them? Does anybody explain me?
>
> Roberto,
>
> It would be helpful if you could make a GRIB file typical of what you 
> want
> to use available for download, so we could speak in the context of 
> that file.
>
> Grib files often include a number of variables.  These variables 
> typically
> get unrolled as bands.  If the variable is 3D (ie. has a time or 
> elevation
> dimension) then it may be unrolled as multiple bands from a GDAL point of
> view.  One sample GRIB file I happen to have ends up with 40 bands, 
> two of
> which look like this when reported by gdalinfo:
>
> Band 1 Block=360x1 Type=Float64, ColorInterp=Undefined
>   Description = 5[m] DBSL (Depth below sea level)
>   Metadata:
>     GRIB_UNIT=[K]
>     GRIB_COMMENT=Potential temperature [K]
>     GRIB_ELEMENT=POT
>     GRIB_SHORT_NAME=5-DBSL
>     GRIB_REF_TIME=  1130716800 sec UTC
>     GRIB_VALID_TIME=  1133308800 sec UTC
>     GRIB_FORECAST_SECONDS=2592000 sec
> Band 2 Block=360x1 Type=Float64, ColorInterp=Undefined
>   Description = 15[m] DBSL (Depth below sea level)
>   Metadata:
>     GRIB_UNIT=[K]
>     GRIB_COMMENT=Potential temperature [K]
>     GRIB_ELEMENT=POT
>     GRIB_SHORT_NAME=15-DBSL
>     GRIB_REF_TIME=  1130716800 sec UTC
>     GRIB_VALID_TIME=  1133308800 sec UTC
>     GRIB_FORECAST_SECONDS=2592000 sec
>
> As you can see these are temperature values for different depths
> below sea level.
>
> Once you know what band(s) you want to work with in MapServer you can
> select them using the BANDS= processing directive.
>
>   eg.
>    PROCESSING "BANDS=2"
>
> would select the 2nd band for display.
>
> Then you can use classification as you describe.  In this case the
> pixel values are presumably floating point temperatures measured in
> degrees Kelvin though I'm not that familiar with the product.  Pay
> particular attention to the online mapserver docs on classifying
> non-8bit data as there are some caveats in this regard. I hope this
> gets you going.
>
> I would suggest:
>   o inspecting your file(s) with gdalinfo, reviewing the metadata.
>   o Translate individual bands into GeoTIFF files and visualize
>     and inspect the results with desktop software like QGIS or OpenEV.
>
> Then move to mapserver once you are more comfortable you know how
> the data is being represented through GDAL.
>
> Best regards,
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: gdainfo.txt
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20090513/7422b0c5/attachment.txt>


More information about the MapServer-users mailing list