SHARE
TWEET

Untitled

a guest Jul 22nd, 2019 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import arcpy
  2.  
  3. sheet_name = "RPN_2609"
  4. GDB_path = r"D:Buildings_HeightCase_StudyPart_B{}.gdb".format(sheet_name)
  5. bldg = GDB_path + "//" + "RPN_2609_BLDG_No_Zero"
  6.  
  7. with arcpy.da.UpdateCursor(bldg, ["SHAPE@","OID@"]) as cursor:
  8.   for row in cursor:
  9.       for vertice in row[0]:
  10.           for pnt in vertice:
  11.             try:
  12.                 if pnt.Z == 0:
  13.                     pnt.Z = 1
  14.                     cursor.updateRow(row)
  15.             except:
  16.                 pass
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top