<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Adding data from two different layers into another layer, stormwater pipes feature IDs in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/adding-data-from-two-different-layers-into-another/m-p/1391140#M79807</link>
    <description>&lt;P&gt;Thanks for the tag, &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/351335"&gt;@Bud&lt;/a&gt;&amp;nbsp;.&amp;nbsp; I'm skimming this, now, and I'm pretty sure we have this exact setup, and I already wrote a Python script to fill in those Up/Down IDs.&amp;nbsp; I'll drop it here in a bit, once I reformat it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/715877"&gt;@MaureenSpiessl&lt;/a&gt;&amp;nbsp;, do you&amp;nbsp;&lt;EM&gt;also&lt;/EM&gt; have any linking IDs on the Manholes?&amp;nbsp; For example, on our Point feature, we have OutPipe and InPipe fields where I can drop an ID, in addition to the Up/Down ID fields on the Pipes.&amp;nbsp; That's a bit more complicated, but it's also doable.&lt;/P&gt;</description>
    <pubDate>Tue, 05 Mar 2024 15:19:33 GMT</pubDate>
    <dc:creator>MErikReedAugusta</dc:creator>
    <dc:date>2024-03-05T15:19:33Z</dc:date>
    <item>
      <title>Adding data from two different layers into another layer, stormwater pipes feature IDs</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/adding-data-from-two-different-layers-into-another/m-p/1387457#M79384</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;This is a going to be a long shot, but I am looking for advice or website material anything to help with an issue I have. &amp;nbsp;This is a stormwater ArcGIS Pro issue.&lt;/P&gt;&lt;P&gt;The issue:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;I need to create two new fields (Up_stream and Down_stream nodes) in our established inventory list of stormwater &lt;STRONG&gt;pipe &lt;/STRONG&gt;infrastructure. The two new fields (which I have created) in our Pipe layer,&amp;nbsp; needs to be populated to indicate which stormwater infrastructure the pipes are flowing to and from.&lt;UL&gt;&lt;LI&gt;EX. Inlet X (up steam flows to) ------Pipe-----&amp;gt; Manhole Y or Inlet Z (down stream flows from)&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;I need to find a way to populate into the two new fields the feature IDs for the To (downstream) and From (Upstream) stormwater infrastructures.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Research question:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Does anyone have any insight and how to tackle this situation or have ideas where I can look up tutorials etc. &amp;nbsp;&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;Has anyone had experience with this? I’m sure we are not the only one out to encounter this type of issue.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Worst case I manually input the feature ID for each pipe segment, but I am sure there must be something to help jumpstart the process.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you an advance &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Feb 2024 15:43:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/adding-data-from-two-different-layers-into-another/m-p/1387457#M79384</guid>
      <dc:creator>MaureenSpiessl</dc:creator>
      <dc:date>2024-02-27T15:43:48Z</dc:date>
    </item>
    <item>
      <title>Re: Adding data from two different layers into another layer, stormwater pipes feature IDs</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/adding-data-from-two-different-layers-into-another/m-p/1388450#M79507</link>
      <description>&lt;P&gt;Is the Feature ID field you are referencing the built in non-editable field that comes automatically with shape file feature classes, aka ObjectID in GDBs?&amp;nbsp; If it is, you shouldn't use it and you should define a separate field in the feature class.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2024 23:57:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/adding-data-from-two-different-layers-into-another/m-p/1388450#M79507</guid>
      <dc:creator>RobChasan</dc:creator>
      <dc:date>2024-02-28T23:57:42Z</dc:date>
    </item>
    <item>
      <title>Re: Adding data from two different layers into another layer, stormwater pipes feature IDs</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/adding-data-from-two-different-layers-into-another/m-p/1388794#M79528</link>
      <description>&lt;OL&gt;&lt;LI&gt;Can you provide a few screenshots? With labelled features?&lt;/LI&gt;&lt;LI&gt;And can you show us the attribute table? And manually populate a few values to indicate what you're looking for?&lt;/LI&gt;&lt;LI&gt;Does a tool like Spatial Join help you?&lt;OL class="lia-list-style-type-lower-alpha"&gt;&lt;LI&gt;&lt;STRIKE&gt;Also, an idea implemented in 3.2: &lt;A href="https://community.esri.com/t5/arcgis-pro-ideas/spatial-join-by-attribute-match-fields/idi-p/1185961" target="_self"&gt;Spatial Join by Attribute (Match Fields)&lt;/A&gt;&lt;/STRIKE&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;LI&gt;Do you want to batch-populate the values one time, then manually update them going forward? Or do you want to also find a way to automatically populate the fields every time a feature is created or modified, using an attribute rule?&lt;/LI&gt;&lt;LI&gt;What version of ArcGIS Pro?&lt;/LI&gt;&lt;LI&gt;What kind of geodatabase? File geodatabase? Oracle enterprise geodatabase? Etc.&lt;OL class="lia-list-style-type-lower-alpha"&gt;&lt;LI&gt;If it's an enterprise geodatabase, then what spatial type doe the feature classes use? ST_GEOMETRY?&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Are the pipe features digitized in the direction of flow?&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Do the inlet and manhole features have &lt;U&gt;&lt;EM&gt;invert&lt;/EM&gt;&lt;/U&gt; elevations?&lt;/STRONG&gt; I.e., a field that indicates the elevation that the pipe connects to the inlet or manhole?&lt;/LI&gt;&lt;LI&gt;Is &lt;SPAN&gt;Up_stream always either an inlet or a manhole?&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Is Down_stream always a manhole, never an inlet?&lt;/SPAN&gt;&lt;OL class="lia-list-style-type-lower-alpha"&gt;&lt;LI&gt;&lt;SPAN&gt;What about outfalls?&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;&lt;SPAN&gt;It would be relatively straightforward to determine what points (inlets and manholes) would be associated with a given pipe -- due to proximity. But it's not clear to me how you would know what inlet/manhole is to be the&amp;nbsp;Up_stream value (in the pipe layer). And what inlet/manhole is to be the&amp;nbsp;Down_stream value.&lt;BR /&gt;&lt;BR /&gt;For example, for Pipe1, &lt;STRONG&gt;how do you know what manhole is upstream vs. downstream?&lt;/STRONG&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bud_0-1709223185409.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/96322i52FC97270D081465/image-size/large?v=v2&amp;amp;px=999" role="button" title="Bud_0-1709223185409.png" alt="Bud_0-1709223185409.png" /&gt;&lt;/span&gt;&lt;/LI&gt;&lt;/OL&gt;</description>
      <pubDate>Fri, 01 Mar 2024 03:16:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/adding-data-from-two-different-layers-into-another/m-p/1388794#M79528</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2024-03-01T03:16:49Z</dc:date>
    </item>
    <item>
      <title>Re: Adding data from two different layers into another layer, stormwater pipes feature IDs</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/adding-data-from-two-different-layers-into-another/m-p/1389549#M79621</link>
      <description>&lt;P&gt;I asked a colleague, and they said they use the direction of the line to determine what manhole is&amp;nbsp;upstream vs. downstream.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Mar 2024 16:46:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/adding-data-from-two-different-layers-into-another/m-p/1389549#M79621</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2024-03-01T16:46:21Z</dc:date>
    </item>
    <item>
      <title>Re: Adding data from two different layers into another layer, stormwater pipes feature IDs</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/adding-data-from-two-different-layers-into-another/m-p/1390341#M79708</link>
      <description>&lt;P&gt;Hello, thank you for your list of questions. I will answer them as best as I can. I will state that I am fairly new to this position as well as this Stormwater GIS analyst position is new. So I am dealing with a database that may or may not have been maintained well. I have a lot of data cleanup in my near future &lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/P&gt;&lt;P&gt;1) The screen shots of the application.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MaureenSpiessl_0-1709561808693.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/96715iDB81FE5EC36F026D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MaureenSpiessl_0-1709561808693.png" alt="MaureenSpiessl_0-1709561808693.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;We do have arrows that are used to visually identify water flow of the pips.&lt;/LI&gt;&lt;LI&gt;The manholes, inlets, outfalls, etc. are all given a separate FeatureID separate from the ObjectID.&lt;/LI&gt;&lt;LI&gt;Visually speaking we can tell the direction of water flow, however we need the upstream and downstream fields filled in with infrastructure to which the pipes are flowing from and to.&lt;UL&gt;&lt;LI&gt;EX.&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MaureenSpiessl_1-1709561808706.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/96712iFE8F8E5E60333D51/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MaureenSpiessl_1-1709561808706.png" alt="MaureenSpiessl_1-1709561808706.png" /&gt;&lt;/span&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;We need to populate the two fields to fill in the data relating to either a manhole to manhole or manhole to inlet or inlet to outfall etc. Note: I manually added the data here to show what I am trying to do.&lt;/LI&gt;&lt;LI&gt;The reason we need this data is for one of our camera truck vendors need these fields filled in for their work flow to begin.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) Attribute table.&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MaureenSpiessl_2-1709561808721.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/96713iBB2FAC4B32573D1A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MaureenSpiessl_2-1709561808721.png" alt="MaureenSpiessl_2-1709561808721.png" /&gt;&lt;/span&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;3) Spatial Join, I am unsure if that will be useful but I can look into it.&lt;/P&gt;&lt;P&gt;4) I would like to batch-populate all current fields and then manually update as we move forward and add new infrastructure.&amp;nbsp; Although that might be nice to find a way to automatically populate the fields every time a feature is created or modified, using an attribute rule, but to start I just need to populate the fields so that our vendors can start work.&lt;/P&gt;&lt;P&gt;5) ArcGIS Pro 3.2.0&lt;/P&gt;&lt;P&gt;6) I am pretty sure it is just a file geodatabase.&lt;/P&gt;&lt;P&gt;7) Yes the pipe features are created to indicate the flow of water.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:"&gt;😎&lt;/span&gt; Inlet and manhole invert elevations--- not really. That data is unfortunately not the best maintained. The feature layers for inlets and manholes do have some invert elevation data but I would not rely on it. The pipe feature layer does have the invert elevation data.&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Inlet feature layer attribute table&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MaureenSpiessl_3-1709561808722.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/96716i605CBD8B8A31CD0C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MaureenSpiessl_3-1709561808722.png" alt="MaureenSpiessl_3-1709561808722.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Pipe feature layer attribute table&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MaureenSpiessl_4-1709561808722.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/96717i9DAB397488332221/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MaureenSpiessl_4-1709561808722.png" alt="MaureenSpiessl_4-1709561808722.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;9) I believe so that the up_stream is always going to be either a manhole or an inlet.&lt;/P&gt;&lt;P&gt;10) Yes, once again I believe so. Some downstream may empty via a outfall or a ditch.&lt;/P&gt;&lt;P&gt;11) I hear ya, this is one of the biggest issues I am dealing with.&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Your screen shot is what I need to accomplish and the only way I know which manhole or inlet is up or down stream is by visually looking at the map with the labels turned on and filling in the fields manually&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;12) I was unaware with the state of the data that I am working with, so even if I can figure out a way to populate the two new field with as much data as I can and then I can manually add the rest. There are over 900,000 pipe segments in this database and our elevation data is not the best kept. &amp;nbsp;So even if I can get a portion of that filled in that would be great. I have a lot of work to do cleaning up years’ worth of data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Mar 2024 14:20:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/adding-data-from-two-different-layers-into-another/m-p/1390341#M79708</guid>
      <dc:creator>MaureenSpiessl</dc:creator>
      <dc:date>2024-03-04T14:20:46Z</dc:date>
    </item>
    <item>
      <title>Re: Adding data from two different layers into another layer, stormwater pipes feature IDs</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/adding-data-from-two-different-layers-into-another/m-p/1390342#M79709</link>
      <description>&lt;P&gt;That is what we generally use as well but we have vendor that requires the up stream and down stream fields filled in to complete work orders.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Our water and sewer department have these fields filled in but they are all manhole to manhole and it was easier for them to populate the fields then stormwater.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Mar 2024 14:23:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/adding-data-from-two-different-layers-into-another/m-p/1390342#M79709</guid>
      <dc:creator>MaureenSpiessl</dc:creator>
      <dc:date>2024-03-04T14:23:58Z</dc:date>
    </item>
    <item>
      <title>Re: Adding data from two different layers into another layer, stormwater pipes feature IDs</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/adding-data-from-two-different-layers-into-another/m-p/1390528#M79728</link>
      <description>&lt;P&gt;I have done this in the past with using a &lt;A href="https://pro.arcgis.com/en/pro-app/3.1/arcpy/data-access/searchcursor-class.htm" target="_self"&gt;searchcursor&lt;/A&gt; to get the SHAPE@ field.&amp;nbsp; With the SHAPE@ object you can get&lt;A href="https://pro.arcgis.com/en/pro-app/3.1/arcpy/classes/geometry.htm" target="_self"&gt; firstpoint/lastpoint&lt;/A&gt; of the line.&amp;nbsp; (&amp;nbsp;line[1].lastPoint.X,line[1].lastPoint.Y )&lt;/P&gt;&lt;P&gt;I then iterate through each line and grab the first point (from the line) and use that point to make a feature layer so that I can use it to Select by Location the appropriate manhole ad get it's ID.&amp;nbsp; Then I use an update cursor to assign this MH id to the UpstreamMH field.&lt;/P&gt;&lt;P&gt;Then, Select by Location using the last point, grab that MH id and update cursor to the DownstreamMH field.&lt;/P&gt;&lt;P&gt;I would think you could do this fairly easy with Arcade as well using the paths of the line, but have not looked into it.&amp;nbsp; The main benefit of using Arcade is that you could also use it to make an attribute rule that will populate these values automagically in the future when editing/adding new features.&lt;/P&gt;&lt;P&gt;R_&lt;/P&gt;</description>
      <pubDate>Mon, 04 Mar 2024 17:14:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/adding-data-from-two-different-layers-into-another/m-p/1390528#M79728</guid>
      <dc:creator>RhettZufelt</dc:creator>
      <dc:date>2024-03-04T17:14:49Z</dc:date>
    </item>
    <item>
      <title>Re: Adding data from two different layers into another layer, stormwater pipes feature IDs</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/adding-data-from-two-different-layers-into-another/m-p/1390965#M79781</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Similar to what&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/15530"&gt;@RhettZufelt&lt;/a&gt;&amp;nbsp;mentioned:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If your pipes are digitized in the right direction (arrow symbol points the right way) then you could use the point (manhole, inlet, or outfall) that is closest to the &lt;/SPAN&gt;&lt;STRONG&gt;start point&lt;/STRONG&gt;&lt;SPAN&gt; of the line to populate the&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Up_stream field of the pipe. And use&amp;nbsp;the point (manhole, inlet, or outfall) that is closest to the &lt;STRONG&gt;end point&lt;/STRONG&gt; of the line to populate the Down_stream field of the pipe.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;That should be possible using OOTB geoprocessing tools.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/569244"&gt;@MErikReedAugusta&lt;/a&gt;&amp;nbsp;might find this interesting.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Mar 2024 08:26:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/adding-data-from-two-different-layers-into-another/m-p/1390965#M79781</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2024-03-05T08:26:45Z</dc:date>
    </item>
    <item>
      <title>Re: Adding data from two different layers into another layer, stormwater pipes feature IDs</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/adding-data-from-two-different-layers-into-another/m-p/1391140#M79807</link>
      <description>&lt;P&gt;Thanks for the tag, &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/351335"&gt;@Bud&lt;/a&gt;&amp;nbsp;.&amp;nbsp; I'm skimming this, now, and I'm pretty sure we have this exact setup, and I already wrote a Python script to fill in those Up/Down IDs.&amp;nbsp; I'll drop it here in a bit, once I reformat it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/715877"&gt;@MaureenSpiessl&lt;/a&gt;&amp;nbsp;, do you&amp;nbsp;&lt;EM&gt;also&lt;/EM&gt; have any linking IDs on the Manholes?&amp;nbsp; For example, on our Point feature, we have OutPipe and InPipe fields where I can drop an ID, in addition to the Up/Down ID fields on the Pipes.&amp;nbsp; That's a bit more complicated, but it's also doable.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Mar 2024 15:19:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/adding-data-from-two-different-layers-into-another/m-p/1391140#M79807</guid>
      <dc:creator>MErikReedAugusta</dc:creator>
      <dc:date>2024-03-05T15:19:33Z</dc:date>
    </item>
    <item>
      <title>Re: Adding data from two different layers into another layer, stormwater pipes feature IDs</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/adding-data-from-two-different-layers-into-another/m-p/1391146#M79808</link>
      <description>&lt;P&gt;To add a little more, my data has separate featureclass for mahnoles or cleanouts on the sewer, and manholes, cleanouts, inlets, outlets, discharge, etc. on the storm.&lt;/P&gt;&lt;P&gt;So, to make the script easier so I only have to intersect with one layer, I run an append operation that copies over ALL the respective point features to a single temporary featureclass with the feature ID.&amp;nbsp;&lt;/P&gt;&lt;P&gt;R_&lt;/P&gt;</description>
      <pubDate>Tue, 05 Mar 2024 15:28:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/adding-data-from-two-different-layers-into-another/m-p/1391146#M79808</guid>
      <dc:creator>RhettZufelt</dc:creator>
      <dc:date>2024-03-05T15:28:48Z</dc:date>
    </item>
    <item>
      <title>Re: Adding data from two different layers into another layer, stormwater pipes feature IDs</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/adding-data-from-two-different-layers-into-another/m-p/1391151#M79809</link>
      <description>&lt;P&gt;I was going to suggest the same thing! Glad I’m on the right track.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Mar 2024 15:33:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/adding-data-from-two-different-layers-into-another/m-p/1391151#M79809</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2024-03-05T15:33:24Z</dc:date>
    </item>
    <item>
      <title>Re: Adding data from two different layers into another layer, stormwater pipes feature IDs</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/adding-data-from-two-different-layers-into-another/m-p/1391173#M79813</link>
      <description>&lt;P&gt;It looks like &lt;A href="https://github.com/Esri/arcade-expressions/blob/master/attribute_rule_calculation/CalcJunctionFields.md" target="_self"&gt;this post&lt;/A&gt; shows how to do that with Arcade.&amp;nbsp; Is for an attribute rule, but shows the syntax that could be modified run in field calculator (or use as a rule &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;R_&lt;/P&gt;</description>
      <pubDate>Tue, 05 Mar 2024 15:46:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/adding-data-from-two-different-layers-into-another/m-p/1391173#M79813</guid>
      <dc:creator>RhettZufelt</dc:creator>
      <dc:date>2024-03-05T15:46:38Z</dc:date>
    </item>
    <item>
      <title>Re: Adding data from two different layers into another layer, stormwater pipes feature IDs</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/adding-data-from-two-different-layers-into-another/m-p/1391206#M79815</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;We do not have any linking IDs connecting the manhole or inlet with a pipe, but that does seem useful for the future. I believe before I joined the team here, they relied on visual maps etc. to see the connections of pipes to manholes and inlets.&lt;/P&gt;&lt;P&gt;Thank you.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Mar 2024 16:08:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/adding-data-from-two-different-layers-into-another/m-p/1391206#M79815</guid>
      <dc:creator>MaureenSpiessl</dc:creator>
      <dc:date>2024-03-05T16:08:16Z</dc:date>
    </item>
    <item>
      <title>Re: Adding data from two different layers into another layer, stormwater pipes feature IDs</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/adding-data-from-two-different-layers-into-another/m-p/1391218#M79816</link>
      <description>&lt;P&gt;that code doesn't rely on any common field/IDs.&amp;nbsp; It just intersects the beginning and end point of the line with the points (MH's) and transfers the MHID and ELEV values (you can just drop the elevation part) from the point to the respective end of the line.&lt;/P&gt;&lt;P&gt;This code is for an attribute rule to do exactly what you requested in the original post.&amp;nbsp; You should be able to modify it to iterate through all the lines in calculate field tool.&lt;/P&gt;&lt;P&gt;R_&lt;/P&gt;</description>
      <pubDate>Tue, 05 Mar 2024 16:17:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/adding-data-from-two-different-layers-into-another/m-p/1391218#M79816</guid>
      <dc:creator>RhettZufelt</dc:creator>
      <dc:date>2024-03-05T16:17:37Z</dc:date>
    </item>
    <item>
      <title>Re: Adding data from two different layers into another layer, stormwater pipes feature IDs</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/adding-data-from-two-different-layers-into-another/m-p/1391356#M79825</link>
      <description>&lt;P&gt;I think we're talking&amp;nbsp;&lt;EM&gt;slightly&lt;/EM&gt; tangential things, here:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;What linkage IDs are worth having&lt;/LI&gt;&lt;LI&gt;How to update linkage IDs for&amp;nbsp;&lt;EM&gt;new&lt;/EM&gt; features, as they're created&lt;/LI&gt;&lt;LI&gt;How to populate linkage IDs for&amp;nbsp;&lt;EM&gt;existing&lt;/EM&gt; features, right now&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;STRONG&gt;1. What linkage IDs are worth having&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;At minimum, I'd generally recommend what you already have: Upstream ID and Downstream ID for your Line Features (i.e., Pipes).&amp;nbsp; For probably 90% of use-cases, this is probably&amp;nbsp;&lt;EM&gt;all&lt;/EM&gt; you need.&amp;nbsp; You might also consider an Outlet ID from your Polygon Features, like a detention pond.&amp;nbsp; That's not handled at all by the code I provided below, though.&lt;/P&gt;&lt;P&gt;In our organization, we've also experimented with a suite of "helper" fields on our Point Feature, because it helps some of our older-school field people when they're locating new Assets.&amp;nbsp; The goal was to not make them digitize a line feature from the field, so we needed a place to put the most critical datapoints for a newly-discovered pipe, like Material &amp;amp; Diameter.&amp;nbsp; That evolved outward into back-populating the ID of the Pipe into one of those "helper" fields, once it's created.&amp;nbsp; Downside is that it&amp;nbsp;&lt;EM&gt;massively&lt;/EM&gt; bloats your Point Feature's schema.&amp;nbsp; It's a headache that I don't recommend doing lightly.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2. How to update linkage IDs for&amp;nbsp;&lt;EM&gt;new&lt;/EM&gt; features, as they're created:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Go with the code&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/15530"&gt;@RhettZufelt&lt;/a&gt;&amp;nbsp;linked elsewhere in this thread, and build it as an Attribute Rule.&amp;nbsp; It might or might not need a little retooling, depending on what linkage IDs you end up using.&amp;nbsp; At a glance, it will work pretty much as-is, if all you have is Upstream ID / Downstream ID for a line feature.&lt;/P&gt;&lt;P&gt;(Sidebar: Thanks for finding that, Rhett—that step was in my near future and it's nice to not have to reinvent the wheel!)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;3. How to update linkage IDs for&amp;nbsp;&lt;EM&gt;existing&amp;nbsp;&lt;/EM&gt;features, right now:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;A few assumptions/caveats/notes on this code, before I get to it:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;STRONG&gt;This assumes your line features are&amp;nbsp;&lt;EM&gt;snapped&lt;/EM&gt; to your point features.&lt;/STRONG&gt;&lt;UL&gt;&lt;LI&gt;With the data we inherited in our organization, this wasn't originally the case.&lt;/LI&gt;&lt;LI&gt;You should be able to automate the snapping with existing ArcGIS tools, if memory serves, but it's been a while.&amp;nbsp; Just be careful of the effect on Point 2 concerning duplicates, below.&lt;/LI&gt;&lt;LI&gt;You could also adapt the code to look for nodes within a certain radius, but that's quite a bit more memory-intensive, and we didn't need it to do so, so I also didn't write that in, here.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;This assumes that you don't have any coincident duplicates in your point features.&lt;/STRONG&gt;&lt;UL&gt;&lt;LI&gt;Be careful if you have to do snapping from Point 1, because you might end up with duplicates afterwards, depending on your snap tolerances.&lt;/LI&gt;&lt;LI&gt;This tool&amp;nbsp;&lt;EM&gt;could&lt;/EM&gt; be modified relatively easily to handle duplicates if they exist, but I didn't write it this way, this time.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Lines 15-28 are your inputs, and they are&amp;nbsp;&lt;U&gt;&lt;EM&gt;not&lt;/EM&gt;&lt;/U&gt; pre-populated.&lt;/STRONG&gt;&lt;UL&gt;&lt;LI&gt;If you want to run this standalone, just replace None on lines 19-20 with the full path to the relevant Feature Class.&amp;nbsp; Then replace None on lines 23-28 with the name of the relevant field,&amp;nbsp;&lt;U&gt;as a string&lt;/U&gt;.&lt;/LI&gt;&lt;LI&gt;If you want to run this as a tool, replace None on all of the above lines with arcpy.GetParameterAsText(#), where # is the applicable index of the tool input for the tool you've created.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;If you run this as a tool, it should automatically trigger progress bars.&amp;nbsp; If you run it standalone, it'll have little/no reporting messages to provide you.&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;This is less-complex than what our organization uses, but slightly more-complex than what your OP demands.&lt;/STRONG&gt;&lt;UL&gt;&lt;LI&gt;Our code covers a bunch of other related circumstances and is currently in a bit of a rebuild, anyway, so I essentially rewrote a heavily-trimmed down stub.&lt;/LI&gt;&lt;LI&gt;I'm also pretty debug-happy with the stuff we actually run internally, because if/when something breaks, I like to know&amp;nbsp;&lt;EM&gt;exactly&lt;/EM&gt; where it broke and why, but I stripped all those steps out for the snippet below.&lt;/LI&gt;&lt;LI&gt;While it's a little more complex than what your OP necessitates, in my eyes it's a slightly better platform to build from if you do end up expanding or elaborating it in the future.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;I can pretty much guarantee that this isn't the most-efficient possible way for this to run.&lt;/STRONG&gt;&lt;UL&gt;&lt;LI&gt;For one, I think the Spatial Join functions run more in C and/or in ArcGIS's back-end stuff, so I'm pretty sure they'd be more efficient.&amp;nbsp; I didn't go that route with our code for a bunch of complicated reasons, though, and I decided not to rebuild it that way, here.&lt;/LI&gt;&lt;LI&gt;Our dataset is about 50k each for points and lines, at the moment, and it runs quickly&amp;nbsp;&lt;EM&gt;enough&lt;/EM&gt; on that set for our purposes.&amp;nbsp; Plus, "There's nothing so permanent as a 'temporary' solution."&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;See the SPOILER below for the code, and happy automating!&lt;/P&gt;&lt;LI-SPOILER&gt;&lt;LI-CODE lang="python"&gt;"""Stormwater Upstream/Downstream Locator Tool
    Author: MErikReedAugusta (ESRI Community)
    Python: 3.9
    ArcGIS Pro: 3.1.3

    Scans the provided Storm Structure feature to generate a list of nodes, then matches those
    nodes to the up/downstream ends of the provided Storm Pipe feature, and logs the relevant
    Storm Structure ID.
