private void doRead() { Array data; try { data = read(); // if (!hasCachedData()) setCachedData(data, false); //cache data for subsequent reading } catch (IOException ioe) { log.error("Error reading coordinate values " + ioe); throw new IllegalStateException(ioe); } if (data.getRank() != 2) throw new IllegalArgumentException("must be 2D"); if (debug) System.out.printf("Coordinate2D read%n"); coords = (ArrayDouble.D2) Array.factory(DataType.DOUBLE, data.getShape(), data.get1DJavaArray(DataType.DOUBLE)); if (this.axisType == AxisType.Lon) makeConnectedLon(coords); }
private void doRead() { Array data; try { data = read(); // if (!hasCachedData()) setCachedData(data, false); //cache data for subsequent reading } catch (IOException ioe) { log.error("Error reading coordinate values " + ioe); throw new IllegalStateException(ioe); } if (data.getRank() != 2) throw new IllegalArgumentException("must be 2D"); if (debug) System.out.printf("Coordinate2D read%n"); coords = (ArrayDouble.D2) Array.factory(double.class, data.getShape(), data.get1DJavaArray(double.class)); if (this.axisType == AxisType.Lon) makeConnectedLon(coords); }
private void doRead() { Array data; try { data = read(); // if (!hasCachedData()) setCachedData(data, false); //cache data for subsequent reading } catch (IOException ioe) { log.error("Error reading coordinate values " + ioe); throw new IllegalStateException(ioe); } data = data.reduce(); if (data.getRank() != 2) throw new IllegalArgumentException("must be 2D"); if (debug) System.out.printf("Coordinate2D read%n"); midpoint = (ArrayDouble.D2) Array.factory(double.class, data.getShape(), data.get1DJavaArray( double.class) ); if (this.axisType == AxisType.Lon) makeConnectedLon(midpoint); }