Hi, On 24 February 2010 18:58, joe <[email protected]> wrote:
> Anyone had experience scripting with Python and SAGA GIS? I'm new to > Python, but will be doing some MODIS analyses and would like to > isolate/clip specific regions. > I use python + gdal all the time. It's very easy to read in chunks of your files. It is fairly easy to read files (once you have understood the SDS naming convention. Use gdalinfo on some HDF file to see the names). In essence from osgeo import gdal import pylab as p #This is an example, and I'm not sure the parameter is right my_hdf_string='HDF4_EOS:EOS_GRID:"MOD09GA.A2004239.h19v10.005.2008241155729.hdf":MOD_Grid_L2g_2d:sur_refl_b01_1.' g = gdal.Open( my_hdf_string) data = g.ReadAsArray()[my:My,mx:Mx] p.imshow ( data, interpolation='nearest') p.colorbar() p.show() You may find some useful stuff here: < http://sites.google.com/site/spatialpython/> Hope that helps Jose
