limit = seis.firstQuake(maxdate.getTime()+1);
}
for (; index < limit; index++) {
// match quake information against query constraints
Quake quake = quakes[index];
boolean match = true;
if (minlng != null) {
match = minlng.floatValue() <= quake.getLongitude();
}
if (match && maxlng != null) {
match = maxlng.floatValue() > quake.getLongitude();
}
if (match && minlat != null) {
match = minlat.floatValue() <= quake.getLatitude();
}
if (match && maxlat != null) {
match = maxlat.floatValue() > quake.getLatitude();
}
if (match && minmag != null) {
match = minmag.floatValue() <= quake.getMagnitude();
}
if (match && maxmag != null) {
match = maxmag.floatValue() > quake.getMagnitude();
}
if (match && mindepth != null) {
match = mindepth.floatValue() <= quake.getDepth();
}
if (match && maxdepth != null) {
match = maxdepth.floatValue() > quake.getDepth();
}
// check matched result
if (match) {
matches.add(quake);
int rcode = quake.getRegion().getRegionCode();
if (!rgnhits[rcode-1]) {
rgnhits[rcode-1] = true;
rgncnt++;
}
}