0

I am working with MODIS 1b Data in R, and converted the HDF files into tiffs. They load and plot correctly.

I am now trying to convert the values of corrected_counts_scale and corrected_counts_offset to dn** as described in the User Guide.

This question describes how to read this information using the CMD point. Is there a way to do this using R?

** edit - to be clear that I am not trying to use the Tiff files directly to access the attributes.

1 Answer 1

1

Please go through this page:

https://hdfeos.org/software/r.php

You need to read your HDF files for the values as tiff will not have this metadata.

3
  • Thanks, yes I have tried this, however - cran.r-project.org/src/contrib/ncdf4_1.15.tar.gz - returns a 404 error so there is no way to download the package with hdf4 functionality included. # Commented Nov 14, 2018 at 13:27
  • You should be able to use install.packages("ncdf4") to install the package.
    – JonasV
    Commented Jun 19, 2020 at 14:12
  • If you add both the raster and ncdf4 packages into the working R environment you can read hdf4 raster files using raster or stack. Commented Feb 18, 2021 at 22:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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