protected void calcBounds(PointFeature pf) { count++; if (!calcBounds) return; if (pf == null) return; if (bb == null) bb = new LatLonRect(pf.getLocation().getLatLon(), .001, .001); else bb.extend(pf.getLocation().getLatLon()); double obsTime = pf.getObservationTime(); minTime = Math.min(minTime, obsTime); maxTime = Math.max(maxTime, obsTime); }
protected void calcBounds(PointFeature pf) { count++; if (!calcBounds) return; if (pf == null) return; if (bb == null) bb = new LatLonRect(pf.getLocation().getLatLon(), .001, .001); else bb.extend(pf.getLocation().getLatLon()); double obsTime = pf.getObservationTime(); minTime = Math.min(minTime, obsTime); maxTime = Math.max(maxTime, obsTime); }
private boolean filter(PointFeature pdata) { if ((filter_date != null) && !filter_date.includes(pdata.getObservationTimeAsCalendarDate())) return false; if ((filter_bb != null) && !filter_bb.contains(pdata.getLocation().getLatitude(), pdata.getLocation().getLongitude())) return false; return true; }
@Override public boolean filter(PointFeature pointFeat) { if ((filter_date != null) && !filter_date.includes(pointFeat.getObservationTimeAsCalendarDate())) return false; if ((filter_bb != null) && !filter_bb.contains(pointFeat.getLocation().getLatitude(), pointFeat.getLocation().getLongitude())) return false; return true; } }
public boolean filter(PointFeature pdata) { if ((filter_date != null) && !filter_date.includes(pdata.getObservationTimeAsCalendarDate())) return false; if ((filter_bb != null) && !filter_bb.contains(pdata.getLocation().getLatitude(), pdata.getLocation().getLongitude())) return false; return true; }
public boolean filter(PointFeature pdata) { if ((filter_date != null) && !filter_date.includes(pdata.getObservationTimeAsCalendarDate())) return false; if ((filter_bb != null) && !filter_bb.contains(pdata.getLocation().getLatitude(), pdata.getLocation().getLongitude())) return false; return true; }
private boolean filter(PointFeature pdata) { if ((filter_date != null) && !filter_date.includes(pdata.getObservationTimeAsCalendarDate())) return false; if ((filter_bb != null) && !filter_bb.contains(pdata.getLocation().getLatitude(), pdata.getLocation().getLongitude())) return false; return true; }
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); }
PointFeatureCopy(PointFeature pf) { super(pf.getFeatureCollection(), pf.getLocation(), pf.getObservationTime(), pf.getNominalTime(), pf.getFeatureCollection().getTimeUnit()); }
public void writeObsData(PointFeature pf) throws IOException { StructureDataScalar coords = new StructureDataScalar("Coords"); coords.addMember(altitudeCoordinateName, null, null, DataType.DOUBLE, false, pf.getLocation().getAltitude()); StructureDataComposite sdall = new StructureDataComposite(); sdall.add(coords); // coords first so it takes precedence sdall.add(pf.getFeatureData()); obsRecno = super.writeStructureData(obsRecno, record, sdall, dataMap); }
public void writeObsData(PointFeature pf) throws IOException { StructureDataScalar coords = new StructureDataScalar("Coords"); if (useAlt) coords.addMember(altitudeCoordinateName, null, null, DataType.DOUBLE, false, pf.getLocation().getAltitude()); StructureDataComposite sdall = new StructureDataComposite(); sdall.add(coords); // coords first so it takes precedence sdall.add(pf.getFeatureData()); obsRecno = super.writeStructureData(obsRecno, record, sdall, dataMap); }
public void writeObsData(PointFeature pf) throws IOException { StructureDataScalar coords = new StructureDataScalar("Coords"); coords.addMember(altitudeCoordinateName, null, null, DataType.DOUBLE, pf.getLocation().getAltitude()); StructureDataComposite sdall = new StructureDataComposite(); sdall.add(coords); // coords first so it takes precedence sdall.add(pf.getFeatureData()); obsRecno = super.writeStructureData(obsRecno, record, sdall, dataMap); }
public void writeObsData(PointFeature pf) throws IOException { StructureDataScalar coords = new StructureDataScalar("Coords"); if (useAlt) coords.addMember(altitudeCoordinateName, null, null, DataType.DOUBLE, false, pf.getLocation().getAltitude()); StructureDataComposite sdall = new StructureDataComposite(); sdall.add(coords); // coords first so it takes precedence sdall.add(pf.getFeatureData()); obsRecno = super.writeStructureData(obsRecno, record, sdall, dataMap); }
public void writeObsData(PointFeature pf) throws IOException { StructureDataScalar coords = new StructureDataScalar("Coords"); if (useAlt) coords.addMember(altitudeCoordinateName, null, null, DataType.DOUBLE, pf.getLocation().getAltitude()); StructureDataComposite sdall = new StructureDataComposite(); sdall.add(coords); // coords first so it takes precedence sdall.add(pf.getFeatureData()); obsRecno = super.writeStructureData(obsRecno, record, sdall, dataMap); }
public void writeObsData(PointFeature pf) throws IOException { StructureDataScalar coords = new StructureDataScalar("Coords"); if (useAlt) coords.addMember(altitudeCoordinateName, null, null, DataType.DOUBLE, pf.getLocation().getAltitude()); StructureDataComposite sdall = new StructureDataComposite(); sdall.add(coords); // coords first so it takes precedence sdall.add(pf.getFeatureData()); obsRecno = super.writeStructureData(obsRecno, record, sdall, dataMap); }
public void writeObsData(PointFeature pf) throws IOException { EarthLocation loc = pf.getLocation(); trackBB(loc.getLatLon(), timeUnit.makeCalendarDate(pf.getObservationTime())); StructureDataScalar coords = new StructureDataScalar("Coords"); coords.addMember(timeName, null, null, DataType.DOUBLE, false, pf.getObservationTime()); coords.addMember(latName, null, null, DataType.DOUBLE, false, loc.getLatitude()); coords.addMember(lonName, null, null, DataType.DOUBLE, false, loc.getLongitude()); if (altUnits != null) coords.addMember(altName, null, null, DataType.DOUBLE, false, loc.getAltitude()); StructureDataComposite sdall = new StructureDataComposite(); sdall.add(coords); // coords first so it takes precedence sdall.add(pf.getFeatureData()); obsRecno = super.writeStructureData(obsRecno, record, sdall, dataMap); }
public void writeObsData(PointFeature pf) throws IOException { EarthLocation loc = pf.getLocation(); trackBB(loc.getLatLon(), timeUnit.makeCalendarDate(pf.getObservationTime())); StructureDataScalar coords = new StructureDataScalar("Coords"); coords.addMember(timeName, null, null, DataType.DOUBLE, pf.getObservationTime()); coords.addMember(latName, null, null, DataType.DOUBLE, loc.getLatitude()); coords.addMember(lonName, null, null, DataType.DOUBLE, loc.getLongitude()); if (altUnits != null) coords.addMember(altName, null, null, DataType.DOUBLE, loc.getAltitude()); StructureDataComposite sdall = new StructureDataComposite(); sdall.add(coords); // coords first so it takes precedence sdall.add(pf.getFeatureData()); obsRecno = super.writeStructureData(obsRecno, record, sdall, dataMap); }
static private void checkPointFeature(PointFeature pobs, CalendarDateUnit timeUnit) throws java.io.IOException { Assert.assertNotNull("PointFeature location", pobs.getLocation()); Assert.assertNotNull("PointFeature time", pobs.getNominalTimeAsCalendarDate()); Assert.assertNotNull("PointFeature dataAll", pobs.getDataAll()); Assert.assertNotNull("PointFeature featureData", pobs.getFeatureData()); Assert.assertEquals("PointFeature makeCalendarDate", timeUnit.makeCalendarDate(pobs.getObservationTime()), pobs.getObservationTimeAsCalendarDate()); assert timeUnit.makeCalendarDate(pobs.getObservationTime()).equals(pobs.getObservationTimeAsCalendarDate()); checkData( pobs.getDataAll()); }