Polyline to Road Edges in ArcGIS Python [Help Appreciated]

537
3
12-13-2019 04:18 AM
d4001628urhen
New Contributor II

I have a polyline which is representing a road (Generate from some other routing service). I want to get the set of road segments which represents that polyline in arcgis. Is that possible with ArcGIS Python (Notebook)

0 Kudos
3 Replies
deleted-user-NvcfpBOWaKwr
Occasional Contributor

I'm not really sure what you mean by "get the segments" however:

If you are looking to cut the polyline up into segments that represent the roads you could try using the Split By Attributes tool which will separate the feature based on a unique value. 

Split By Attributes—Help | ArcGIS Desktop 

If you are looking to just output information about the segments into something like a text file, let us know and we can try to lend you a helping hand

d4001628urhen
New Contributor II

Moore, Jeremy‌ Thank you very much for the reply. What I meant by "get the segments" is "get the road edge IDs". Also I want to identify what is the closest edge to a given set of points from this edges set. I'm thinking of a KDTree. Would that be possible with arcGIS to implement?. I've tried few solutions but there were not good enough that's why I came to arcGIS. That would be really helpful if you could guide me with some instructions here. 

0 Kudos
deleted-user-NvcfpBOWaKwr
Occasional Contributor

Sounds like you are trying to do nearest neighbor analysis. Have you tried the Average Nearest Neighbor tool? If this gets you close but no cigar, can you provide an example data set, then we can explore some options.

Average Nearest Neighbor—ArcGIS Pro | ArcGIS Desktop 

0 Kudos