Sometimes it is nice to have a quick and simple way of pulling out the single bands from a multi-band image stack without having to resort to a python script. This stack exchange post shows how to do it in a nice, easy, and straightforward manner in ArcGIS ModelBuilder. Kudos to xyz for coming up with this answer. I was able to use this approach recently to perform principal component analysis and then continue to work with the raster downstream.
In this example the parse path tool is used to pull out the path and file name. Then Band_1 is appended in the output name of the raster calculator using the following function: "%Path%\%File%\Band_1"*1
With this blog I intend to share GIS, remote sensing, and spatial analysis tips, experiences, and techniques with others. Most of my work is in the field of Landscape Ecology, so there is a focus on ecological applications. Postings include tips and suggestions for data processing and day-to-day GIS tasks, links to my GIS tools and approaches, and links to scientific papers that I've been involved in.
Subscribe to:
Post Comments (Atom)
%Path% can be substituted with %Input Workspace% for similar tools.
ReplyDeleteWe can also add the Calculate Value tool with a statement like str("%Name%").replace("vegetation", "tree") and data type as string if we want to sub out base names. Syntax is important. Make sure that it is a string first.
ReplyDeleteand str("%Name%")[4:8] if we want to keep characters 4 - 8 from the name. This works well if all of the rasters have the same number of characters in their name.
ReplyDelete