question: private int locateAndGetIndex ( Point2D loc , boolean preceding , Point2D result ) { double a = loc . getX ( ) ; double o = loc . getY ( ) ; int seg = getSegmentIndexForAdvance ( a , preceding ) ; map ( seg , a , o , result ) ; return seg ; }
target:  Map the point, and return the segment index.