I am working with MODIS Aerosol data (the Level-2 AOD_550_Dark_Target_Deep_Blue_Combined product). I am retrieving the data using the LAADS DAAC data API, and requesting all swaths as GeoTIFF files.

I know that level-2 products are not georectified to a common grid (as L3 products are), but I was wondering if I need to re-grid my GeoTIFF files to extract data for some latitudes and longitudes.

My approach for extracting the data is quite simple, I am just using the rasterstats Python library and querying the points I need from each file. Is this data going to be different from the same extraction from the re-gridded data of the same file? I am just wondering that the re-gridding needs interpolation. Hence, I will modify the data array and create some bias.

Any recommendations?

  • When you say 'extract data for some latitudes and longitudes' do you mean that you have point data that you want to use for sample locations? Or do you have lines or polygons? The locations (i.e. areas) where you will be sampling pixels can help inform whether or not you will need to resample the different layers from MODIS. – Kartograaf Sep 30 '19 at 17:46
  • For the moment, I just have a list of points to extract data from. I will use polygons later, I guess that changes the whole game. – topcat Sep 30 '19 at 17:49

I recommend resampling your raster data to match the higher resolution dataset (i.e. smaller pixel dimensions) using gdal.

First run the gdalinfo utility on both files to determine the resolution

gdalinfo *path\to\file1.tiff*

gdalinfo *path\to\file2.tif*

then choose the smaller set of values (call these xres and yres) of the two and use gdalwarp to resample the larger one to match them

gdalwarp -tr xres yres *path\to\file.tif* *newfile.tif*
  • Well, currently I have tens of thousands of .tif files and points to extract. MOD04_L2 are daily products, and I'm extracting data from 2000 until the present year. I was wondering if I should create daily mosaics and then resample, or treat each swath as a separate entity. There's also the option of retrieving HDF files instead and use the MRT Swath tool from NASA, but I thought getting the .tifs was already solving this problem. – topcat Sep 30 '19 at 18:25
  • Sorry, the MRT Swath Tool is not available anymore. NASA recommends: the HEG Tool – topcat Sep 30 '19 at 18:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.