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

2009-04-29 Thread Peter Willis

Frank Warmerdam wrote:


One SDS with more than one band (ie. rank 3 with the third rank
more than a dimension of 1) is accessed normally as long as you want
to use the first three bands as RGB.  If you want to control which bands
you use, add the BANDS PROCESSING option.

eg.

PROCESSING BANDS=4,2,1

The tricky case is more than one SDS which is normally when you
start seeing subdatasets.  Normally you would use gdalinfo to
identify what subdatasets are available.




Hello Frank,

Thanks for clarifying. Maybe I should be filling out
the wiki somewhere regarding this information.

Peter
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


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

2009-04-28 Thread Peter Willis

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:

LAYER
  NAME chlorophyll
  METADATA
wcs_label   L3MG8D9KM/Chlorophyll
wcs_rangeset_name   Range 1
wcs_rangeset_label  Chlorophyll_DN
  END
  TYPE RASTER
  STATUS ON
  DATA 'HDF4:/public/A20081932008200.L3m_8D_CHLO_9.hdf://l3m_data'
  PROCESSING   BANDS=1
  PROJECTION
init=epsg:4326
  END
  DUMP TRUE
END


I am not sure I have the format of the DATA entity correct.

Thanks for any pointers,

Peter
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


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

2009-04-28 Thread Frank Warmerdam

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,
--
---+--
I set the clouds in motion - turn up   | Frank Warmerdam, warmer...@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush| Geospatial Programmer for Rent

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


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

2009-04-28 Thread Peter Willis

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_yo...@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=200821020255
   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.00|DATAMAX = 
0.00|LONWEST = -180.00|LONEAST = 180.00|LATSOUTH = 
-90.00|LATNORTH = 90.00|RESOLUTION = 9km|PROJECTION = 
RECT|GAP_FILL = 0|SEAM_LON = -180.00|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=200819307727
   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.0834
   Longitude Step=0.0834
   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_yo...@linux-svn:/public#
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


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

2009-04-28 Thread Frank Warmerdam

Peter Willis wrote:

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:

...

Peter,

Then the file appears to be a simple SDS dataset, and you don't need to do
anything special.  Just put the name of the file in the DATA statement.

The more complex syntaxes are only needed when one hdf file contains
many products.

Best regards,
--
---+--
I set the clouds in motion - turn up   | Frank Warmerdam, warmer...@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush| Geospatial Programmer for Rent

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users