public float[] getElevation() throws IOException { float[] spArray = null; try { Variable sp = ds.findVariable("elevation"); Array spData = sp.read(); sp.setCachedData(spData, false); spArray = (float[]) spData.get1DJavaArray(float.class); } catch (IOException e) { e.printStackTrace(); } return spArray; }
public float[] getElevation() throws IOException { float[] spArray = null; try { Variable sp = ds.findVariable("elevation"); Array spData = sp.read(); sp.setCachedData(spData, false); spArray = (float[]) spData.get1DJavaArray(float.class); } catch (IOException e) { e.printStackTrace(); } return spArray; }
public float[] getAzimuth() throws IOException { Variable sp = ds.findVariable("azimuth"); Array spData = sp.read(); sp.setCachedData(spData, false); return (float[]) spData.get1DJavaArray(float.class); }
public float getRadialDistance(int gate) throws IOException { Array spData = null; try { Variable sp = ds.findVariable("gate"); spData = sp.read(); sp.setCachedData(spData, false); } catch (IOException e) { e.printStackTrace(); } Index index = spData.getIndex(); return spData.getFloat(index.set(gate)); }
public void writeRecord(PointObsDatatype pobs, StructureData sdata) throws IOException { if (debug) System.out.println("pobs= " + pobs); ucar.unidata.geoloc.EarthLocation loc = pobs.getLocation(); int count = writeCoordinates(loc.getLatitude(), loc.getLongitude(), loc.getAltitude(), pobs.getObservationTimeAsDate()); for (int i = count; i < recordVars.size(); i++) { Variable v = recordVars.get(i); if (debug) System.out.println(" var= " + v.getShortName()); //assert v.hasCachedData(); ?? v.setCachedData( sdata.getArray(v.getShortName()), false); } ncfileOut.writeRecordData(recordVars); }
public void writeRecord(PointObsDatatype pobs, StructureData sdata) throws IOException { if (debug) System.out.println("pobs= " + pobs); ucar.unidata.geoloc.EarthLocation loc = pobs.getLocation(); int count = writeCoordinates(loc.getLatitude(), loc.getLongitude(), loc.getAltitude(), pobs.getObservationTimeAsDate()); for (int i = count; i < recordVars.size(); i++) { Variable v = recordVars.get(i); if (debug) System.out.println(" var= " + v.getShortName()); //assert v.hasCachedData(); ?? v.setCachedData( sdata.getArray(v.getShortName()), false); } ncfileOut.writeRecordData(recordVars); }
public void writeRecord(PointFeature pf, StructureData sdata) throws IOException { if (debug) System.out.println("PointFeature= " + pf); EarthLocation loc = pf.getLocation(); int count = writeCoordinates(loc.getLatitude(), loc.getLongitude(), loc.getAltitude(), pf.getObservationTimeAsDate()); for (int i = count; i < recordVars.size(); i++) { Variable v = recordVars.get(i); v.setCachedData(sdata.getArray(v.getShortName()), false); } ncfileOut.writeRecordData(recordVars); }
public void writeRecord(PointFeature pf, StructureData sdata) throws IOException { if (debug) System.out.println("PointFeature= " + pf); EarthLocation loc = pf.getLocation(); int count = writeCoordinates(loc.getLatitude(), loc.getLongitude(), loc.getAltitude(), pf.getObservationTimeAsDate()); for (int i = count; i < recordVars.size(); i++) { Variable v = recordVars.get(i); v.setCachedData(sdata.getArray(v.getShortName()), false); } ncfileOut.writeRecordData(recordVars); }
public void writeRecord(PointFeature pf, StructureData sdata) throws IOException { if (debug) System.out.println("PointFeature= " + pf); EarthLocation loc = pf.getLocation(); int count = writeCoordinates(loc.getLatitude(), loc.getLongitude(), loc.getAltitude(), pf.getObservationTimeAsCalendarDate().toDate()); for (int i = count; i < recordVars.size(); i++) { Variable v = recordVars.get(i); v.setCachedData(sdata.getArray(v.getShortName()), false); } ncfileOut.writeRecordData(recordVars); }
public float getRadialDistance(int gate) throws IOException { Variable sp = ds.findVariable("gate"); Array spData = sp.read(); sp.setCachedData(spData, false); Index index = spData.getIndex(); return spData.getFloat(index.set(gate)); }
public float getAzimuth(int ray) throws IOException { Variable sp = ds.findVariable("azimuth"); Array spData = sp.read(); sp.setCachedData(spData, false); Index index = spData.getIndex(); return spData.getFloat(index.set(ray)); }
public float getT(String tName, int swpNumber, int ray) throws IOException { Variable tvar = ds.findVariable(tName); Array timeData = tvar.read(); tvar.setCachedData(timeData, false); Index timeIndex = timeData.getIndex(); return timeData.getFloat(timeIndex.set(swpNumber, ray)); }
private void makeCoordinateData(Variable elev, Variable azim, DoradeSweep mySweep) { Object ele = (Object) mySweep.getElevations(); Object azi = (Object) mySweep.getAzimuths(); Array elevData = Array.factory( elev.getDataType().getPrimitiveClassType(), elev.getShape(), ele); Array aziData = Array.factory( azim.getDataType().getPrimitiveClassType(), azim.getShape(), azi); elev.setCachedData( elevData, false); azim.setCachedData( aziData, false); }
public float getT(String tName, int swpNumber, int ray) throws IOException { Variable tvar = ds.findVariable(tName); Array timeData = tvar.read(); tvar.setCachedData(timeData, false); Index timeIndex = timeData.getIndex(); return timeData.getFloat(timeIndex.set(swpNumber, ray)); }
public float getTime(int ray) throws IOException { Variable sp = ds.findVariable("rays_time"); Array timeData = sp.read(); sp.setCachedData(timeData, false); Index index = timeData.getIndex(); return timeData.getFloat(index.set(ray)); }
public float getRadialDistance(int gate) throws IOException { Variable sp = ds.findVariable("gate"); Array spData = sp.read(); sp.setCachedData(spData, false); Index index = spData.getIndex(); return spData.getFloat(index.set(gate)); }
public float getTime(int ray) throws IOException { Variable sp = ds.findVariable("rays_time"); Array timeData = sp.read(); sp.setCachedData(timeData, false); Index index = timeData.getIndex(); return timeData.getFloat(index.set(ray)); }
public float getRadialDist(String dName, int gate) throws IOException { Variable dvar = ds.findVariable(dName); Array data = dvar.read(); dvar.setCachedData(data, false); Index index = data.getIndex(); return data.getFloat(index.set(gate)); }
public float getRadialDist(String dName, int gate) throws IOException { Variable dvar = ds.findVariable(dName); Array data = dvar.read(); dvar.setCachedData(data, false); Index index = data.getIndex(); return data.getFloat(index.set(gate)); }
public float getRadialDist(String dName, int gate) throws IOException { Variable dvar = ds.findVariable(dName); Array data = dvar.read(); dvar.setCachedData(data, false); Index index = data.getIndex(); return data.getFloat(index.set(gate)); }