Create Buffers from different road widths using Modelbuilder

159
4
Jump to solution
2 weeks ago
Highlighted
by
New Contributor II

All, 

I'm trying to create buffers for many different widths in a roads feature class. I know there are a bunch of different ways to do this, but the one I have chosen this time is Modelbuilder. I'm using trying to use the Iterate Feature Selection tool to read the many different width of a roads feature class then I'm attempting to pass them to the buffer to buffer the distance for that width (i.e. A width of 7 gets buffered for 7 ft). I used to be very good at this a while ago, but haven't used Modelbuilder, Python, or the command line to do things like this in a while. I'm getting stuck with the buffer tool only creating one output file that appears to keep getting overwritten by each subsequent run from the iterator. What I'm trying to do is have a buffer shapefile be produced for each different width. I know I'm kind of close, but need some help. I've attached a screen shot of my model the way it's currently setup. It should be kind of self explanatory from the way I have it labeled. Thank you.  

Reply
0 Kudos
1 Solution

Accepted Solutions
Highlighted
MVP Regular Contributor

I tested this in a simple model, but without the value field from the iterator going into the buffer tool.  I specified the width field as input within the Buffer tool and got the results as expected.

 

View solution in original post

4 Replies
Highlighted
MVP Regular Contributor

Can you share the parameters of the iterate feature selection? I would guess it's not iterating over the fields properly if you don't get more than 1 output.

You could buffer all the data by the width field then run the iterate feature selection on that to then export as new shapefiles, if that doesn't work then you know it's the iterator at fault.

I don't use model builder, so I don't quite get the 'width to buffer distance' coming from the iterator, shouldn't you just specify the 'width' field as a parameter in the buffer (or is that what it shows?).

 

Highlighted
by
New Contributor II

@DavidPike  Thanks for the response. 

The input for the iterate feature selection is pretty simple. I'm just iterating over the Width field in my Roads file. I think it's iterating properly because I have checked all the details of the geoprocessing and I have watched it move from value to value. The problem seems to be that I can't capture each shapefile iteration of after the Buffer tools runs  (the Roads_Buffer%n%). That file keeps getting overwritten with each subsequent run of the tool. What I'd ideally like to do is capture the buffer of each of the different widths (let's say there are 10 different widths) and have the final output shapefile be named like Road_Buffer_X, where X is the width that was buffered at. Iterate Feature  SelectionIterate Feature Selection

Reply
0 Kudos
Highlighted
MVP Regular Contributor

I tested this in a simple model, but without the value field from the iterator going into the buffer tool.  I specified the width field as input within the Buffer tool and got the results as expected.

 

View solution in original post

Highlighted
by
New Contributor II

@DavidPike Thank you. Such a simple solution from a dumb mistake. Much Appreciated.