Fix GUI for embedded algorithm (properly show k and refpoints
implement function to write refPointDistances to CSV file as RTree