[gdal-dev] ask for help about the reading of the hdf4 file of the modis

Chaitanya kumar CH chaitanya.ch at gmail.com
Tue Mar 2 04:43:19 EST 2010


Kevin,

Try the GDALDataset::GetGeoTransform() and the
GDALDataset::GetProjectionRef() functions on the subdataset.
Here is some sample code:
http://trac.osgeo.org/gdal/browser/trunk/gdal/apps/gdal_translate.cpp#L435

2010/3/2 Kevin Lin <bjlin.sw at gmail.com>

>
>  hi,all
>
> I have a problem when I use the gdal to open the modis Hdf4 file.
> when I get the latitude and the Longitude, I do not know how to read it.
>
> is it use GetMetadata( "SUBDATASETS" )?
> but the SUBDATASETS, don't include the geolocation information.
>
> in the hdf4 file, ther is a geolocation fields, data fields and swatch
> attributes.
> when I read the data in the data fields, I use GetMetadata( "SUBDATASETS"
> ).
> but I do not know how to read the data in the geolocation fields.
>
> can anyone help me?
>
> best regards.
>
>
>
>
>
> Kevin Lin
> Bjlin.sw at gmail.com
> 2010-03-02
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
Best regards,
Chaitanya kumar CH.
/tʃaɪθənjə/ /kʊmɑr/
+91-9848167848
17.241582N 80.142635E
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20100302/db378ddb/attachment.html


More information about the gdal-dev mailing list