2

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?

0

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

In R:

library(sp)
library(raster)
library(SDMTools)

#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. Mar 10 '17 at 17:32
  • Edited to reflect the same. – Vijay Ramesh Mar 10 '17 at 17:52
  • @G.D. Let me know if that helps? – Vijay Ramesh Mar 10 '17 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. Mar 13 '17 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. Mar 14 '17 at 5:02
0

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

enter image description here

The same can be achieve in console:

gdalinfo <path to geotiff>

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.