if (p == null) { Debug.error("VPFLayer.getRectangle() called without a projection set in the layer. Make sure a projection is set in the layer before calling getRectangle."); return new OMGraphicList(); }
    public OMGraphicList prepare() {        if (lst == null) {	    try {		initLST();	    } catch (IllegalArgumentException iae){		Debug.error("VPFLayer.getRectangle: 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 (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]);		}	    }	    Debug.error("VPFLayer.getRectangle:  Data path probably wasn't set correctly (" + 			dpb.toString() + ").  The warehouse not initialized.");	    return null;	}	Projection p = getProjection();	LatLonPoint upperleft = p.getUpperLeft();	LatLonPoint lowerright = p.getLowerRight();	if (Debug.debugging("vpfdetail")){	    Debug.output("VPFLayer.getRectangle: " + 			 coverageType /* + " " + dynamicArgs*/);	}	warehouse.clear();// 	int edgecount[] = new int[] { 0 , 0 };// 	int textcount[] = new int[] { 0 , 0 };// 	int areacount[] = new int[] { 0 , 0 };	// Check both dynamic args and palette values when	// deciding what to draw. 	if (Debug.debugging("vpf")) {	    Debug.output("VPFLayer.getRectangle(): "			 + "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 (Debug.debugging("vpfdetail")) {//  	    Debug.output("Returned " + edgecount[0] +//  			 " polys with " + edgecount[1] + " points\n" +//  			 "Returned " + textcount[0] +//  			 " texts with " + textcount[1] + " points\n" +//  			 "Returned " + areacount[0] +//  			 " areas with " + areacount[1] + " points");//  	} 	if (Debug.debugging("vpf")) {	    Debug.output("VPFLayer.getRectangle(): read time: " +			 ((stop-start)/1000d) + " seconds");	}	OMGraphicList omglist = warehouse.getGraphics();	// Don't forget to project.	start = System.currentTimeMillis();	omglist.project(p);	stop = System.currentTimeMillis(); 	if (Debug.debugging("vpf")) {	    Debug.output("VPFLayer.getRectangle(): proj time: "			 + ((stop-start)/1000d) + " seconds");	}	return omglist;    }