protected ArrayList<float[]> forwardGreatPoly(double[] rawllpts,int nsegs,boolean isFilled){
  int i, j, k, totalpts=0;
  Point from=new Point();
  Point to=new Point();
  int end=rawllpts.length >>> 1;
  double[][] augllpts=new double[end][0];
  end-=1;
  forward(rawllpts[0],rawllpts[1],from,true);
  for (i=0, j=0, k=2; i < end; i++, j+=2, k+=2) {
    forward(rawllpts[k],rawllpts[k + 1],to,true);
    augllpts[i]=getGreatVertices(rawllpts[j],rawllpts[j + 1],rawllpts[k],rawllpts[k + 1],from,to,false,nsegs);
    from.x=to.x;
    from.y=to.y;
    totalpts+=augllpts[i].length;
  }
  augllpts[i]=new double[2];
  augllpts[i][0]=rawllpts[j];
  augllpts[i][1]=rawllpts[j + 1];
  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);
}

protected ArrayList < float [ ] > forwardGreatPoly ( double [ ] rawllpts , int nsegs , boolean isFilled ) { int i , j , k , totalpts = 0 ; Point from = new Point ( ) ; Point to = new Point ( ) ; int end = rawllpts . length > > > 1 ; double [ ] [ ] augllpts = new double [ end ] [ 0 ] ; end -= 1 ; forward ( rawllpts [ 0 ] , rawllpts [ 1 ] , from , true ) ; for ( i = 0 , j = 0 , k = 2 ; i < end ; i ++ , j += 2 , k += 2 ) { forward ( rawllpts [ k ] , rawllpts [ k + 1 ] , to , true ) ; augllpts [ i ] = getGreatVertices ( rawllpts [ j ] , rawllpts [ j + 1 ] , rawllpts [ k ] , rawllpts [ k + 1 ] , from , to , false , nsegs ) ; from . x = to . x ; from . y = to . y ; totalpts += augllpts [ i ] . length ; } augllpts [ i ] = new double [ 2 ] ; augllpts [ i ] [ 0 ] = rawllpts [ j ] ; augllpts [ i ] [ 1 ] = rawllpts [ j + 1 ] ; 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 ) ; }
forward project a greatcircle poly . < p > draws great circle lines between vertices of poly . remember to specify vertices in radians !
