Import multiple orthophoto bands in model builder

2511
3
01-17-2016 08:12 AM
MihaKlemencic
New Contributor III

Hi!

I'm looking for solution to create a script for importing only one band from orthphotos, then reclassifying into 2 classes, subtracting them and export as polygons.

Orthophotos are from 2011 and 2014 and are stored in 2 directories (for example D:\2011\ and D:\2014\). Overlapping orthophotos have same name except the new ones have letter "A" at the end - the old one has name E063462.tif - Band_3 and the new one E063462A.tif - Band_3. The script should find identical orthophotos, load only one band and then run processes as it is shown in picture below.

0 Kudos
3 Replies
DanPatterson_Retired
MVP Esteemed Contributor

So the question is... does the model work?  If it does you can export the model to a python script.  If it doesn't, then you will have to provide more information.

0 Kudos
MihaKlemencic
New Contributor III

Model works.

Instead of manually adding bands to TOC and linking them in model builder there should be some code to do it automatically and perform further steps.

0 Kudos
XanderBakker
Esri Esteemed Contributor

There are two paths you can go IMHO, implement iterators in ModelBuilder:

A quick tour of using iterators—Help | ArcGIS for Desktop

... or use Python code to solve it, using Create lists of data—Help | ArcGIS for Desktop