protected OMGraphicList constructTenDegreeLines(double ctrLon){
  OMGraphicList lines=new OMGraphicList(3);
  OMPoly currentLine;
  for (int i=1; i <= 8; i++) {
    for (int j=-1; j < 2; j+=2) {
      float lat=(float)(10 * i * j);
      double[] llp={lat,ctrLon - 180f,lat,ctrLon - 90f,lat,ctrLon,lat,ctrLon + 90f,lat,ctrLon + 180f};
      currentLine=new OMPoly(llp,OMGraphic.DECIMAL_DEGREES,boxy ? OMGraphic.LINETYPE_STRAIGHT : OMGraphic.LINETYPE_RHUMB);
      currentLine.setLinePaint(tenDegreeColor);
      lines.add(currentLine);
    }
  }
  for (int i=1; i < 18; i++) {
    for (int j=-1; j < 2; j+=2) {
      float lon=(float)(10 * i * j);
      double[] llp={80f,lon,0f,lon,-80f,lon};
      if (MoreMath.approximately_equal(Math.abs(lon),90f,0.001f)) {
        llp[0]=89.999f;
        llp[4]=-89.999f;
      }
      currentLine=new OMPoly(llp,OMGraphic.DECIMAL_DEGREES,boxy ? OMGraphic.LINETYPE_STRAIGHT : OMGraphic.LINETYPE_GREATCIRCLE);
      currentLine.setLinePaint(tenDegreeColor);
      lines.add(currentLine);
    }
  }
  if (Debug.debugging("graticule")) {
    Debug.output("GraticuleLayer.constructTenDegreeLines(): " + "constructed " + lines.size() + " graticule lines");
  }
  lines.generate(getProjection());
  return lines;
}

protected OMGraphicList constructTenDegreeLines ( double ctrLon ) { OMGraphicList lines = new OMGraphicList ( 3 ) ; OMPoly currentLine ; for ( int i = 1 ; i <= 8 ; i ++ ) { for ( int j = - 1 ; j < 2 ; j += 2 ) { float lat = ( float ) ( 10 * i * j ) ; double [ ] llp = { lat , ctrLon - 180f , lat , ctrLon - 90f , lat , ctrLon , lat , ctrLon + 90f , lat , ctrLon + 180f } ; currentLine = new OMPoly ( llp , OMGraphic . DECIMAL_DEGREES , boxy ? OMGraphic . LINETYPE_STRAIGHT : OMGraphic . LINETYPE_RHUMB ) ; currentLine . setLinePaint ( tenDegreeColor ) ; lines . add ( currentLine ) ; } } for ( int i = 1 ; i < 18 ; i ++ ) { for ( int j = - 1 ; j < 2 ; j += 2 ) { float lon = ( float ) ( 10 * i * j ) ; double [ ] llp = { 80f , lon , 0f , lon , - 80f , lon } ; if ( MoreMath . approximately_equal ( Math . abs ( lon ) , 90f , 0.001f ) ) { llp [ 0 ] = 89.999f ; llp [ 4 ] = - 89.999f ; } currentLine = new OMPoly ( llp , OMGraphic . DECIMAL_DEGREES , boxy ? OMGraphic . LINETYPE_STRAIGHT : OMGraphic . LINETYPE_GREATCIRCLE ) ; currentLine . setLinePaint ( tenDegreeColor ) ; lines . add ( currentLine ) ; } } if ( Debug . debugging ( "graticule" ) ) { Debug . output ( "GraticuleLayer.constructTenDegreeLines(): " + "constructed " + lines . size ( ) + " graticule lines" ) ; } lines . generate ( getProjection ( ) ) ; return lines ; }
create the ten degree lines .
