values.setDocument(docId);
final int valuesCount = values.count();
for (int i = 0; i < valuesCount; ++i) {
GeoPoint value = values.valueAt(i);
double top = tops.get(owningBucketOrdinal);
if (value.lat() > top) {
top = value.lat();
}
double bottom = bottoms.get(owningBucketOrdinal);
if (value.lat() < bottom) {
bottom = value.lat();
}
double posLeft = posLefts.get(owningBucketOrdinal);
if (value.lon() > 0 && value.lon() < posLeft) {
posLeft = value.lon();
}
double posRight = posRights.get(owningBucketOrdinal);
if (value.lon() > 0 && value.lon() > posRight) {
posRight = value.lon();
}
double negLeft = negLefts.get(owningBucketOrdinal);
if (value.lon() < 0 && value.lon() < negLeft) {
negLeft = value.lon();
}
double negRight = negRights.get(owningBucketOrdinal);
if (value.lon() < 0 && value.lon() > negRight) {
negRight = value.lon();
}
tops.set(owningBucketOrdinal, top);
bottoms.set(owningBucketOrdinal, bottom);
posLefts.set(owningBucketOrdinal, posLeft);
posRights.set(owningBucketOrdinal, posRight);