Debug.error("VPFLayer.getRectangle: Data path probably wasn't set correctly ("
+ dpb.toString() + "). The warehouse not initialized.");
return null;
}
Projection p = getProjection();
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();
}
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);
}