   (map-indexed vector row))
 
 (defn ascii-source [path]
-  "create a source out of a pre-cleaned ASCII grid, which is associated with a
-  map of characteristic values, such as resolution and extent.  The cleaned
-  grid is located at `path` and has the row index values prepended on the rows,
-  with the ASCII prelude (which is automatically added by Arc) already stripped
-  and cataloged in the map of characteristic values."
+  "create a source out of a pre-cleaned ASCII grid, which is
+  associated with a map of characteristic values, such as resolution
+  and extent.  The cleaned grid is located at `path` and has the row
+  index values prepended on the rows, with the ASCII prelude (which is
+  automatically added by Arc) already stripped and cataloged in the
+  map of characteristic values."
   (let [source (hfs-textline path)]
     (<- [?row ?col ?val]
         (source ?line)

;; grid.

(defn travel
  "travel along a grid with cellsize `step` in the direction
  given by `dir` from an initial position `start` to a position
  `pos` which is intended to be, for most applications, row or
  column within the grid.  Note that this takes you to the
  centroid of the row or column position that you specify."
  [step dir start pos]
  (-> start (dir (* pos step)) (dir (/ step 2))))



(defn index-textfile
  "Prepend a row index to a text file `old-file-name`, located at `base-path`,
  and save in the same directory with new name `new-file-name`. The
  `num-drop` parameter specifies the number of lines to drop from the
  beginning of the text file.  Note that indexing begins with the
  first textline not dropped, and starts at 0. This function was
  originally written to clean an ASCII raster file for input into the
  sampling functions."
  [base-path old-file-name new-file-name num-drop]
  (let [old-file (str base-path old-file-name)
        new-file (str base-path new-file-name)]
