Select to view content in your preferred language

How to automate moving polygons into a new layer, that inherits their ID as name?

221
2
Jump to solution
10-05-2024 04:18 PM
AndrewBrightNZ
New Contributor

Apologies for my second noob question of the day.
As in the example below, I want to create geofences for each polygon I've created along George Street. To do this in ArcGIS Online, I need each one to be in seperate layer (otherwise they all activate at the same time).

Screenshot 2024-10-06 at 12.05.24 PM.png

 

I figure I start with Iterate Feature Selection tool to iterate over each polygon in this layer, but I can't figure out how to do the next steps.

For each polygon:

  • Create a new feature class layer
  • Use the polygon name/ID as the name for that feature layer
  • Cut and paste the polygon into that new layer

The end result will be 64 layers with a single polygon in each (instead of one layer with 64 polygons which is what I have now).

Does anyone have any good ideas how to do this?

Thanks again for your help,

A

0 Kudos
1 Solution

Accepted Solutions
Marshal
Frequent Contributor

I think you are on the right track.  Been a while since I dabbled in Model Builder, but I think this should work.

  1. Iterate Feature Selection
    1. Configure Group By Fields to be the polygon name or ID (assuming these are unique)
  2. Copy Features connected to "Selected Features" output
    1. Configure output feature class name to be the "Value" output of Iterate Feature Selection using %Value% variable substitution (polygon name or ID)

https://pro.arcgis.com/en/pro-app/latest/help/analysis/geoprocessing/modelbuilder/inline-variable-su...

 

View solution in original post

0 Kudos
2 Replies
Marshal
Frequent Contributor

I think you are on the right track.  Been a while since I dabbled in Model Builder, but I think this should work.

  1. Iterate Feature Selection
    1. Configure Group By Fields to be the polygon name or ID (assuming these are unique)
  2. Copy Features connected to "Selected Features" output
    1. Configure output feature class name to be the "Value" output of Iterate Feature Selection using %Value% variable substitution (polygon name or ID)

https://pro.arcgis.com/en/pro-app/latest/help/analysis/geoprocessing/modelbuilder/inline-variable-su...

 

0 Kudos
AndrewBrightNZ
New Contributor

Hey thanks very much for your reply, Marshal. I gave that a shot today and it's worked well.

Incidentally, it took a while to see it was working as the Catalog view didn't update with the new feature class layers as they were created. The videos I saw of working with iterators had the layers appearing in realtime, but I had to refresh the database to see them appear.

Screenshot 2024-10-08 at 8.40.38 PM.png

I also had an issue where Pro would name the feature classes in the Catalog tree correctly (George_Street_20) but those same layers that appeared in the Contents pane would be named %Value%George_Street_20 for some reason. I elected not to display them as the iterator ran, and just pulled them into the map once the process had finished.

Screenshot 2024-10-08 at 8.49.52 PM.png

 

Thanks again for your help.