[gdal-dev] how to handle the hdf4 using gdal
maven apache
apachemaven0 at gmail.com
Mon Sep 14 21:28:21 EDT 2009
Hi :
I want to handle some hdf4 data using gdal,and my goal is to get the
subdatasetname of one hdf4,and I know I can use the gdalinfo to get the
information,however what I get is just some plain text format as follows:
-------------------------
WESTBOUNDINGCOORDINATE=94.0216705976118
NORTHBOUNDINGCOORDINATE=58.2075179501186
EASTBOUNDINGCOORDINATE=131.825225491885
SOUTHBOUNDINGCOORDINATE=36.448663754723
PROCESSINGENVIRONMENT=Linux minion5141 2.6.8.1-25mdksmp #1 SMP Tue May 31
09:52:06 MDT 2005 i686 IntelR PentiumR III CPU family 1133MHz unknown
GNU/Linux
DESCRREVISION=5.0
Subdatasets:
SUBDATASET_1_NAME=HDF4_EOS:EOS_SWATH:"D:\data\HDF\MYD29.A2009061.0520.005.2009062044632.hdf":MOD_Swath_Sea_Ice:Sea_Ice_by_Reflectance
SUBDATASET_1_DESC=[2030x1354] Sea_Ice_by_Reflectance MOD_Swath_Sea_Ice
(8-bit unsigned integer)
SUBDATASET_2_NAME=HDF4_EOS:EOS_SWATH:"D:\data\HDF\MYD29.A2009061.0520.005.2009062044632.hdf":MOD_Swath_Sea_Ice:Sea_Ice_by_Reflectance_Pixel_QA
SUBDATASET_2_DESC=[2030x1354] Sea_Ice_by_Reflectance_Pixel_QA
MOD_Swath_Sea_Ice (8-bit unsigned integer)
SUBDATASET_3_NAME=HDF4_EOS:EOS_SWATH:"D:\data\HDF\MYD29.A2009061.0520.005.2009062044632.hdf":MOD_Swath_Sea_Ice:Ice_Surface_Temperature
SUBDATASET_3_DESC=[2030x1354] Ice_Surface_Temperature MOD_Swath_Sea_Ice
(16-bit unsigned integer)
SUBDATASET_4_NAME=HDF4_EOS:EOS_SWATH:"D:\data\HDF\MYD29.A2009061.0520.005.2009062044632.hdf":MOD_Swath_Sea_Ice:Ice_Surface_Temperature_Pixel_QA
SUBDATASET_4_DESC=[2030x1354] Ice_Surface_Temperature_Pixel_QA
MOD_Swath_Sea_Ice (8-bit unsigned integer)
-------------------------------------------------------------------------------
So if I want to extract the subdataset name I should parser the text by
myself,
I wonder if there are some liberary can do it using its method(maybe like
this [getSubDataSetArrry()]).
BTW,I am using java,and I want to know how to install the gdal in the xp os?
Since I am using the gdal included in FWTools2.2.8,so I have to install the
FWTTools frist,I wonder if there is other easy way?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20090915/5c38d81c/attachment.html
More information about the gdal-dev
mailing list