I am working on Landsat 8 satellite image and want to perform land cover classification for a particular region Preferred software tool is R I have formed a RGB image from the satellite data and now want to extract the metadata of that image to work further on it

How can the metadata be extracted? Can it be done in R or should I use QGIS?

2 Answers 2


In QGIS select Raster -> Miscellaneous -> Information ...

enter image description here

The same can be achieve in console:

gdalinfo <path to geotiff>

In QGIS, Right-click the layer you are visualizing > Click on Properties > Click on the blue i symbol (which stands for Metadata)

In R:


#Create a raster layer and view the same
layer <- raster("path to folder where image is stored")
writeRaster(layer,"path to where want to write it to", format="ascii")

###Convert the ascii to dataframe
layer1 <- asc2dataframe("path where the ascii is stored")

Above should give you values for each row.

  • Thanks for response Vijay!! Using the above R code we get basic information such as nrow, ncol, cells, extent,names etc. Now I am interested in knowing the data behind the cells ( I.e behind each row and column), which I believe will help me in further classify/cluster the data. More like forming a database.
    – G.D.
    Commented Mar 10, 2017 at 17:32
  • Edited to reflect the same. Commented Mar 10, 2017 at 17:52
  • @G.D. Let me know if that helps? Commented Mar 10, 2017 at 17:56
  • Thanks Vijay, unfortunately haven't given the above code a shot yet!! Will let you know once I execute!! Appreciate your help
    – G.D.
    Commented Mar 13, 2017 at 5:05
  • thank you for the help..It worked.. Just for my understanding, we need to look at the "var.1" variable as values, with x and y being the coordinates.
    – G.D.
    Commented Mar 14, 2017 at 5:02

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.