I want to find the first, second , third, etc. order neighbors of polylines preferably using arcgis.

2321
4
04-22-2016 02:17 AM
EhsanAbshirini1
New Contributor

Hi,

I have a shape file containing street networks and I'd like to retrieve the IDs of all 1st,2nd, 3rd, etc. order neighbors for each line(street). Please note that this is different from finding the 1st, 2nd, 3rd closest line to one another line something that ARCGIS is currently able to do it by proximity analysis. 

Any comments would be appreciated.

0 Kudos
4 Replies
DanPatterson_Retired
MVP Emeritus

like a heirachial network? About network analysis with hierarchy—Help | ArcGIS for Desktop

there is Stream in the spatial analyst for raster data

ot the utility networks approach A quick tour of geometric networks—Help | ArcGIS for Desktop

DanPatterson_Retired
MVP Emeritus

And if it is from a location and you need to group in generality, what you may be looking for is a Spanning Tree.  I have an implementation here Spanning Tree Tools

EhsanAbshirini1
New Contributor

Thanks Dan for your reply.

But what i am looking for is different. Clearly talking I want to have a table showing the IDs for all lines located in the immediate neighbor ( the streets that share an intersection with) of a desired line, these are the first order neighbors.Then for each of those streets that share an intersection with the desired line I would like to find their neighbors (these would be the second order neighbors), and so on... 

0 Kudos
DanPatterson_Retired
MVP Emeritus

Yes, I know what you mean. That is a variant of a spanning tree ... but from a start location location, I can't remember if my incarnation puts in the order number off hand, but it does produce a From and To id number so producing the heirachy is definitely possible.  The script uses Prim's algorithm if that makes any difference.  It should be possible to use the algorithm for polylines. 

But I suspect that you are looking for what the Spatial Analyst's Stream tool does... except in vector world.