1

I have a feature class with 3000 points. My goal is to have a viewshed, at each point, clipped to 50m and 500m buffers. I want to be able to look at the percent visible/not visible for each point. I found the following link explaining how to use an iterator, but it's not super explicit and my attempt to copy it is not giving me the results I want. Here is the link: https://geonet.esri.com/thread/31124

The first answer has an attached model I tried to copy. I have attached a png of my model.

My results are one raster file with all of the buffers (so it kind of worked), it doesn't look like it did it for each individual point because only one large cluster of maybe a few hundred points have both visible and non visible values.

I'm not very familiar with iterators and only moderately familiar with ModelBuilder, is there something obvious you can see that I'm missing?

1

I have used ModelBuilder to perform such an analysis a few years ago. The model in the question generally looks fine but misses some operations and basics that I'll review below.

Here is a snap of a model I've set to perform a similar task (I've dropped the 50 meters buffer for the sake of simplicity, but it can be easily merged in).

Model Example

Note that it uses a similar workflow to the model suggested by the OP, namely: It iterates feature within a point later, and analyze a viewshed for each point. However a few differences exist:

  • I have used buffer of 500 meters (the largest buffer) before the viewshed operation. Both are fine, yet for large raster datasets, the proposed operation will save a lot of time. Note that the viewshed tool has the capability to limit the viewshed by distance, yet it clips the raster only after the viewshed calculation which may take a very long time.

  • I have used the PtsNumber (or Value) from the iterator, to name the output, using this syntax: \...path...\someName_%PtsNumber%. This syntax is a reference to a model variable, which in this case is the feature number. The image below give a better example of the path.

Path Variable Example

Only the second is necessary to fix the OP's model. The result should look like this (these are only 500 meter buffers), I've received an output raster for each point. In your case, you may have overwritten some of your rasters.

See this arcGIS resource for more information about inline model variables, and the Q&A here with the answer by @nmpeterson for some useful and important conventions about the use of variables in file names.

Results

Finally, some more comments about model builder and its opportunities.

You may notice the use of the P symbol in my model, next to the Point and DEM inputs. These are model parameters, which allow the user to change the inputs for each time the model is activated (by double click). You can also add model variants and other variables to use as inputs to tools. For example you could use a variable to let the user (or future you) to change the buffer distance. It is very useful if your aim is to make a general tool used by many or for many purposes. It is also very useful for parameters that require some sensitivity analysis. In that case you can easily change them, without editing your model. Here is arcGIS help on model parameters.

Note that you don't have to stop here. You can build this model forward to count all raster_output > 0 with a combination of raster calculator and zonal statistics tools. You can than use a set of add field, get field value and calculate field tools to add this counts data to your Selected point. In such a model your outputs would be the points with a new proportion of Visible / Non-visible field. This however is more complex, and may be better done within another model.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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