# Finding intermediate points and speed over a segment

I have a dataset which is in the form of ( Time , Car ID, Speed at that moment, Lat,Long) and I need to do some machine learning on the data to answer the following questions :

1. Best route from point A to point B
2. The speed at some point ( which can be on any segment) .

I am having a few problems because I have never dealt with this kind of data before ( I mostly worked with text before this ) :

1. The data is Hyderabad specific. I want to divide Hyderabad into segments but how do I go about dividing it based on points ? If I use 500m as minimum length and keep dividing , there can be many twists and turns which will go missing :(
2. If I get a random point , how do I decide which segment it falls on ? For example, I have two segments , each having start point ( lat,long) and end point ( lat',long') . If i get a third point , (l1,l2), how do I decide which segment it falls under ?

I actually have more questions, but if these get solved first, it would be awesome.

Thanks a lot

-