public DocsSortedByDocId getBlock(GeoSegmentReader<CartesianGeoRecord> geoSegmentReader, IDeletedDocs deletedDocsWithinSegment,
int minX, int maxX, int minY, int maxY, int minZ, int maxZ, int mindocid, int maxdocid)
throws IOException {
CartesianCoordinateDocId minccd = new CartesianCoordinateDocId(minX, minY, minZ, mindocid);
CartesianGeoRecord minValue = geoConverter.toCartesianGeoRecord(minccd, CartesianGeoRecord.DEFAULT_FILTER_BYTE);
CartesianCoordinateDocId maxccd = new CartesianCoordinateDocId(maxX, maxY, maxZ, maxdocid);
CartesianGeoRecord maxValue = geoConverter.toCartesianGeoRecord(maxccd, CartesianGeoRecord.DEFAULT_FILTER_BYTE);
Iterator<CartesianGeoRecord> iterator = geoSegmentReader.getIterator(minValue, maxValue);
DocsSortedByDocId docs = new DocsSortedByDocId();
while (iterator.hasNext()) {
CartesianGeoRecord geoRecord = iterator.next();
CartesianCoordinateDocId ccd = geoConverter.toCartesianCoordinateDocId(geoRecord);
if(minX <= ccd.x && ccd.x <= maxX && minY <= ccd.y && ccd.y <= maxY && minZ <= ccd.z && ccd.z <= maxZ && mindocid <= ccd.docid && ccd.docid <= maxdocid) {
GeRecordAndCartesianDocId both = new GeRecordAndCartesianDocId(geoRecord, ccd);
docs.add(ccd.docid, both);
}