ui/src/main/java/ucar/nc2/ui/gis/shapefile/DbaseFile.java
public double[] getDoublesByName(String Name) {
    DbaseData d;
    if ((d = getField(Name)) == null) return null;
    if (d.getType() == DbaseData.TYPE_CHAR) {
      String[] s = d.getStrings();
      double[] dd = new double[s.length];
      for (int i = 0; i < s.length; i++) {
        dd[i] = Double.valueOf(s[i]);
      }
      return dd;
    }
    if (d.getType() == DbaseData.TYPE_BOOLEAN) {
      boolean[] b = d.getBooleans();
      double[] dd = new double[b.length];
      for (int i = 0; i < b.length; i++) {
        if (b[i]) {
          dd[i] = 1;
        } else {
          dd[i] = 0;
        }
      }
      return dd;

    }
    return d.getDoubles();
  }
public double[] getDoublesByName(String Name) {
    DbaseData d;
    if ((d = getField(Name)) == null) return null;
    if (d.getType() == DbaseData.TYPE_CHAR) {
      String[] s = d.getStrings();
      double[] dd = new double[s.length];
      for (int i = 0; i < s.length; i++) {
        dd[i] = Double.valueOf(s[i]);
      }
      return dd;
    }
    if (d.getType() == DbaseData.TYPE_BOOLEAN) {
      boolean[] b = d.getBooleans();
      double[] dd = new double[b.length];
      for (int i = 0; i < b.length; i++) {
        if (b[i]) {
          dd[i] = 1;
        } else {
          dd[i] = 0;
        }
      }
      return dd;

    }
    return d.getDoubles();
  }
public double [ ] getDoublesByName ( String Name ) { DbaseData d ; if ( ( d = getField ( Name ) ) == null ) return null ; if ( d . getType ( ) == DbaseData . TYPE_CHAR ) { String [ ] s = d . getStrings ( ) ; double [ ] dd = new double [ s . length ] ; for ( int i = 0 ; i < s . length ; i ++ ) { dd [ i ] = Double . valueOf ( s [ i ] ) ; } return dd ; } if ( d . getType ( ) == DbaseData . TYPE_BOOLEAN ) { boolean [ ] b = d . getBooleans ( ) ; double [ ] dd = new double [ b . length ] ; for ( int i = 0 ; i < b . length ; i ++ ) { if ( b [ i ] ) { dd [ i ] = 1 ; } else { dd [ i ] = 0 ; } } return dd ; } return d . getDoubles ( ) ; }
Extract the double array of data for a field by Name.

@param Name String with the name of the field to retrieve
@return A double[] if valid numeric field, otherwise null
Extract the double array of data for a field by Name .