Kevin,<br><br>Try the GDALDataset::GetGeoTransform() and the GDALDataset::GetProjectionRef() functions on the subdataset.<br>Here is some sample code: <a href="http://trac.osgeo.org/gdal/browser/trunk/gdal/apps/gdal_translate.cpp#L435">http://trac.osgeo.org/gdal/browser/trunk/gdal/apps/gdal_translate.cpp#L435</a><br>
<br><div class="gmail_quote">2010/3/2 Kevin Lin <span dir="ltr"><<a href="mailto:bjlin.sw@gmail.com">bjlin.sw@gmail.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><br> hi,all<br><br>I have a problem when I use the gdal to open
the modis Hdf4 file.<br>when I get the latitude and the Longitude, I do not know
how to read it.<br><br>is it use GetMetadata( "SUBDATASETS" )?<br>but the
SUBDATASETS, don't include the geolocation information.<br><br>in the hdf4 file,
ther is a geolocation fields, data fields and swatch attributes.<br>when I
read the data in the data fields, I use GetMetadata( "SUBDATASETS"
).<br>but I do not know how to read the data in the geolocation
fields.<br><br>can anyone help me?<br><br>best
regards.<br><br><br><br><br><br> Kevin Lin <br> <a href="mailto:Bjlin.sw@gmail.com" target="_blank">Bjlin.sw@gmail.com</a>
<br> 2010-03-02 <br></div>
<br>_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br></blockquote></div><br><br clear="all"><br>-- <br>Best regards,<br>Chaitanya kumar CH.<br>
/tʃaɪθənjə/ /kʊmɑr/ <br>+91-9848167848<br>17.241582N 80.142635E<br>