I have been digitizing a drainage network and now have been supplied attribute fields to add to the features I have digitized.

Two of the fields for the pipe features are 'upstream manhole ID' and 'Downstream manhole ID'. All pipe lines have direction. Most pipes are snapped to a manhole at some point, but not directly. This is due to each line of pipe being a separate segment. For example a pipe segment ends when it reaches a manhole, same for when it reaches an inlet from a gully.

How could I populate the two manhole ID fields in the pipe feature?

I have considered dissolving the pipe network completely and then splitting the result by the manhole points but this hasn't been successful so far.

  • 2
    Well a big problem you may run into is manholes can have more than two connected pipes. I manage sewer information for over a dozen communities and we converted all of our information from upstream/downstream to directional because the former was crude. I don't envy your situation. Are you trying to automatically populate your fields via code or are you just trying to figure out the best schema for your fields? – Adam Kara Apr 8 '16 at 15:11
  • Automatically populate :D – Joe Kenton Apr 8 '16 at 15:39
  • The information for the attribute fields supplied; are all of the IDs already established? Or do you need to generate IDs from scratch? – Adam Kara Apr 8 '16 at 15:49
  • The manhole and pipe layers have objectID's already of course, I have created a PipeID field which is currently just pipeID = ObjectID but I can create unique IDs if required. The issue is the process I'll need to undertake to fill in the downstream/upstream manhole ID field in the pipe layer, I've considered linear referencing but that doesn't seem to work either currently. – Joe Kenton Apr 8 '16 at 15:55
  • Are all your pipes single-part polylines? – Kirk Kuykendall Apr 8 '16 at 21:23

I have done something simular (for ArcGIS) in the past manually but you could take these steps and make an automated process out of it. The method I used was something like this:

  1. Convert the pipes to points using "Feature Vertices To Points" (ArcGIS for Desktop Advanced) using the start parameter as the Point Type.

    1.1 If you don’t have the advance version, you could use ETGeoWizard's tool "Polyline To Point", select Nodes, select remove duplicate points and hit finish. In the attribute table, a new field is created called ET_Order - the value 0 is the start node, the value 1 is the end node. Using these values, create 2 new shapefiles for the start nodes and end nodes.

    1.2 Additioanlly, you will need to have the unique ID field (create a new static one where the values will not change) for the pipes as attributes.

  2. Convert the pipes to points again using "Feature Vertices To Points" (ArcGIS for Desktop Advanced) using the end parameter as the Point Type.

  3. Use a spatial join (using the manholes layer and start node layer) to take the attributes of the manholes and create a new start node layer. Repeat step and create a new end node layer.

  4. Using the unique id as indicated in step 1.2, use the join function to join the new start node layer's (see step 3) table and join it to the original pipeline. Create a new field (eg. upStreamMH) in the original pipeline layer and assign it the values of the manhole ids. Remove the join and repeat process for joining the table of new end node layer (see step 3). Create a new field (eg. downStreamMH) in the original pipeline layer and assign it the values of the manhole ids. Remove the join

You should have a line that now contains the upstream and downstream manhole id's.


Before you use ObjectIDs, know they can change (ArcMap ObjectID seems to be getting changed, any ideas what might be doing it?)

You can use the field calculator (Geometry) to get the starting X,Y and Ending X,y of each line segment. Then using a python cursor step through the lines using the starting point to select a manhole within say 10 feet, if not null, calc the start manholeID into the pipe, then run again for the end of the pipe.

If there is no manhole with the 10 feet, it won't write but this is valid as the pipe may connect to another pipe or inlet.

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.