public synchronized OMGraphicList prepare(){
  if (lst == null) {
    try {
      initLST();
    }
 catch (    IllegalArgumentException iae) {
      logger.warning("VPFLayer.prepare: Illegal Argument Exception.\n\nPerhaps a file not found.  Check to make sure that the paths to the VPF data directories are the parents of \"lat\" or \"lat.\" files. \n\n" + iae);
      return null;
    }
    if (lst == null) {
      if (logger.isLoggable(Level.FINE)) {
        logger.fine("VPFLayer| " + getName() + " prepare(), Library Selection Table not set.");
      }
      return null;
    }
  }
  if (warehouse == null) {
    StringBuffer dpb=new StringBuffer();
    if (dataPaths != null) {
      for (int num=0; num < dataPaths.length; num++) {
        if (num > 0) {
          dpb.append(":");
        }
        dpb.append(dataPaths[num]);
      }
    }
    logger.warning("VPFLayer.getRectangle:  Data path probably wasn't set correctly (" + dpb.toString() + ").  The warehouse not initialized.");
    return null;
  }
  Projection p=getProjection();
  if (p == null || !(p instanceof GeoProj)) {
    if (logger.isLoggable(Level.FINE)) {
      logger.fine("VPFLayer.getRectangle() called with a projection (" + p + ") set in the layer, which isn't being handled.");
    }
    return new OMGraphicList();
  }
  LatLonPoint upperleft=(LatLonPoint)p.getUpperLeft();
  LatLonPoint lowerright=(LatLonPoint)p.getLowerRight();
  if (logger.isLoggable(Level.FINER)) {
    logger.finer("VPFLayer.getRectangle: " + coverageType);
  }
  warehouse.clear();
  if (logger.isLoggable(Level.FINE)) {
    logger.fine("calling draw with boundaries: " + upperleft + " "+ lowerright);
  }
  long start=System.currentTimeMillis();
  StringTokenizer t=new StringTokenizer(coverageType);
  while (t.hasMoreTokens()) {
    String currentCoverage=t.nextToken();
    if (searchByFeatures) {
      lst.drawFeatures((int)p.getScale(),p.getWidth(),p.getHeight(),currentCoverage,(VPFFeatureWarehouse)warehouse,upperleft,lowerright);
    }
 else {
      lst.drawTile((int)p.getScale(),p.getWidth(),p.getHeight(),currentCoverage,warehouse,upperleft,lowerright);
    }
  }
  long stop=System.currentTimeMillis();
  if (logger.isLoggable(Level.FINE)) {
    logger.fine("read time: " + ((stop - start) / 1000d) + " seconds");
  }
  OMGraphicList omglist=warehouse.getGraphics();
  start=System.currentTimeMillis();
  omglist.project(p);
  stop=System.currentTimeMillis();
  if (logger.isLoggable(Level.FINE)) {
    logger.fine("proj time: " + ((stop - start) / 1000d) + " seconds");
  }
  return omglist;
}

public synchronized OMGraphicList prepare ( ) { if ( lst == null ) { try { initLST ( ) ; } catch ( IllegalArgumentException iae ) { logger . warning ( "VPFLayer.prepare: Illegal Argument Exception.\n\nPerhaps a file not found.  Check to make sure that the paths to the VPF data directories are the parents of \"lat\" or \"lat.\" files. \n\n" + iae ) ; return null ; } if ( lst == null ) { if ( logger . isLoggable ( Level . FINE ) ) { logger . fine ( "VPFLayer| " + getName ( ) + " prepare(), Library Selection Table not set." ) ; } return null ; } } if ( warehouse == null ) { StringBuffer dpb = new StringBuffer ( ) ; if ( dataPaths != null ) { for ( int num = 0 ; num < dataPaths . length ; num ++ ) { if ( num > 0 ) { dpb . append ( ":" ) ; } dpb . append ( dataPaths [ num ] ) ; } } logger . warning ( "VPFLayer.getRectangle:  Data path probably wasn't set correctly (" + dpb . toString ( ) + ").  The warehouse not initialized." ) ; return null ; } Projection p = getProjection ( ) ; if ( p == null || ! ( p instanceof GeoProj ) ) { if ( logger . isLoggable ( Level . FINE ) ) { logger . fine ( "VPFLayer.getRectangle() called with a projection (" + p + ") set in the layer, which isn't being handled." ) ; } return new OMGraphicList ( ) ; } LatLonPoint upperleft = ( LatLonPoint ) p . getUpperLeft ( ) ; LatLonPoint lowerright = ( LatLonPoint ) p . getLowerRight ( ) ; if ( logger . isLoggable ( Level . FINER ) ) { logger . finer ( "VPFLayer.getRectangle: " + coverageType ) ; } warehouse . clear ( ) ; if ( logger . isLoggable ( Level . FINE ) ) { logger . fine ( "calling draw with boundaries: " + upperleft + " " + lowerright ) ; } long start = System . currentTimeMillis ( ) ; StringTokenizer t = new StringTokenizer ( coverageType ) ; while ( t . hasMoreTokens ( ) ) { String currentCoverage = t . nextToken ( ) ; if ( searchByFeatures ) { lst . drawFeatures ( ( int ) p . getScale ( ) , p . getWidth ( ) , p . getHeight ( ) , currentCoverage , ( VPFFeatureWarehouse ) warehouse , upperleft , lowerright ) ; } else { lst . drawTile ( ( int ) p . getScale ( ) , p . getWidth ( ) , p . getHeight ( ) , currentCoverage , warehouse , upperleft , lowerright ) ; } } long stop = System . currentTimeMillis ( ) ; if ( logger . isLoggable ( Level . FINE ) ) { logger . fine ( "read time: " + ( ( stop - start ) / 1000d ) + " seconds" ) ; } OMGraphicList omglist = warehouse . getGraphics ( ) ; start = System . currentTimeMillis ( ) ; omglist . project ( p ) ; stop = System . currentTimeMillis ( ) ; if ( logger . isLoggable ( Level . FINE ) ) { logger . fine ( "proj time: " + ( ( stop - start ) / 1000d ) + " seconds" ) ; } return omglist ; }
create the omgraphiclist to use on the map . omgraphichandler methods call this .
