question: protected float [ ] rhumbProject ( Point2D from , Point2D to , boolean include_last , int nsegs ) { if ( nsegs < 1 ) { nsegs = DrawUtil . pixel_distance ( ( int ) from . getX ( ) , ( int ) from . getY ( ) , ( int ) to . getX ( ) , ( int ) to . getY ( ) ) > > 3 ; if ( nsegs == 0 ) nsegs = 1 ; else if ( nsegs > MAX_RHUMB_SEGS ) nsegs = MAX_RHUMB_SEGS ; } LatLonPoint llp = new LatLonPoint . Double ( ) ; int [ ] xypts = DrawUtil . lineSegments ( ( int ) from . getX ( ) , ( int ) from . getY ( ) , ( int ) to . getX ( ) , ( int ) to . getY ( ) , nsegs , include_last , new int [ nsegs << 1 ] ) ; float [ ] llpts = new float [ xypts . length ] ; for ( int i = 0 ; i < llpts . length ; i += 2 ) { inverse ( xypts [ i ] , xypts [ i + 1 ] , llp ) ; llpts [ i ] = ( float ) llp . getRadLat ( ) ; llpts [ i + 1 ] = ( float ) llp . getRadLon ( ) ; } return llpts ; }
target:  Calculates the points along a rhumbline between two XY points. <p> Loxodromes are straight in the Mercator projection. Calculate a bunch of extra points between the two points, inverse project back into LatLons and return all the vertices.