[gdal-dev] Re: How to use gdalinfo for HDF- Windows

Brent Fraser bfraser at geoanalytic.com
Wed Aug 10 10:16:27 EDT 2011


Luisa,

   That sounds like a bug.  A possible work-around might be to set your 
current working directory to D and don't put the drive letter in the 
filepath:

         cd D:
         gdalinfo \data\GL.hdf

But this may not work with your desire to use a GRASS script...

Best Regards,
Brent Fraser


On 8/10/2011 2:55 AM, Luisa Peña wrote:
> Hey Brent
> I'm using ESA's GLOBCOVER data.In this case I'm trying to set a GRASS 
> script to run gdal directly.
> I do:
> gdalinfo C:\data\GL.hdf and I retrieve all basic information plus 
> HDF's layers
> Driver: HDF4/Hierarchical Data Format Release 4
> Files: c:\data\GL.hdf
> Size is 512, 512
> Coordinate System is `'
> Metadata:
>   HDFEOSVersion=HDFEOS_V2.12
> Subdatasets:
>   SUBDATASET_1_NAME=HDF4_EOS:EOS_GRID:"c:\data\GL.hdf":POSTEL:MEAN_1
>   SUBDATASET_1_DESC=[1800x1800] MEAN_1 POSTEL (16-bit integer)
>  SUBDATASET_2_NAME=HDF4_EOS:EOS_GRID:"c:\data\GL.hdf":POSTEL:MEAN_2
>   SUBDATASET_2_DESC=[1800x1800] MEAN_2 POSTEL (16-bit integer)
>   SUBDATASET_3_NAME=HDF4_EOS:EOS_GRID:"c:\data\GL.hdf":POSTEL:MEAN_3
>   SUBDATASET_3_DESC=[1800x1800] MEAN_3 POSTEL (16-bit integer)
>   SUBDATASET_4_NAME=HDF4_EOS:EOS_GRID:"c:\data\GL.hdf":POSTEL:MEAN_4
>   SUBDATASET_4_DESC=[1800x1800] MEAN_4 POSTEL (16-bit integer)
>   SUBDATASET_5_NAME=HDF4_EOS:EOS_GRID:"c:\data\GL.hdf":POSTEL:MEAN_5
> (...)
> then:
> gdalinfo HDF4_EOS:EOS_GRID:"c:\data\GL.hdf":POSTEL:MEAN_1
> I get:
> ERROR 4: 'HDF4_EOS:EOS_GRID:c:\data\GL.hdf:POSTEL:MEAN_1'
> does not exist in fyle system, and is not recognised as a supported 
> dataset name.
> gdalinfo failed- unable to open 
> 'HDF4_EOS:EOS_GRID:c:\data\GL.hdf:POSTEL:MEAN_1''
> open GDAL Datasets:
> 1 N DriverIsNULL 512x512x0
> But if I do:
> gdalinfo HDF4_EOS:EOS_GRID:":\data\GL.hdf":POSTEL:MEAN_1
> it works (without the C from the driver)
> The problem is that if I'm trying to to use data in D it does not work.
> Any suggestions?
>
>
> 2011/8/9 Brent Fraser <bfraser at geoanalytic.com 
> <mailto:bfraser at geoanalytic.com>>
>
>     Luisa,
>
>       I use GDAL to access MODIS data in HDF4 on Windows like this:
>
>     gdalinfo
>     HDF4_EOS:EOS_SWATH:"G:\Projects\temp\image3\MOD02HKM.A2011186.1640.005.NRT.hdf":MODIS_SWATH_Type_L1B:EV_500_RefSB
>
>     So I'd suggest using double quotes around your path.
>
>     Best Regards,
>     Brent Fraser
>
>
>     On 8/9/2011 8:24 AM, Luisa Peña wrote:
>>     Greetings
>>
>>     This seems odd but it does not work with
>>     HDF4_EOS:EOS_GRID:C:/filepath
>>     only
>>     HDF4_EOS:EOS_GRID:filepath
>>
>>     And if my MERIS data is not placed in my main hard disk (C:) it
>>     does not work.
>>     Anyone with some experience on this in WINDOWS?
>>
>>     Thanks
>>     Luisa
>>
>>
>>     _______________________________________________
>>     gdal-dev mailing list
>>     gdal-dev at lists.osgeo.org  <mailto:gdal-dev at lists.osgeo.org>
>>     http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20110810/c40da4d4/attachment-0001.html


More information about the gdal-dev mailing list