Select to view content in your preferred language

How to fix iterate Rasters as input?

1354
4
Jump to solution
10-28-2020 01:21 PM
Arthur_Morgan
Occasional Contributor

Hello I am new to new builder in ArcGIS desktop. As a first step I need to iterate rasters as input from a folder. Now I am using the tool, insert "Iterate rasters". But the the tool is showing "Raster" (green circle) instead of "Rasters" as there are more than one rasters in the folder. How can I fix this problem please?

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
DavidPike
MVP Notable Contributor

you really need to read through the link previously provided Examples of inline model variable substitution—ArcMap | Documentation 

%Name% is just the name of the dataset without the path.  The output should be C:\MyDatabase\%Name%.tif (or maybe just %Name%, try both - I don't use model builder)

View solution in original post

4 Replies
DavidPike
MVP Notable Contributor

Looks fine to me.  The 'Name' cyan bubble allows you to use %Name% in the end of the output path of the extract by mask options, the tool iterates through your workspace, running that model for each raster.

It's answered here https://community.esri.com/thread/198793-using-iterate-rasters , along with links for old - but still good - explanations.

Arthur_Morgan
Occasional Contributor

Will the output from extract by mask return unique outputs for each input raster? Or do I have to insert another iterator for the output as well. Basically, what I am asking is that will the above model return n number of outputs for n number of input rasters?

0 Kudos
Arthur_Morgan
Occasional Contributor

I have an update Mr. Mike, The model does run, but the output is empty, please advise! I have attached a screenshot for further reference.

0 Kudos
DavidPike
MVP Notable Contributor

you really need to read through the link previously provided Examples of inline model variable substitution—ArcMap | Documentation 

%Name% is just the name of the dataset without the path.  The output should be C:\MyDatabase\%Name%.tif (or maybe just %Name%, try both - I don't use model builder)