I have two shapefiles, valves (points) and waterlines (polyline). The waterlines have a diameter attribute that is populated with the correct size. The valves have an attribute for diameter size as well but some of the values are showing 0 for the size. I need to update the 0 sized valves with the correct size from the waterline it is on.

The valves are in close proximity to the waterline if not directly on it. I don't have access to the "Near" function because of the level of my license. I am using ArcGIS 10.2 for Desktop with a Standard license.

What I have done so far is select valves by 1ft location to specific waterlines with specific diameter size (ie selected valves that are within 1ft of 16 inch waterline). From this point I'm not sure what I should do next or even if this is the correct path to the solution.

  • 1
    How many different valve sizes (waterline diameters) are there, and how many lines and valves are we talking about? Are you looking for a one-off solution to your immediate problem, or an on-going solution for any future additions as well?
    – Midavalo
    Jan 26 '16 at 21:39
  • There are 14 different waterline sizes (1, 1.5, 2, 2.5, 3, 4, 6, 8, 10, 12, 16, 20, 24, & 30 inch waterlines). Each waterline has the potential of having a valve or multiple valves on it. There are 7414 total water valves and 9513 waterline segments. This is a one time fix. I am correcting existing data that was collected preciously. From this point forward the valve size will be added during feature creation or collection.
    – MMarcus
    Jan 28 '16 at 13:28

If the valve data has a waterline identifier that matches what waterline it belongs on there is a simpler and potentially more accurate way to do this.

These would be the steps:

  1. Join the waterlines to the valves by the waterline identifier. Note that this would be an attribute join, not a spatial join. See the image below for an example. enter image description here
  2. Select the valves where diameter = 0.
  3. Use the field calculator to calulate the valve diameter = waterline diameter.
  4. Remove your join.

The advantage of this is that you could be sure that you are connecting to the correct waterline.

Below is a screen shot of my joined tables. I hope it helps illustrate. enter image description here

  • I dont know why you say this is simpler, its the exact same method we outlined earlier. This still runs into the problem @midavalo noted where the join will create a new feature class whose edits needs to be brought back into the original valve fc (either thru append, an additional attribute join, or some other method)
    – ed.hank
    Jan 27 '16 at 19:16
  • This is not the same. The earlier example uses a spatial join, whereas this method uses an attribute join. This method does not create a new feature class. It is also potentially more accurate, as joining by a unique waterline identifier will make it more certain you are joining to the correct waterline. In any case, if MMarcus does not have a unique identifer for the waterlines that is also present in the valve shapefile, this method will not work. He does not say.
    – RHB
    Jan 27 '16 at 19:32
  • Ah I misread your post, my bad, yes you are correct. I guess I didnt realize there was a shared field you could do an attribute join on. Good catch!
    – ed.hank
    Jan 27 '16 at 20:13
  • There are no common attributes between the valves and waterlines other than the diameter size itself. Your solution would have been simpler and used fewer steps if there were. Thanks for responding to my problem, I appreciate it.
    – MMarcus
    Jan 28 '16 at 13:55

You probably want to do a spatial join. Join your lines to points and make sure to select to give each point (valve) the attributes of the line (pipe) it is nearest.

enter image description here

Once you have joined the tables, sort ascending on the valve size field (the field with the 0s) and highlight/select all the records with "0" then right click on the field header and use field calculator to copy of the size from the now joined field holding your pipe size to your field holding the valve size

  • 1
    It might be worth noting that the Spatial Join creates a new feature class or shapefile, so this would need to be joined (using an Attribute Join) to the master Valve layer, and using field calculator to copy the values onto that Valve layer
    – Midavalo
    Jan 26 '16 at 23:18
  • Good point, though personally I would delete all the records with 0 from the original feature class and append the newly populated feature class to the original.
    – ed.hank
    Jan 27 '16 at 2:32
  • Yes that would work too, although not a method I'd follow if dealing with a water network particularly in a geometric network (although it sounds like that is not the case in this situation). But whatever works :)
    – Midavalo
    Jan 27 '16 at 2:45
  • good point, sometimes i forget about things like that!
    – ed.hank
    Jan 27 '16 at 13:42
  • The waterlines are not in a network right now. This is on the to do list as well. For now, the spatial join sounds like the path to an immediate solution. Thanks to all of you for the great feed back.
    – MMarcus
    Jan 28 '16 at 13:40

While @ed-hankins spatial join answer is correct and will solve your immediate problem, for a potential on-going solution I recommend looking at Esri's Attribute Assistant.

The Attribute Assistant may be of some use as this can be set up to automatically populate one field based on a value in a field in another layer (selected by spatial location). This would mean that any new valve placed on your network would automatically pick up the diameter from the waterline it is placed on, and populate the valve size. It can also be run on already existing features and values.

Further to that, Esri's ArcGIS for Water Utilities could potentially be valuable to you if you are running a water network, although this would require some configuration and probably change in how you record your water network, so wouldn't be an immediate solution. However it potentially could save a lot of time and offer added network analysis benefit in the future.

  • I appreciate your response. I am somewhat familiar with Attribute Assistant. I use it with our sanitary sewer network. We had a third party put our sewer system into a sanitary sewer network last year. The waterlines have not been done yet. I will look at the link you've attached to see if this is something I feel comfortable doing myself. Thanks
    – MMarcus
    Jan 28 '16 at 14:13

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.