/** * _more_ * * @param point _more_ * * @return _more_ * * @throws IOException _more_ * @throws InvalidRangeException _more_ */ public StructureData getData(int point) throws IOException, InvalidRangeException { return TrajectoryObsDatasetImpl.this.recordVar.readStructure(point); }
/** * _more_ * * @param point _more_ * * @return _more_ * * @throws IOException _more_ * @throws InvalidRangeException _more_ */ public StructureData getData(int point) throws IOException, InvalidRangeException { return TrajectoryObsDatasetImpl.this.recordVar.readStructure(point); }
/** * _more_ * * @param point _more_ * * @return _more_ * * @throws IOException _more_ * @throws InvalidRangeException _more_ */ public StructureData getData(int point) throws IOException, InvalidRangeException { return TrajectoryObsDatasetImpl.this.recordVar.readStructure(point); }
private void readNext() throws IOException { int left = Math.min(recnum, readStart+readAtaTime); // dont go over recnum int need = left - readStart; // how many to read this time try { // System.out.println(" read start= "+readStart+" count= "+need); as = readStructure( readStart, need); if (NetcdfFile.debugStructureIterator) System.out.println("readNext "+count+" "+readStart); } catch (InvalidRangeException e) { log.error("Structure.IteratorRank1.readNext() ",e); throw new IllegalStateException("Structure.Iterator.readNext() ",e); } // cant happen readStart += need; readCount = 0; }
@Override public StructureData next() throws IOException { StructureData sdata; currRecord = indexIter.next(); try { sdata = s.readStructure( currRecord); } catch (ucar.ma2.InvalidRangeException e) { log.error("StructureDataIteratorIndexed.nextStructureData recno=" + currRecord, e); throw new IOException(e.getMessage()); } return sdata; }
@Override public StructureData next() throws IOException { StructureData sdata; currRecord = indexIter.next(); try { sdata = s.readStructure( currRecord); } catch (ucar.ma2.InvalidRangeException e) { log.error("StructureDataIteratorIndexed.nextStructureData recno=" + currRecord, e); throw new IOException(e.getMessage()); } return sdata; }
@Override public StructureData next() throws IOException { StructureData sdata; currRecord = indexIter.next(); try { sdata = s.readStructure(currRecord); } catch (ucar.ma2.InvalidRangeException e) { log.error("StructureDataIteratorIndexed.nextStructureData recno=" + currRecord, e); throw new IOException(e.getMessage()); } return sdata; }
public Array getData( int point, String parameterName ) throws IOException { try { return( getData( this.getPointRange( point), parameterName)); } catch ( InvalidRangeException e ) { IllegalArgumentException iae = new IllegalArgumentException( "Point <" + point + "> not in valid range <0, " + (this.getNumberPoints()-1) + ">: " + e.getMessage()); iae.initCause( e); throw iae; } }
public Array getData( int point, String parameterName ) throws IOException { try { return( getData( this.getPointRange( point), parameterName)); } catch ( InvalidRangeException e ) { IllegalArgumentException iae = new IllegalArgumentException( "Point <" + point + "> not in valid range <0, " + (this.getNumberPoints()-1) + ">: " + e.getMessage()); iae.initCause( e); throw iae; } }
public Array getData( int point, String parameterName ) throws IOException { try { return( getData( this.getPointRange( point), parameterName)); } catch ( InvalidRangeException e ) { IllegalArgumentException iae = new IllegalArgumentException( "Point <" + point + "> not in valid range <0, " + (this.getNumberPoints()-1) + ">: " + e.getMessage()); iae.initCause( e); throw iae; } }
public Array getData( int point, String parameterName ) throws IOException { try { return( getData( this.getPointRange( point), parameterName)); } catch ( InvalidRangeException e ) { IllegalArgumentException iae = new IllegalArgumentException( "Point <" + point + "> not in valid range <0, " + (this.getNumberPoints()-1) + ">: " + e.getMessage()); iae.initCause( e); throw iae; } }
public Array getData( int point, String parameterName ) throws IOException { try { return( getData( this.getPointRange( point), parameterName)); } catch ( InvalidRangeException e ) { IllegalArgumentException iae = new IllegalArgumentException( "Point <" + point + "> not in valid range <0, " + (this.getNumberPoints()-1) + ">: " + e.getMessage()); iae.initCause( e); throw iae; } }
public Array getData( int point, String parameterName ) throws IOException { try { return( getData( this.getPointRange( point), parameterName)); } catch ( InvalidRangeException e ) { IllegalArgumentException iae = new IllegalArgumentException( "Point <" + point + "> not in valid range <0, " + (this.getNumberPoints()-1) + ">: " + e.getMessage()); iae.initCause( e); throw iae; } }
protected StationObsDatatype makeObs(int recno) throws IOException { try { StructureData sdata = recordVar.readStructure(recno); int stationIndex = sdata.getScalarInt("station_index"); ucar.unidata.geoloc.Station station = (ucar.unidata.geoloc.Station) stations.get(stationIndex); if (station == null) parseInfo.append("cant find station at index = "+stationIndex+"\n"); float obsTime = sdata.convertScalarFloat("time_observation"); float nomTime = sdata.convertScalarFloat("time_nominal"); return recordHelper.new RecordStationObs( station, obsTime, nomTime, recno); } catch (ucar.ma2.InvalidRangeException e) { e.printStackTrace(); throw new IOException( e.getMessage()); } }
protected StationObsDatatype makeObs(int recno) throws IOException { try { StructureData sdata = recordVar.readStructure(recno); String stationId = sdata.getScalarString(stnIdVName); ucar.unidata.geoloc.Station s = recordHelper.stnHash.get(stationId); float obsTime = sdata.convertScalarFloat(obsTimeVName); float nomTime = (nomTimeVName == null) ? obsTime : sdata.convertScalarFloat(nomTimeVName); return recordHelper.new RecordStationObs( s, obsTime, nomTime, recno); } catch (ucar.ma2.InvalidRangeException e) { e.printStackTrace(); throw new IOException( e.getMessage()); } }
protected StationObsDatatype makeObs(int recno) throws IOException { try { StructureData sdata = recordVar.readStructure(recno); String stationId = sdata.getScalarString(stnIdVName); ucar.unidata.geoloc.Station s = recordHelper.stnHash.get(stationId); float obsTime = sdata.convertScalarFloat(obsTimeVName); float nomTime = (nomTimeVName == null) ? obsTime : sdata.convertScalarFloat(nomTimeVName); return recordHelper.new RecordStationObs( s, obsTime, nomTime, recno); } catch (ucar.ma2.InvalidRangeException e) { e.printStackTrace(); throw new IOException( e.getMessage()); } }
protected StationObsDatatype makeObs(int recno) throws IOException { try { StructureData sdata = recordVar.readStructure(recno); String stationId = sdata.getScalarString(stnIdVName); ucar.unidata.geoloc.Station s = recordHelper.stnHash.get(stationId); float obsTime = sdata.convertScalarFloat(obsTimeVName); float nomTime = (nomTimeVName == null) ? obsTime : sdata.convertScalarFloat(nomTimeVName); return recordHelper.new RecordStationObs( s, obsTime, nomTime, recno); } catch (ucar.ma2.InvalidRangeException e) { e.printStackTrace(); throw new IOException( e.getMessage()); } }
protected PointObsDatatype makeObs(int recno) throws IOException { try { StructureData sdata = recordVar.readStructure(recno); float obsTime = sdata.convertScalarFloat(obsTimeVName); float nomTime = (nomTimeVName == null) ? obsTime : sdata.convertScalarFloat(nomTimeVName); float lat = sdata.convertScalarFloat("latitude"); float lon = sdata.convertScalarFloat("longitude"); float alt = sdata.convertScalarFloat(altVName); return recordHelper.new RecordPointObs( new ucar.unidata.geoloc.EarthLocationImpl(lat, lon, alt), obsTime, nomTime, recno); } catch (ucar.ma2.InvalidRangeException e) { e.printStackTrace(); throw new IOException( e.getMessage()); } }
protected PointObsDatatype makeObs(int recno) throws IOException { try { StructureData sdata = recordVar.readStructure(recno); float obsTime = sdata.convertScalarFloat(obsTimeVName); float nomTime = (nomTimeVName == null) ? obsTime : sdata.convertScalarFloat(nomTimeVName); float lat = sdata.convertScalarFloat("latitude"); float lon = sdata.convertScalarFloat("longitude"); float alt = sdata.convertScalarFloat(altVName); return recordHelper.new RecordPointObs( new ucar.unidata.geoloc.EarthLocationImpl(lat, lon, alt), obsTime, nomTime, recno); } catch (ucar.ma2.InvalidRangeException e) { e.printStackTrace(); throw new IOException( e.getMessage()); } }
@org.junit.Test public void testStructureRead() throws IOException { DODSNetcdfFile dodsfile = TestDODSRead.open("test.04"); Variable v = null; Array a = null; assert null != (v = dodsfile.findVariable("types")); assert v instanceof Structure; Structure s = (Structure) v; StructureData sdata = s.readStructure(); checkSD( sdata); }