Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have line feature class of a river network and “FromTo” table. Lines are dissolved so they are not segmented from junctions. I need to write a Python script in ArcGIS to do following:

  1. Begin from the first row in Hydro feature class attribute table and get its ID
  2. Insert this ID into “From” field in “FromTo” table
  3. Get ID(s) of line(s) which intersect(s) first line (e.g. second line intersect first line)
  4. Inset ID into “To” field in FromTo table

For second loop

  1. Get ID of second row in Hydro feature class attribute table

  2. Insert this ID into “From” field in “FromTo” table

  3. Get IDs of lines which intersect second line (e.g. first and third lines intersect second line)

  4. Inset IDs into “To” field in FromTo table

  5. So on…

Perhaps, you show a different way in order to get the same result by Python

enter image description here

share|improve this question
    
Are you trying to do Strahler stream ordering with vector data? This describes the raster alternative resources.arcgis.com/en/help/main/10.1/index.html#//… –  PolyGeo Oct 4 '12 at 22:20
    
@PolyGeo: No, just trying to get connectivity of the network by creating this FromTo table. –  user10727 Oct 4 '12 at 23:07
add comment

2 Answers 2

Between those commands you can do most of what you're asking for.

share|improve this answer
add comment

Since you appear to be just wanting to know where your lines intersect, and which lines intersect at those locations, before going to Python, you may want to try:

  1. Intersect with just the one input feature class - works for all license levels
  2. Tabulate Intersection if you have ArcGIS 10.1 for Desktop Advanced
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.