I asked him if he had a solution for plotting standard MODIS hdf products
In more general terms, what are people using for a ‘MODIS workflow’? I can’t
imagine I’m the first to want to plot MODIS images using basemap. Does
anyone have a ‘roadmap’ (as Christian phrased it)? I am interested in the
steps from A-Z. That is, what tool to read the hdf files (modis is hdf4),
what tool to reproject the data, and finally, the basemap plotting.
Really, it’s what you want to do with your MODIS data. My “workflow” is usually as follows:
1.- Access MODIS data (and ancillary stuff, such as QA flags etc) using Python’s GDAL bindings.
2.- Manipulate the MODIS data from (1) using numpy, scipy. If there’s significant looping involved, use weave to speed things up.
3.- Plot using matplotlib. Usually, as imshow (“vanilla matplotlib”), sometimes using basemap. The difference is whether I’m just quickly plotting something together, or whether I want to actually have a map where I want to plot other stuff on top of the MODIS data.
In terms of rapidfire, you can even access the WMS data using GDAL, so no need to download the data. An example for monitoring El Niño related fires in Borneo is attached. You need to get the fires in the last 7days file (we download it as a crontab jobby), and the attached script just plots the data on a basemap for quick visualisation.
I am in the process of putting most of my notes on <http://sites.google.com/site/spatialpython/> and there’s also the Unofficial Python GIS SIG <http://groups.google.com/group/python-gis-sig>, another useful resource.
Your particular example is plotting RGB composites derived from Level 1 data, it seems? As I said, if you tell us what you want to do with it, we may be able to provide more information.
do_borneo.py (1 KB)