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)
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
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.
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
Retrieving data ...