Select to view content in your preferred language

Unable to build attribute table for MODIS data (HDF)

1367
3
05-12-2011 08:51 AM
AlexisCoplin
Emerging Contributor
Hello,
I am working with MODIS Land Cover Type (MCD12Q1) and Land Cover Dynamics (MCD12Q2) products from the LP DAAC (https://lpdaac.usgs.gov/lpdaac/products/modis_products_table). Both prducts are available as HDF files that contain multiple datasets in the MODIS sinusoidal projection.

My objective is to examine seasonal characteristics of individual land cover classes. My method includes converting the relevant datasets from both products to GEOTIFF files using the MODIS Reprojection Tool (MRT 4.0), then importing files into ArcMap (v10, ArcInfo level license) and using the Extract by Mask Tool in the Spatial Analyst Toolbox to extract subdatasets from the Land Cover Dynamics product using selected land cover classes from the Land Cover Type product as masks. In order to execute the Extract by Mask tool, raster statistics must be calculated and raster attribute tables must be built.

I am able to successfully calculate statistics and build attribute tables for data that I convert using the reprojection tool, but I have discovered that the number of pixels (COUNT) are inconsistent depending on the projection of the converted files. When I try to build an attribute table for the data as a HDF (not reprojected/converted), I get ERROR 000049: Failed to Build Attribute Table. The ArcGIS 10 Help explanation is below:

'Description - The raster attribute table cannot be built on the input raster dataset.
Solution - Check the input raster dataset to make sure that it is a single-band integer dataset: other types of raster datasets do not support raster attribute tables.'

The "solution" above is NOT a solution! The input raster dataset is indeed a single-band integer dataset. What is the real problem??? I am trying to compare my results with those published by Ganguly et al., 2010 (Remote Sensing of Environment) so that I know my method is appropriate, but the pixel counts I'm getting using the same data they used are inconsistent with theirs. I do have access to an old version of ENVI (4.2) so I think my next step will be to try and develop a similar method using ENVI and hoping I have better luck.

I know this is a long post for a very specific issue, but I would greatly appreciate any advice from the user community!

Thanks,
Alexis
0 Kudos
3 Replies
RobertBerger
Occasional Contributor
Greetings Alexis,

My guess is that since your "dataset" is a "subdataset" in HDF, that this is not supported for data with subdatasets.
Can you try to convert the subdataset to a single band GeoTiff without reprojecting? This should maintain your pixel count and allow you to build an attribute table on the Tiff file.
Reprojection always includes some kind of resampling from one space into the other. A different way - which doesn't include reprojecting - would be to manually georeference and "update the georeferencing" rather than rectify / reproject. If you simply are adding the correct spatial reference information, you can also look into the define projection.
Hope this helps.

Robert
AlexisCoplin
Emerging Contributor
Thanks for the advice, Robert! I know I can't convert to single band geotiff without reprojecting using MRT, but perhaps the 'raster to other format' conversion tool in ArcMap will do the trick. I can also try defining the projection.

Thanks again!
Alexis
0 Kudos
steveSuperczynski
Emerging Contributor
I am having a similar issue and for me converting to geotiff didn't fix the issue. Even though ArcMap says it is a single band raster (based on the sourse info under properties) still can not build the attribute table.
0 Kudos