[mapserver-users] Accessing metadata from datafile in mapfile

Espen.Messel at ffi.no Espen.Messel at ffi.no
Fri Jan 30 02:08:37 PST 2009


Hello.

 

Is it possible to access metadata from the data file in a mapfile? We
get data from variable sources and need to scale the colour lookup table
with a metadata item from the data file. We tried to write the name of
the metadata directly in the mapfile, but it didn't work. Look below in
the EXPRESSION line in the mapfile. 

 

I have also added the output from the gdalinfo command.

 

Regards,

 

Espen Messel

------------------------------------------------------------------------
----------------

 

LAYER

   NAME "radar"

   STATUS DEFAULT

   TYPE RASTER

   DUMP TRUE

   STATUS OFF

   DATA
'HDF5:"d:\\etc\data\norsa.ss.pcappi-1116-dbz.aeqd-1000.20080828T080038Z.
hdf"://image1/data'

 

METADATA

"wms_extent" "5.706560 61.303028 15.411345 65.598137"

"ows_include_items"     "all"

"ows_title"             "radar"

END

 

  CLASS

    EXPRESSION (([pixel]*[what:gain]) >= 64)

    COLOR 255 0 0

  END

+++

 

END

 

------------------------------------------------------------------------
----------------

gdalinfo output

 

Driver: HDF5/Hierarchical Data Format Release 5

Files: norsa.ss.pcappi-1116-dbz.aeqd-1000.20080828T080038Z.hdf

Size is 512, 512

Coordinate System is `'

Metadata:

.....

  what:gain=0.500000

  what:offset=-31.500000

  what:nodata=255.000000

 .....

Subdatasets:

 
SUBDATASET_0_NAME=HDF5:"norsa.ss.pcappi-1116-dbz.aeqd-1000.20080828T0800
38Z.hdf"://image1/data

  SUBDATASET_0_DESC=[480x480] //image1/data (8-bit unsigned character)

Corner Coordinates:

Upper Left  (    0.0,    0.0)

Lower Left  (    0.0,  512.0)

Upper Right (  512.0,    0.0)

Lower Right (  512.0,  512.0)

Center      (  256.0,  256.0)

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20090130/c64e0368/attachment.htm>


More information about the MapServer-users mailing list