ModelBuilder iterator for ArcGIS Online feature services

4499
2
08-12-2015 01:50 PM
AdamMarinelli
Occasional Contributor

Does anyone have any creative ideas or experience using the Iterators in ModelBuilder to cycle through a user's Feature Services in their "My Hosted Services" connection or through a "GIS Servers" connection to ArcGIS Online?

I can think of a few ways to handle this within a Python Script added to a model, but so far, cannot get anything linked up using the out-of-the-box iterator and/or Model Only Tools.

Along the same lines, if we can iterate through feature services, are there any Geoprocessing Tools that natively accept a Feature Service data type as an input -- adding the feature service directly from either "My Hosted Services" connection or through a "GIS Servers" connection to ArcGIS Online and NOT from the ArcMap table of contents?

0 Kudos
2 Replies
BruceHarold
Esri Regular Contributor

Hi

If you add your services to a Pro map they can be used as GP inputs just like any layer.

Performance may be an issue - please share your experience.

Regards

0 Kudos
AdamMarinelli
Occasional Contributor

Hi Bruce Harold​, thanks for the response.

This is also true for ArcMap: you can add feature services from Catalog ("My Hosted Services") to the active Data Frame or Map and then they can be used as inputs to tools.  When the Feature Service is added to the Map, the application queries the service and displays the geometry.  When you open the attribute table, it performs another query for the rest of the field attributes....at least this is what Fiddler shows.

I am more interested in NOT dealing with an MXD.  I would like an iterator/GP tools that directly reads the feature service(s) from your active Portal.  This way the models and tools that are created are more flexible and dynamic and always reading new features from AGOL without needing then to be added to a map first.

I am thinking the answer is ultimately going to be using custom script tools which I am familiar with and can do.

But what would be great, is having the ability to write a script tool that functions like the native iterators in ModelBuilder.  Every feature service it finds in your Portal, is an output of the iterator, used by the remaining GP tools of the model, before moving onto the next feature service that is found.  Maybe part of the iterator is querying the endpoint of the service, receiving data, running JSON to Features, and outputting this result for continued processing?

Can you write your own iterator with Python?​ Maybe ArcObjects is required for this...

0 Kudos