def coord_values(s)
      coords = s.split(/ *, */)
      return [nil, nil] if coords.size != 2
      coords.map! { |c| c.to_f.to_s == c ? c : nil }   # must be decimal ...
      return [nil, nil] unless coords[0] && coords[1]  # ... i.e. not nil
      [coords[0], coords[1]]
    end
def coord_values(s)
      coords = s.split(/ *, */)
      return [nil, nil] if coords.size != 2
      coords.map! { |c| c.to_f.to_s == c ? c : nil }   # must be decimal ...
      return [nil, nil] unless coords[0] && coords[1]  # ... i.e. not nil
      [coords[0], coords[1]]
    end
Given a String `s', return an array of two elements split on a comma
 and any whitespace around the comma.

 If the string does not split into two strings representing decimal
 values, then return [nil, nil] because the string does not make sense as
 coordinates.

 @param s [String]  String of, hopefully, comma-separated decimals

 @return [Array]