Advertisement
Guest User

Untitled

a guest
Jul 16th, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.81 KB | None | 0 0
  1. import arcpy
  2. fc=r'D:GIS DataTOOLSEV calc in PythonData.gdbPolyWGS84'
  3.  
  4. myList = []
  5.  
  6. with arcpy.da.SearchCursor(fc,['OID@','SHAPE@']) as cursor:
  7. for row in cursor:
  8. array1=row[1].getPart()
  9. for vertice in range(row[1].pointCount):
  10. pnt=array1.getObject(0).getObject(vertice)
  11. print row[0],pnt.X,pnt.Y
  12. myList.append(str(pnt.X) + " " + str(pnt.Y))
  13.  
  14. print ", ".join(myList)
  15.  
  16. 1 151.513429431 -33.568900991
  17. 1 151.313554706 -34.011480738
  18. 1 150.928082023 -33.975788823
  19. 1 150.906666874 -34.27560091
  20. 1 150.506917425 -34.211355462
  21. 1 150.692515384 -33.51893231
  22. 1 151.513429431 -33.568900991
  23. 2 151.72520146 -32.500522999
  24. 2 152.082120611 -33.242914833
  25. 2 151.196961117 -33.100147173
  26. 2 151.72520146 -32.500522999
  27. 151.513429431 -33.568900991, 151.313554706 -34.011480738, 150.928082023 -33.975788823, 150.906666874 -34.27560091, 150.506917425 -34.211355462, 150.692515384 -33.51893231, 151.513429431 -33.568900991, 151.72520146 -32.500522999, 152.082120611 -33.242914833, 151.196961117 -33.100147173, 151.72520146 -32.500522999
  28.  
  29. 151.513429431 -33.568900991, 151.313554706 -34.011480738, 150.928082023 -33.975788823, 150.906666874 -34.27560091, 150.506917425 -34.211355462, 150.692515384 -33.51893231, 151.513429431 -33.568900991
  30. 151.72520146 -32.500522999, 152.082120611 -33.242914833, 151.196961117 -33.100147173, 151.72520146 -32.500522999
  31.  
  32. import arcpy
  33. fc=r'D:GIS DataTOOLSEV calc in PythonData.gdbPolyWGS84'
  34.  
  35.  
  36.  
  37. with arcpy.da.SearchCursor(fc,['OID@','SHAPE@']) as cursor:
  38. for row in cursor:
  39. myList = []
  40. array1=row[1].getPart()
  41. for vertice in range(row[1].pointCount):
  42. pnt=array1.getObject(0).getObject(vertice)
  43. # print row[0],pnt.X,pnt.Y
  44. myList.append(str(pnt.X) + " " + str(pnt.Y))
  45. print row[0], ", ".join(myList)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement