TransWikia.com

Clip feature (with selected attributes) with individual polygons using iterator: name error or repetitive selection

Geographic Information Systems Asked by nofunsally on August 27, 2021

I have a bunch of locations (polygons) across the USA that I will use to clip a number of features and rasters (e.g., the National Hydrography Dataset). When I clip a dataset like the NHD with all of the polygon in one feature class, it takes a lot longer than if I split the polygons and clip the dataset with one polygon at a time.

To that end, using model builder, I am attempting to iterate through a directory of features (individual polygons) and use each of them to clip a different feature that has first been treated with Select Layer By Attribute. The model (below) works, but will perform Select Layer By Attribute for each iteration, making the process much slower than if Select Layer By Attribute was just performed once.

Full model, but slow
arcmap model builder iterator

Next, I attempted to use submodel and main model following ESRI guidance.The submodel looks like this:

submodel to iterate through features
submodel arcmap model builder

and the submodel within the main model looks like this:

submodel within main model
submodel within main model

However, this operation fails with the following error:

ERROR 000354: The name contains invalid characters
Failed to execute (Clip).

Then I read about using Collect Values or Select Data and tried using each (separately) at the end of the submodel. This did not work.

Next, I read that saving the ‘Name’ as a parameter in the submodel, and then right click on the submodel in the main model and Make Variable > From Parameter > Name. However, Make Variable > From Parameter was unable to be selected. I don’t know what changed, but one time I was allowed to Make Variable > From Parameter it created %Name% instead of name and I tried the model with Name and %Name% but the got the same error again (000354). Even in this same model, I cannot get Make Variable > From Parameter to be available again.

One example of a different model (I also tried renaming FL_%Name%.shp to Output Values)
a different submodel trial

Then I tried using Parse Path > Name connected to the submodel output with Name connected a precondition to Clip, this also produced a #000354 error.

Outside of model builder I saved the feature with selected attributes as a new feature. Then I used this and model builder with an iterator and clip and it worked great and quickly.

But, I’d like to know how to make the model work for the future. How can I avoid ERROR 000354: The name contains invalid characters? I feel like I am missing something.

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP