I have many rasters in my ArcGIS project, each with 4 bands. At the moment, I am changing the raster bands, one by one, for each file:

  • Red becomes Band 2
  • Green becomes Band 1

And I am setting the Stretch Type to Minimum-Maximum, like on this screenshot:

Target state of each Raster

Problem is, it's about 300 Rasters and the manual job is just taking too long. I have checked the ArcGIS Toolbox and the help, but I have not found a way to do that as a batch job.

Marking all the rasters and change the properties for all of them all together does not work either.

Afterwards I want to set these settings from the Image Analysis for RGB Stretch for each of the rasters as well, but preferably not manually.

Image Analysis RGB Stretch

Unfortunately, I am just fresh at remote sensing and image analysis.

I am doing this because I need to visualize and enhance trees from satellite images. I got the images from this source: link.

With the above mentioned settings I could change the picture in the following way, which is exactly what I am aiming for:

From this

To this:

To this

After some more research, I have discovered the ArcGIS tool "Apply symbology from layer", but it changes me only the bands and the min-max stretch and not the settings in the "image analyzis" window and it takes forever. It's been running now since 7 hours and I am scared that it crashes.

The final and most ideal outcome is that I can convert the red (tree) areas into a shapefile. Unfortunately, I have not come across a solution for that yet either.

Do you have a better way of doing all this?


1 Answer 1


This is a feature extraction problem--as such, I would approach this problem differently. By altering the band combinations and adjusting the image histogram, you are essentially changing only how the image renders on your screen--however, the pixel values remain unchanged. Instead, I would recommend deriving useful indices from various band combinations. You can then use these indices to help extract your features of interest.

You wrote in the comments:

I need to isolate only the trees. I am aiming for the parts where the trees cover the streets. If I manage to convert the trees to a shapefile, I want to make a clip with a street-shapefile and then only have the chunks of the streets that are covered by trees. Everything else will be irrelevant then. In case the conversion to shapefile doesn't work, I can do that manually.

In your case, since you need to isolate vegetation over roadways, you can assume any healthy green vegetation over a roadway will be tree canopy cover. A simple approach would be to calculate the Normalized Difference Vegetation Index (NDVI) from the red and near infrared bands of your imagery. The derived NDVI raster product will have a theoretical range of -1 to 1, where values closer to 1 indicate healthy green vegetation. From there, you can simply threshold the image by applying a rule such that any value >X is assigned a value of 1 and everything else a value of 0. Then convert the binary raster to a polygon shapefile and perform your overlay analysis with the roadway shapefile.

In sum:

  1. Calculate NDVI using the Raster Calculator
  2. Threshold the NDVI raster using the Raster Calculator.
  3. Convert the binary raster of vegetation to polygon using Raster to Polygon
  4. Perform an overlay analysis

Also check out an earlier answer that I provided which uses image segmentation and thresholding to extract features from 4 band NIR imagery. You can use this approach to extract vegetation from imagery.


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.