question: protected ArrayList < float [ ] > forwardRhumbPoly ( double [ ] rawllpts , int nsegs , boolean isFilled ) { if ( this instanceof Mercator ) { return _forwardPoly ( rawllpts , LineType . Straight , nsegs , isFilled ) ; } int i , n , xp , flag = 0 , xadj = 0 , totalpts = 0 ; Point from = new Point ( 0 , 0 ) ; Point to = new Point ( 0 , 0 ) ; int len = rawllpts . length ; double [ ] [ ] augllpts = new double [ len > > > 1 ] [ 0 ] ; mercator . forward ( rawllpts [ 0 ] , rawllpts [ 1 ] , from , true ) ; xp = from . x ; for ( i = 0 , n = 2 ; n < len ; i ++ , n += 2 ) { mercator . forward ( rawllpts [ n ] , rawllpts [ n + 1 ] , to , true ) ; if ( Math . abs ( xp - to . x ) >= mercator . half_world ) { flag += ( xp < to . x ) ? - 1 : 1 ; xadj = flag * mercator . world . x ; } xp = to . x ; if ( flag != 0 ) { to . x += xadj ; } augllpts [ i ] = mercator . rhumbProjectDouble ( from , to , false , nsegs ) ; totalpts += augllpts [ i ] . length ; from . x = to . x ; from . y = to . y ; } LatLonPoint llp = new LatLonPoint . Double ( ) ; mercator . inverse ( from , llp ) ; augllpts [ i ] = new double [ 2 ] ; augllpts [ i ] [ 0 ] = llp . getRadLat ( ) ; augllpts [ i ] [ 1 ] = llp . getRadLon ( ) ; totalpts += 2 ; double [ ] newllpts = new double [ totalpts ] ; int pos = 0 ; for ( i = 0 ; i < augllpts . length ; i ++ ) { System . arraycopy ( augllpts [ i ] , 0 , newllpts , pos , augllpts [ i ] . length ) ; pos += augllpts [ i ] . length ; } augllpts = null ; return _forwardPoly ( newllpts , LineType . Straight , - 1 , isFilled ) ; }
target:  Forward project a rhumbline poly. <p> Draws rhumb lines between vertices of poly. Remember to specify vertices in radians! Check in-code comments for details about the algorithm.