public static void write(OMLine line,Link link,LinkProperties props) throws IOException {
switch (line.getRenderType()) {
case OMLine.RENDERTYPE_LATLON:
    double[] ll=line.getLL();
  LinkLine.write((float)ll[0],(float)ll[1],(float)ll[2],(float)ll[3],line.getLineType(),line.getNumSegs(),props,link.dos);
break;
case OMLine.RENDERTYPE_XY:
int[] pts=line.getPts();
LinkLine.write(pts[0],pts[1],pts[2],pts[3],props,link.dos);
break;
case OMLine.RENDERTYPE_OFFSET:
ll=line.getLL();
pts=line.getPts();
LinkLine.write((float)ll[0],(float)ll[1],pts[0],pts[1],pts[2],pts[3],props,link.dos);
break;
default :
Debug.error("LinkLine.write: line rendertype unknown.");
}
}

public static void write ( OMLine line , Link link , LinkProperties props ) throws IOException { switch ( line . getRenderType ( ) ) { case OMLine . RENDERTYPE_LATLON : double [ ] ll = line . getLL ( ) ; LinkLine . write ( ( float ) ll [ 0 ] , ( float ) ll [ 1 ] , ( float ) ll [ 2 ] , ( float ) ll [ 3 ] , line . getLineType ( ) , line . getNumSegs ( ) , props , link . dos ) ; break ; case OMLine . RENDERTYPE_XY : int [ ] pts = line . getPts ( ) ; LinkLine . write ( pts [ 0 ] , pts [ 1 ] , pts [ 2 ] , pts [ 3 ] , props , link . dos ) ; break ; case OMLine . RENDERTYPE_OFFSET : ll = line . getLL ( ) ; pts = line . getPts ( ) ; LinkLine . write ( ( float ) ll [ 0 ] , ( float ) ll [ 1 ] , pts [ 0 ] , pts [ 1 ] , pts [ 2 ] , pts [ 3 ] , props , link . dos ) ; break ; default : Debug . error ( "LinkLine.write: line rendertype unknown." ) ; } }
write an omline to the link .
