Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cursor = arcpy.da.SearchCursor(SktSegmentTable, SktSegmentData, "status = 'A'and lrsn = '754'")
- for row in cursor:
- count += 1
- if(count % 100000 == 0):
- print("Processed %d rows" %count)
- sketchList.append(UnionSketchData(
- row[SktSegmentData.index("lrsn")],
- row[SktSegmentData.index("extension")],
- row[SktSegmentData.index("status")],
- row[SktSegmentData.index("segment_id")],
- row[SktSegmentData.index("vector_start")] )
- )
- del cursor
- cursor = arcpy.da.SearchCursor(SktVectorTable, SktVectorData, "status = 'A'")#and lrsn = '97429'")
- print("Going into VECTOR TABLE")
- countRow = 0
- count = 0
- for row in cursor:
- count += 1
- if(count % 10000 == 0):
- print("Processed %d rows" %count)
- if(count % 100000 == 0):
- print("Processed %d rows" %count)
- seqCount = 0
- # Do a check for every sketchList obj
- for item in sketchList:
- # Check if lrsn is equal to row's lrsn
- if(row[SktVectorData.index("lrsn")] == item.lrsn):
- # If we have a match on lrsn, then check if the items segment_id is the same
- if(row[SktVectorData.index("segment_id")] == item.segment_id ):
- if(row[SktVectorData.index("extension")] == item.extension ):
- #if The segment_id is the same for the item, append the vector string into seq_numbers
- sketchList[seqCount].seq_numbers.append(row[SktVectorData.index("vector")])
- seqCount += 1
- del cursor
Add Comment
Please, Sign In to add comment