How do you update points in a geometric network with GPS coordinates?

3140
0
08-05-2014 08:25 AM
ErinCavagnaro1
New Contributor

I have a geo network containing pipe lines (as lines) and water valves (as points).  I have a GPS'd points layer of the water valves that I want to update the x,y coordinates of the exisiting water valve layer in the geo network to and also move the water valves to the correct location.  I have tried joining the tables of the original water valve layer and the GPS'd water valve layer and then using the field calculator to update the shape field to move the water valves however I haven't been able to get this to work.  This is the python script I was using in the field calculator:

  1. import arcpy 
  2. from arcpy import env 
  3.  
  4. env.workspace = "C:/Temp/Python/test.gdb" 
  5.  
  6. fc = "Water_Valves" 
  7.  
  8. pnt = arcpy.Point() 
  9.  
  10. rows = arcpy.UpdateCursor(fc) 
  11. for row in rows: 
  12.     pnt.X = row.GPS_X 
  13.     pnt.Y = row.GPS_Y 
  14.     row.shape = pnt 
  15.     rows.updateRow(row) 
  16.  
  17. del row, rows 

Does anyone know of a way to do this with python script or by any other means? It's a big layer with 100's of points so I don't want to do this manually.  Any help would be greatly appreciated, thanks!

0 Kudos
0 Replies