Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I'm a writing about a geoprocess that I can do on an individual basis but for some confounding reason am unable to do with the row iterator in Model Builder. Given that I want to repeat the same process 68 times, I hope that I can be spared the pain of doing this the long way (one-by-one). I have tried to be as complete as possible in describing the problem, including pictures and detailed commentary, hence the length of this post.

The task in question is exceedingly simple. Let's say there is one square. I want to create a fishnet bounded by the extent of the square. In the create fishnet tool, in the "template extent" drop down box, I select the file with the square. Each square happens to be 2200 meters by 2200 meters. So I create 22 rows and 22 columns of 100 by 100 meter cells. The entire square is covered by the fishnet. So far so good. I can do this part.

Now let's say I have a shapefile that contains 68 rows. Each of these rows corresponds to one of 68 squares scattered across a metropolitan area (all the square are the same size). This is what I am talking about: one shapefile in the table of contents and 68 squares:

enter image description here

You will see that the attribute table is quite normal:

enter image description here

I want to do exactly what I have described above with one square, except now the file in question contains 68 rows instead of one and I want to use the row iterator function to execute the task on each row of the file.

I set up the process like so in Model Builder: the file with the 68 rows is the "input table" to the "iterate row selection" tool. If I understand correctly, each row is treated as a unique item by the darker green "I_FeatureEnvelope_68HHs." I subsequently want to treat each of these unique features as inputs to the "create fishnet" tool.

enter image description here

When I go to connect the "I_FeatureEnvelope_68HHs" to the "Create Fishnet" box I see a pop up box that says Template Extent. I click Template Extent, thinking that it means: "treat each feature represented by each of the 68 rows as unique extents to be used in creating 68 different fishnets." (sort of like if you were to open the attribute table, highlight a row and click 'zoom to selected' each row corresponds to an extent)

When I double click on the Create Fishnet box, I see this:

enter image description here

Template Extent has already been chosen for me. The selection appears to make sense. I set the cell width and height and numbers of rows and columns: 100m x 100m and 22 x 22 as I stated before. I select polygon geometry type at the bottom.

I run this: enter image description here

Let me tell you what I think I should see. To recap, there are 68 rows. Each of these corresponds to a square. I am creating 22 row x 22 column fishnets for each square which leads to a 484 cells fishnet per square. That means the output file should have 68 x 484, or 32,912 rows (or 484 cells per each square).

Let me tell you what actually happened. My process led to the creation of only one fishnet in the lower left hand corner:

enter image description here

Close up it looks alright, a 22 x 22 grid with 484 cells:

enter image description here

I have a faint idea of what is going on. Consider the file with the 68 squares. The one fishnet that was created corresponds to the lower left hand corner of the full extent of this file - so the Template Extent is not considering each of the 68 rows as unique items. It simply takes the full extent of the 68 row file and focuses on the lower left hand corner.

I have played around changing the settings a bit, but to document all that I'll end up writing a novel. To make a long story short, I have found it impossible to use the row iterate tool to create a fishnet that corresponds to the extent of each of the 68 features in the file in question.

Any helps, tips, clues, etc... would be immensely appreciated!

share|improve this question

1 Answer 1

You may be accidentally overwriting your output with each iteration. Have you given each output a unique name, using inline variable substitution or the like?

Try naming your output file like so: C\foo\bar\%value%.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.