Guest User

Untitled

a guest
Apr 20th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.46 KB | None | 0 0
  1. cursor = arcpy.da.SearchCursor(SktSegmentTable, SktSegmentData, "status = 'A'and lrsn = '754'")
  2. for row in cursor:
  3. count += 1
  4. if(count % 100000 == 0):
  5. print("Processed %d rows" %count)
  6. sketchList.append(UnionSketchData(
  7. row[SktSegmentData.index("lrsn")],
  8. row[SktSegmentData.index("extension")],
  9. row[SktSegmentData.index("status")],
  10. row[SktSegmentData.index("segment_id")],
  11. row[SktSegmentData.index("vector_start")] )
  12. )
  13. del cursor
  14.  
  15. cursor = arcpy.da.SearchCursor(SktVectorTable, SktVectorData, "status = 'A'")#and lrsn = '97429'")
  16. print("Going into VECTOR TABLE")
  17. countRow = 0
  18. count = 0
  19. for row in cursor:
  20. count += 1
  21. if(count % 10000 == 0):
  22. print("Processed %d rows" %count)
  23. if(count % 100000 == 0):
  24. print("Processed %d rows" %count)
  25. seqCount = 0
  26. # Do a check for every sketchList obj
  27. for item in sketchList:
  28. # Check if lrsn is equal to row's lrsn
  29. if(row[SktVectorData.index("lrsn")] == item.lrsn):
  30. # If we have a match on lrsn, then check if the items segment_id is the same
  31. if(row[SktVectorData.index("segment_id")] == item.segment_id ):
  32. if(row[SktVectorData.index("extension")] == item.extension ):
  33. #if The segment_id is the same for the item, append the vector string into seq_numbers
  34. sketchList[seqCount].seq_numbers.append(row[SktVectorData.index("vector")])
  35. seqCount += 1
  36. del cursor
Add Comment
Please, Sign In to add comment