[mapserver-users] Mapfile HDF 'DATA' element format

Peter Willis peterw at borstad.com
Tue Apr 28 19:26:00 EDT 2009


Frank Warmerdam wrote:
> Peter Willis wrote:
>> Hello,
>>
>> Where can I find the specification for the
>> 'DATA' entry in mapserver MAP files where
>> HDF files are being used?
>>
>> I am mostly interested in using these in
>> the context of WCS.
>>
>> Here is my current non-working example of an HDF
>> file test in my current WCS map file:
> ...
>>   DATA 'HDF4:/public/A20081932008200.L3m_8D_CHLO_9.hdf://l3m_data'
> 
> Peter,
> 
> You need to use the gdalinfo command on the .hdf base file to get
> a list of subdatasets within the file.  If the gdalinfo reports something
> like:
> 
> 
> SUBDATASET_16_NAME=HDF4_EOS:EOS_SWATH:"MOD07_L2.A2000110.0220.002.2000196104217.hdf":mod07:Retrieved_Moisture_Profile 
> 
>   SUBDATASET_16_DESC=[20x406x270] Retrieved_Moisture_Profile mod07 
> (16-bit integer)
> SUBDATASET_17_NAME=HDF4_EOS:EOS_SWATH:"MOD07_L2.A2000110.0220.002.2000196104217.hdf":mod07:Retrieved_Height_Profile 
> 
>   SUBDATASET_17_DESC=[20x406x270] Retrieved_Height_Profile mod07 (16-bit 
> integer)
> 
> Then you might put the following in your .map file:
> 
>   DATA 
> 'HDF4_EOS:EOS_SWATH:"MOD07_L2.A2000110.0220.002.2000196104217.hdf":mod07:Retrieved_Moisture_Profile' 
> 
> 
> 
> The key is to use _NAME portion of the subdatasets reported by gdalinfo.
> 
> Best regards,

Hello Frank,

I don't get any of those entries when I run gdalinfo against the file.
There is one SDS in the root of the HDF file called 'l3m_data'.

Here is an example of what I get with gdalinfo:

  some_yokel at linux-svn:/public# gdalinfo A20081932008200.L3m_8D_CHLO_9.hdf

  Driver: HDF4Image/HDF4 Dataset
  Size is 4320, 2160
  Coordinate System is `'
  Metadata:
    Product Name=A20081932008200.L3m_8D_CHLO_9
    Sensor Name=MODISA
    Sensor=
    Title=MODISA Level-3 Standard Mapped Image
    Data Center=
    Station Name=
    Station Latitude=0
    Station Longitude=0
    Mission=
    Mission Characteristics=
    Sensor Characteristics=
    Product Type=8-day
    Replacement Flag=ORIGINAL
    Software Name=smigen
    Software Version=3.60
    Processing Time=2008210202550000
    Input Files=A20081932008200.L3b_8D.main
    Processing Control=smigen par=A20081932008200.L3m_8D_CHLO_9.param
    Input Parameters=IFILE = 
/data1/sdpsoper/vdc/vpu4/workbuf/A20081932008200.L3b_8D.main|OFILE = 
A20081932008200.L3m_8D_CHLO_9|PFILE = |PROD = chlor_a|PALFILE = 
DEFAULT|RFLAG = ORIGINAL|MEAS = 1|STYPE = 0|DATAMIN = 0.000000|DATAMAX = 
0.000000|LONWEST = -180.000000|LONEAST = 180.000000|LATSOUTH = 
-90.000000|LATNORTH = 90.000000|RESOLUTION = 9km|PROJECTION = 
RECT|GAP_FILL = 0|SEAM_LON = -180.000000|PRECISION=I
    L2 Flag 
Names=ATMFAIL,LAND,HILT,HISATZEN,STRAYLIGHT,CLDICE,COCCOLITH,LOWLW,CHLFAIL,PRODFAIL,CHLWARN,NAVWARN,MAXAERITER,ATMWARN,HISOLZEN,NAVFAIL,FILTER,HIGLINT
    Period Start Year=2008
    Period Start Day=193
    Period End Year=2008
    Period End Day=200
    Start Time=2008193000007727
    End Time=2008201023506024
    Start Year=2008
    Start Day=193
    Start Millisec=7727
    End Year=2008
    End Day=201
    End Millisec=9306024
    Start Orbit=0
    End Orbit=0
    Orbit=0
    Map Projection=Equidistant Cylindrical
    Latitude Units=degrees North
    Longitude Units=degrees East
    Northernmost Latitude=90
    Southernmost Latitude=-90
    Westernmost Longitude=-180
    Easternmost Longitude=180
    Latitude Step=0.08333334
    Longitude Step=0.08333334
    SW Point Latitude=-89.95834
    SW Point Longitude=-179.9583
    Data Bins=7128918
    Number of Lines=2160
    Number of Columns=4320
    Parameter=Chlorophyll a concentration
    Measure=Mean
    Units=mg m^-3
    Scaling=logarithmic
    Scaling Equation=Base**((Slope*l3m_data) + Intercept) = Parameter value
    Base=10
    Slope=5.813776e-05
    Intercept=-2
    Scaled Data Minimum=0.01
    Scaled Data Maximum=64.5654
    Data Minimum=0.005747
    Data Maximum=99.93153
    Scaling=logarithmic
    Scaling Equation=Base**((Slope*l3m_data) + Intercept) = Parameter value
    Base=10
    Slope=5.813776e-05
    Intercept=-2
  Corner Coordinates:
  Upper Left  (    0.0,    0.0)
  Lower Left  (    0.0, 2160.0)
  Upper Right ( 4320.0,    0.0)
  Lower Right ( 4320.0, 2160.0)
  Center      ( 2160.0, 1080.0)
  Band 1 Block=4320x1 Type=UInt16, ColorInterp=Gray

  some_yokel at linux-svn:/public#


More information about the mapserver-users mailing list