//int pZone = p.getZone();
int i, x, y;
double frameLatInterval = Double.MAX_VALUE;
double frameLonInterval = Double.MAX_VALUE;
RpfCoverageBox rcb;
for (i = 0; i < size; i++) {
rcb = (RpfCoverageBox) results.elementAt(i);
if (rcb.subframeLatInterval < frameLatInterval) {
frameLatInterval = rcb.subframeLatInterval;
}
if (rcb.subframeLonInterval < frameLonInterval) {
frameLonInterval = rcb.subframeLonInterval;
}
}
if (frameLatInterval == Double.MAX_VALUE
|| frameLonInterval == Double.MAX_VALUE) {
return 0.0f;
}
int numHFrames = (int) Math.ceil((lrlon - ullon) / frameLonInterval);
int numVFrames = (int) Math.ceil((ullat - lrlat) / frameLatInterval);
boolean[][] coverage = new boolean[numHFrames][numVFrames];
for (i = 0; i < size; i++) {
rcb = (RpfCoverageBox) results.elementAt(i);
if (rcb.percentCoverage == 100) {
return 1.0f;
}
for (y = 0; y < numVFrames; y++) {
for (x = 0; x < numHFrames; x++) {
// degree location of indexs
float yFrameLoc = (float) (lrlat + (y * frameLatInterval));
float xFrameLoc = (float) (ullon + (x * frameLonInterval));
if (coverage[x][y] == false) {
if (rcb.within(yFrameLoc, xFrameLoc)) {
coverage[x][y] = true;
}
}
}
}