1

I have a ton of 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 like 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.

[edit] Since it has been asked. 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, so if anyone knows something about that, I will be eternally grateful!

And if anyone has a better way of doing all this, please come forward!

  • Could you please describe why you are performing the described actions? To what end? We may be able to recommend a different approach. Are you comfortable using Python? – Aaron Jul 18 at 3:15
  • @Aaron I put the description in my original question. I hope that helps. And yes, I am comfortable using Python and ArcPy. I just need to be pushed in the right direction :) If you think QGIS is better for this job, then I also have no problem using QGIS, just need to know what tools and general directions. – Kai Jul 18 at 9:19
  • Thanks for the edits. Do you wish to isolate only the trees or all healthy green vegetation in the image? – Aaron Jul 18 at 11:50
  • @Aaron Thanks for your reply! No, 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. – Kai Jul 18 at 11:56
  • Do you have access to Lidar data for your area of interest? – Aaron Jul 18 at 11:59
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.

  • Thank you so much! I am going to try that! You saved me! Really, I am going to print this answer and memorize it, because I am going to need this a lot in future! – Kai Jul 18 at 19:58

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.