"""
# IMPORTS Standard Library

# IMPORTS 3rd Party
import arcpy

##############################################################################################################################
# INPUTS
##############################################################################################################################
# The Feature Classes you intend to target with this tool
structure_Feature = None
pipe_Feature      = None

# These are the ID Fields for each Asset ON THEIR RESPECTIVE FEATURE (This is their "self" ID)
structure_IDField = None
pipe_IDField      = None

# These are the Upstream/Downstream ID Fields on the Pipe Feature
upstream_IDField    = None
downstream_IDField  = None

##############################################################################################################################
# CLASSES &amp;amp; EXCEPTIONS
##############################################################################################################################
class NodeNotFoundError(KeyError):
  """Exception raised when a specified Node couldn't be found in the NodeMap."""
  pass


class DuplicateNodeError(KeyError):
  """Exception raised when a specified Node already exists in the NodeMap."""
  pass


class NodeObj():
  """Defines a geographic point of significance for the geometry of an Asset in 2-dimensional space."""
  def __init__(self, x, y):
    self.X = x
    self.Y = y

    self.ID_Structure = None


class NodeMap():
  """A searchable list-like database of all Nodes encountered."""
  def __init__(self):
    self._data = []

  #################################################################################################
  # NodeMap Navigation
  #################################################################################################
  def HasNode(self, nodeX, nodeY):
    """Returns True if the provided X/Y Coordinate is found in the NodeMap."""
    # Get a shortened list of just the nodes that match your coordinates.
    matchingNodes = [node for node in self._data if node.X == nodeX and node.Y == nodeY]

    # If the list is 0, then those coordinates aren't here.  If it's bigger, then they are.
    return len(matchingNodes) &amp;gt; 0

  def GetNode(self, nodeX, nodeY):
    """Given a provided coordinate pair, this finds and returns the first matching NodeObj in the NodeMap."""
    for node in self._data:
      if node.X == nodeX and node.Y == nodeY:
        return node

    # If you're still here, then no nodes have matched.  Probably should've checked first!  Have an Exception, instead.
    raise NodeNotFoundError()

  def AddNode(self, nodeObj):
    """Adds the provided Node Object to the NodeMap."""
    if self.HasNode(nodeObj.X, nodeObj.Y):
      raise DuplicateNodeError()

    self._data.append(nodeObj)

  #################################################################################################
  # Read/Write Assets
  #################################################################################################
  def ReadPoints(self):
    """Reads the Point Feature Class provided above and converts it into Node Objects."""
    # Sets up an ArcGIS Progressor, if you're running this in a Tool
    totalRows = int(arcpy.management.GetCount(structure_Feature)[0])
    stepFrag = 10 ** (len(str(totalRows)) - 2)
    arcpy.SetProgressor('step',
                        message='Populating Nodes from Structures...',
                        min_range=0,
                        max_range=totalRows,
                        step_value=stepFrag,
                       )
    progCount = 0

    # Iterates through the Structure Table, reading Nodes
    with arcpy.da.SearchCursor(structure_Feature, ['OID@', structure_IDField, 'SHAPE@']) as cursor:
      for oid, assetID, geo in cursor:
        # Update the Progressor as we go, if this is in a Tool
        progCount += 1
        if progCount % stepFrag == 0:
          arcpy.SetProgressorPosition()
          arcpy.SetProgressorLabel(f'Reading Feature Class for Assets: {progCount: &amp;gt;{len(str(totalRows))}}/{totalRows}...')

        # Do the actual work of pulling the Node
        node = NodeObj(geo.firstPoint.X, geo.firstPoint.Y)
        node.ID_Structure = assetID

        self.AddNode(node)
        # Clean up the node object(s) for safety &amp;amp; paranoia, so nothing gets forwarded where it shouldn't
        del node

  def WriteLines(self):
    """Reads the endpoints of the Line Feature Class provided above and retrieves the specified Node, if applicable."""
    # Sets up an ArcGIS Progressor, if you're running this in a Tool
    totalRows = int(arcpy.management.GetCount(pipe_Feature)[0])
    stepFrag = 10 ** (len(str(totalRows)) - 2)
    arcpy.SetProgressor('step',
                        message='Populating Nodes from Structures...',
                        min_range=0,
                        max_range=totalRows,
                        step_value=stepFrag,
                       )
    progCount = 0

    # Iterates through the Structure Table, reading Nodes
    with arcpy.da.UpdateCursor(pipe_Feature, ['OID@', pipe_IDField, upstream_IDField, downstream_IDField, 'SHAPE@']) as cursor:
      for oid, assetID, frID, toID, geo in cursor:
        # Update the Progressor as we go, if this is in a Tool
        progCount += 1
        if progCount % stepFrag == 0:
          arcpy.SetProgressorPosition()
          arcpy.SetProgressorLabel(f'Reading Feature Class for Assets: {progCount: &amp;gt;{len(str(totalRows))}}/{totalRows}...')


        # Look for the Upstream Node and read the ID there; write a sentinel value if it fails
        try:
          nodeObj_UP = self.GetNode(geo.firstPoint.X, geo.firstPoint.Y)
          frID = nodeObj_UP.ID_Structure
        except NodeNotFoundError():
          frID = 'ID_Not_Found'

        # Look for the Downstream Node and read the ID there; write a sentinel value if it fails
        try:
          nodeObj_DN = self.GetNode(geo.lastPoint.X, geo.lastPoint.Y)
          toID = nodeObj_DN.ID_Structure
        except NodeNotFoundError():
          toID = 'ID_Not_Found'

        cursor.updateRow((oid, assetID, frID, toID, geo))
        # Clean up the node object(s) for safety &amp;amp; paranoia, so nothing gets forwarded where it shouldn't
        del nodeObj_UP, nodeObj_DN


