@Override
    public void close() throws IOException {
      // on windows, truncating throws an exception if the file is still mapped
      ByteBufferUtil.free(buffer);
      channel.truncate(buffer.position());
      channel.close();
    }
Write features to the chunk file through a memory-mapped file.
planetiler-core/src/main/java/com/onthegomap/planetiler/collection/ExternalMergeSort.java