[gdal-dev] Covert MODIS Land Temperatures Sinusoidal to Lat Lon
Vincent Schut
schut at sarvision.nl
Thu Dec 1 05:11:57 EST 2011
On 11/30/2011 06:15 PM, elliott wrote:
> Thanks for the quick response. I have a follow up question on how to
> read this converted data using a python script. Is there a way to use
> ReadRaster or ReadDataArray to retrieve the temperature data?
The converted file should be a geotiff by default, so yes, you should
be able to use gdal's python bindings to read that data. As you will be
able to read the original data, if you have hdf4 support compiled in
your build of gdal.
Please refer to the gdal documentation ('python api') for how to read
data, and/or have a look at the example python scripts coming with
gdal's source.
Note (I suppose the original data is hdf4, as are 'my' modis data) that
you can only convert 1 subdataset ('sds') at a time. Refer to gdal's
hdf4 format documentation (website, supported formats, search for hdf4)
for how to find and refer to the subdataset name.
Last: please CC your replies to the list too (or just send to the list,
no need to send to my private address too). Others might know more and
want to reply, or might learn from it. And it will appear in internet
searches after some time.
Best,
Vincent.
>
> On 11/30/2011 10:26 AM, Vincent Schut wrote:
>> On 11/30/2011 03:41 PM, elliott wrote:
>>> Hello,
>>>
>>> I have been searching for a way to convert the MODIS Land
>>> Temperature data that is in a sinusoidal projection into WSG84
>>> lat/lon but have not found any definitive answers.
>>>
>>> Any help would be greatly appreciated.
>>
>> I've been using this gdalwarp line, though for modis land spectral
>> data and not temperature:
>>
>> gdalwarp -s_srs '+proj=sinu +R=6371007.181 +nadgrids=@null +wktext'
>> -t_srs EPSG:4326 -srcnodata 0 -dstnodata 0 -r cubic -co "TILED=YES"
>> -co "TFW=YES" ${INFILE} ${OUTFILE}
>>
>> nb it's from a bash script so change the INFILE and OUTFILE stuff,
>> and if you want to you can remove the -co tiled and tfw creation
>> options.
>> ymmv.
>>
>> Vincent.
>>
>>>
>>> Thanks!
>>> _______________________________________________
>>> gdal-dev mailing list
>>> gdal-dev at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>> _______________________________________________
>> gdal-dev mailing list
>> gdal-dev at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>>
>
More information about the gdal-dev
mailing list