##############################################################################################################################
# MAIN
##############################################################################################################################
def Main():
  arcpy.AddMessage('Begin.')
  nodeMap = NodeMap()

  arcpy.AddMessage('Populating Nodes from Structures...')
  nodeMap.ReadPoints()

  arcpy.AddMessage('Updating Linkage Fields in Pipes...')
  nodeMap.WriteLines()

if __name__ == '__main__':
  Main()&lt;/LI-CODE&gt;&lt;/LI-SPOILER&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Mar 2024 23:10:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/adding-data-from-two-different-layers-into-another/m-p/1391356#M79825</guid>
      <dc:creator>MErikReedAugusta</dc:creator>
      <dc:date>2024-03-05T23:10:59Z</dc:date>
    </item>
    <item>
      <title>Re: Adding data from two different layers into another layer, stormwater pipes feature IDs</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/adding-data-from-two-different-layers-into-another/m-p/1396891#M80484</link>
      <description>&lt;P&gt;Possibly related:&amp;nbsp;&lt;A href="https://community.esri.com/t5/attribute-rules-questions/calculate-from-and-to-endpoint-ids-from-one-of/m-p/1396869#M1358" target="_self"&gt;Calculate From and To Endpoint IDs (from one of several point feature classes)&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Mar 2024 03:15:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/adding-data-from-two-different-layers-into-another/m-p/1396891#M80484</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2024-03-16T03:15:32Z</dc:date>
    </item>
    <item>
      <title>Re: Adding data from two different layers into another layer, stormwater pipes feature IDs</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/adding-data-from-two-different-layers-into-another/m-p/1411778#M82057</link>
      <description>&lt;P&gt;Related:&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-pro-questions/pull-data-from-sewer-line-feature-to-manhole-point/m-p/1084413/highlight/true#M43941" target="_self"&gt;Pull data from sewer line feature to manhole point feature&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Apr 2024 17:06:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/adding-data-from-two-different-layers-into-another/m-p/1411778#M82057</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2024-04-18T17:06:53Z</dc:date>
    </item>
  </channel>
</rss>

