Added functionality to write coordinates to index.