lu-preprocessing.map

parse

(parse map-lines)
Parses positions of cell values.
Cells should contain only integer values.
   map-lines: A list of .asc file rows.
returns: A hash-map of cell values and their positions.

## Usage

   (require '[lu-preprocessing.map :refer :all])

   (parse ["ncols 5"
           "nrows 5"
           "xllcorner 1.0"
           "yllcorner 2.0"
           "cellsize 200.0"
           "NODATA_value -9999"
           "-9999 1 2 1 -9999"
           "0 0 0 0 0"
           "0 -9999 0 -9999 1"
           "1 1 -9999 2 -9999"
           "-9999 -9999 -9999 -9999 -9999"])
   => {0 {1 [0 1 2 3 4]
          2 [0 2]}
       1 {0 [1 3]
          2 [4]
          3 [0 1]}
       2 {0 [2]
          3 [3]}}