mindist.out [-Fcfile] [-Sscale] [-Xdoloop] [-Ydoloop] [-Zzmin] [file [file ...]]

 cfile contains longitude and latitude in columns 1 and 2.

 mindist.out computes  z := min(zmin, distance/scale)  where distance is between
 the positions in the cfile and the positions xdo,ydo computed in the (nested)
 do loops. Result is printed to STDOUT:
 xdo ydo z

 As an alternative to loops, files can be input. Longitude and latitude
 are assumed in the first two columns.
 Specify ` for STDIN. The file(s) will be copied to STDOUT with z
 optionally added to the record.

 -Xfrom,to,step and -Yfrom,to,step  (code without blanks!)
             default = [-X5.0,35.0,2.0] [-Y52.0,72.0,1.0]

 -Sscale   - specifies distance scale (degrees) [-S3.0]

 -Fcfile   - default = [STDIN]

 -Zzmin    - default = [1.0]

 -Ccmin    - Cut; (in file processing): print only when z is smaller than cmin.
             default = large

 -P        - print the distance value z in the output.

(1)  Weed out far away points
   cat swepos-labels.dat | mindist.out -Fcore-labels.dat -C0.5 -

   Add the distance parameter in the last column

   cat swepos-labels.dat | mindist.out -Fcore-labels.dat -C0.5 -P -

(2) Make grid, minimum distance to swepos points using default loop definitions

   cat ~/gps/maps/swepos-labels.dat | mindist.out -X