I have some polygons and I want to extract the spectral signature of the adjacent satellite images. The satellite images that i use are the NDVI from Landsat 7 and 8 and I want to compare the spectral signature of them. I use both ENVI 5.03 and Arcgis 10.2. Is enough to extract the values ​​from the pixels?

  • 1
    What about R? Are you comfortable with the language? It is quite simple to do this with R (and its free) Commented Mar 19, 2014 at 10:51
  • I've used only once R and I would prefer the ARCGIS and ENVI but if you think it is easy can you explain how to do?
    – Vassilis
    Commented Mar 19, 2014 at 12:08
  • Could you please describe what the polygons represent and also what metrics you would like to use to compare the NDVI's?
    – Aaron
    Commented Mar 19, 2014 at 13:08
  • The polygons are areas with a specific type of vegetation. I have 5 areas and two NDVI images - Landsat 7 and Landsat 8. I want to "export" the spectral signature of these areas.
    – Vassilis
    Commented Mar 19, 2014 at 13:12
  • Okay, so you are looking for a way to compare how the spectral signatures may be different. Would mean, mode, interquartile range and other descriptive stats on zonal basis be useful?
    – Aaron
    Commented Mar 19, 2014 at 14:32

2 Answers 2


I'd do something like this using R and raster package

kpacks <- c("raster", "sp", "rgdal", 'rgeos')
new.packs <- kpacks[!(kpacks %in% installed.packages()[ ,"Package"])]
if(length(new.packs)) install.packages(new.packs)
lapply(kpacks, require, character.only=T)
# remove(kpacks, new.packs)

# Projections
p.utm33n <- CRS("+init=epsg:32633") # UTM 33N Landsat Images
p.wgs84 <- CRS("+init=epsg:4326") # WGS84 Long Lat

# Import your ROI for image cropping/extract
training <- readOGR(dsn = file.path('.../SIG'), layer = 'my_Trainning_Areas')
proj4string(training) <- p.wgs84 # Assign projection if necessary 
training1 <- spTransform(training, p.utm33n) # change it if necessary

# Read ETM TIF files into a rasterStack
# For WRS2 Row 181 Path 68: UTM 33N
mywd <- '.../Landsat/LC81810682013122LGN01'

allfiles <- list.files(file.path(mywd), all.files = F)
# List of TIF files at dir.fun folder
tifs <- grep(".tif$", allfiles, ignore.case = TRUE, value = TRUE) 
#etm_stk <- stack()
#for (i in 1:length(tifs)) {
#  i.tmp <- raster(file.path(mywd, tifs[i]),
#                  package = "raster", varname = fname, dataType = 'FLT4S')
#  etm_stk <- addLayer(etm_stk, i.tmp)
# Or replace the loop with
etm_stk <- stack( list.files(mywd, pattern="tif$", full.names=TRUE) )
sigs <- extract(etm_stk, training1, df = T) # extract() will reproject layer to raster projection

Do the same for OLI

Proceed with comparisons, handling data from sigs data.frame.

Please let me know if you need help to go further with the analysis.

  • 1
    Your entire 8 line loop to add tiff files to a stack can be replaced with: etm_stk <- stack( list.files(mywd, pattern="tif$", full.names=TRUE) ) Commented Mar 19, 2014 at 14:59
  • @JeffreyEvans True. Thanks! I added to my code above. Commented Mar 19, 2014 at 16:18
  • The code is a kind of classification?
    – Vassilis
    Commented Mar 19, 2014 at 19:25
  • 1
    @Vassilis No it is not. The code will read all tif files and retrieve values of each band to the overlaid polygon. You can then summarize, manipulate and plot it. Commented Mar 19, 2014 at 19:49

with ArcGIS you can use "zonal statistics as a table" to extract the mean spectral values for each band and within your polygon. You can run it in batch mode (right click on the tools > batch) to have the values related to each band of each satellite.

With ENVI you can use the ROI tools

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.