I have a shapefile that has most of the lines spaced at regular intervals. However, there are some lines that are overlapped with each other or at very close distance to each other (figure for your illustration). I need to be able to find those lines and delete them automatically. For example, I need to delete either Line 1 or Line 2 (I am not focusing much on which to keep at the moment, but might need to think once I resolve this issue).
To address this issue, I used "Generate Near Table" with a same file as input and near feature file. I specified a search distance less than average distance between two lines (in my case, the lines were typically spaced at 0.7 meter, so I used half this distance (o.35) to search the lines that might be unnecessary). This gives me lines that have distance <0.35. That means it includes both Lines 1 and 2, and Lines 3 and 4. Although it addresses part of the problem, it does not solve the complete problem. I now need to figure out how to select either Line 1 or Line 2 (or Line 3 or Line 4), but not both.
When we create a near table, we get the IN_FID, NEAR_ID and NEAR_DIST attributes. I think I need to treat records that have same combinations of IN_FID and NEAR_ID (i.e., if Line 1 has IN_FID= 1 and NEAR_ID =2, and Line 2 has IN_FID=2 and NEAR_ID=1) as same. I don't know how to do this via program. Once we do, I think I can use Delete Identical function to get rid of those lines.
has someone been into the similar situation and can help me out here.