3

This is a sequel to my question about aggregating polygons in order to create neighborhoods.

I want to automate the geoprocessing of the above task. When I use Model Builder's "Iterate Feature Selection" iterator I get the below error:

enter image description here

I originally tried to link the "Iterate Feature Selection" iterator directly to the Aggregate Polygon tool. But as per this thread I inserted the Make Feature layer tool in between. (Now removed, see comments below)

enter image description here

My problem is I'm unsure how to link the iterator's selection to the input of the Aggregate Polygon tool. Really, why does the GROUP BY function of "iterate feature selection" iterator not create a complete SQL condition statement??

The following threads have proved un-useful as well:

Iterating in ModelBuilder?

Model builder: select feature based on attribute, iterator?

thanks in advance

  • You seem to be asking two questions: "Why does the GROUP BY function of 'iterate feature selection' iterator not create a complete SQL condition statement?" and "Why does Make Feature Layer give Error 000230?". I think you should edit this Question to focus on one or the other and then research/ask the other one separately. The second question looks like the easier one to resolve so I recommend focussing on that first. – PolyGeo Dec 23 '13 at 21:52
  • Thanks @PolyGeo, but error 000230 explicitly says that the error resulted from "An invalid SQL statement was used." I thought this implies a focus on the question I asked about the group by function. – mikeLdub Dec 24 '13 at 13:43
  • I can remove the part about the error if others agree with you... – mikeLdub Dec 24 '13 at 13:44
  • The Iterate Feature Selection already creates a feature layer that can be added as the input the the Aggregate GP tool. I do not think you need the extra Make Feature Layer. You might need to add a new field to your input polygons that will form your selection groups. – Adam Dec 24 '13 at 13:48
  • @amarinel I initially attempted without the make feature layer tool only to receive the same result. I'll go back and add the (simple) model to my question (see above). – mikeLdub Dec 24 '13 at 14:13
2

Here is the model that I created which ran through rather successfully (i.e. created the necessary feature classes and tables but had a generic error at the end for an unknown reason [to be honest I am not incredibly familiar with this tool or the Cartography suite])

My thoughts are not to worry about the Group by field not running a full SQL statement. Do the work beforehand by using select by attributes or select by location to select field and add an identifier in a new field. Thereby creating your "selections" in a new field as shown in the polygon FC in my example with the [CDCODE] field. Also note the inline variables on the output of the Aggregate Polygon tool.

How do the parameters of the model you just posted differ?

Aggregate Polygon Mmodel

Full size Image

  • thanks @amarinel, I found an error in the data, corrected it and adjusted parameters to match your example above. Now I get the following errors: ERROR 000354: The name contains invalid characters Item not found in this collection. Failed to execute (Make Feature Layer). Failed at Tue Dec 24 11:48:33 2013 (Elapsed Time: 8.00 seconds) Failed to execute (Iterate Feature Selection). The ArcGis Help for Iterate feature Selection mentions nothing about constraints on data type. – mikeLdub Dec 24 '13 at 16:49
  • Error: 000354 – Adam Dec 24 '13 at 16:54
  • Check your file and feature class names once again for special symbols and spaces. Are you still using Make Feature Layer in your model? How many fields are you using in the parameter Group by Field? – Adam Dec 24 '13 at 16:55
  • 1
    ok, I was ignoring some empty values. I populated the nulls with a "dummy" value and the model is running! thanks for the assistance! – mikeLdub Dec 24 '13 at 17:21

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.