if (cnt % 100000 == 0)
System.out.print('\n');
}
if (verbose)
System.out.println("done");
FileSystemIndexStore store = new FileSystemIndexStore(file, order);
if(leafSize > 0) {
if (LOGGER.isLoggable(Level.FINE)) {
LOGGER.fine("Optimizing the tree (this might take some time)");
}
optimizeTree(tree, tree.getRoot(), 0, reader, shpIndex);
if (LOGGER.isLoggable(Level.FINE)) {
LOGGER.fine("Tree optimized");
}
}
if(LOGGER.isLoggable(Level.FINE)) {
printStats(tree);
}
store.store(tree);
} finally {
tree.close();
}
return cnt;
}