Jump to content

samirz10

Inactive Members
  • Content Count

    2
  • Joined

  • Last visited

    Never

Community Reputation

0 Neutral

About samirz10

  • Rank
    Undergraduate

Profile Information

  • Gender
    Not Telling
  1. Hello All, I am new to python scripting and need to write a code to basically loop through selected records of a feature class. Here's a sample of how attribute table looks like. I have also attached a pgdb. OBID ID FromLeft ToLeft FromRightToRight Flag 1 1 0 9 2 10 2 1 8 19 12 24 3 22 3 23 2 12 4 3 0 0 4 16 5 1 21 29 26 30 6 3 0 11 18 22 7 1 27 31 32 42 8 3 13 19 22 28 Here's what I am trying to do. 1. Grab all the records with same id (say ID=1) 2. sort "FromLeft" in ascending order 3. Skip the first record 3. compare "FromLeft" value (ie. 2nd record) with "ToLeft" value of previous record (ie. 1st record) 4. if "FromLeft" value <= "ToLeft" value of previous record, export both records to a new table or flag it by populating a new field 5. Sort "FromRight" and repeat the same process 6. Once this is done for all the records with ID=1, move on to next set of records with same id, (say ID=3) Any help will be greatly appreciated. Thank you.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.