public LatLonPoint getLatLon() { if (llpt == null) llpt = new LatLonPointImpl( location.getLatitude(), location.getLongitude()); return llpt; }
public LatLonPoint getLatLon() { if (llpt == null) llpt = new LatLonPointImpl( location.getLatitude(), location.getLongitude()); return llpt; }
public LatLonPoint getLatLon() { if (llpt == null) llpt = new LatLonPointImpl(location.getLatitude(), location.getLongitude()); return llpt; }
protected void setBoundingBox() { LatLonRect bb; if (origin == null) return; double dLat = Math.toDegrees( getMaximumRadialDist() / Earth.getRadius()); double latRadians = Math.toRadians( origin.getLatitude()); double dLon = dLat * Math.cos(latRadians); double lat1 = origin.getLatitude() - dLat/2; double lon1 = origin.getLongitude() - dLon/2; bb = new LatLonRect( new LatLonPointImpl( lat1, lon1), dLat, dLon); boundingBox = bb; }
protected void setBoundingBox() { LatLonRect bb; if (origin == null) return; double dLat = Math.toDegrees( getMaximumRadialDist() / Earth.getRadius()); double latRadians = Math.toRadians( origin.getLatitude()); double dLon = dLat * Math.cos(latRadians); double lat1 = origin.getLatitude() - dLat/2; double lon1 = origin.getLongitude() - dLon/2; bb = new LatLonRect( new LatLonPointImpl( lat1, lon1), dLat, dLon); boundingBox = bb; }
public LatLonRect getBoundingBox() { if (bb != null) return bb; if (origin == null) return null; double dLat = Math.toDegrees( getMaximumRadial() / Earth.getRadius()); double latRadians = Math.toRadians( origin.getLatitude()); double dLon = dLat * Math.cos(latRadians); double lat1 = origin.getLatitude() - dLat/2; double lon1 = origin.getLongitude() - dLon/2; bb = new LatLonRect( new LatLonPointImpl( lat1, lon1), dLat, dLon); return bb; }
public LatLonRect getBoundingBox() { if (bb != null) return bb; if (origin == null) return null; double dLat = Math.toDegrees( getMaximumRadial() / Earth.getRadius()); double latRadians = Math.toRadians( origin.getLatitude()); double dLon = dLat * Math.cos(latRadians); double lat1 = origin.getLatitude() - dLat/2; double lon1 = origin.getLongitude() - dLon/2; bb = new LatLonRect( new LatLonPointImpl( lat1, lon1), dLat, dLon); return bb; }
public LatLonRect getBoundingBox() { if (bb != null) return bb; if (origin == null) return null; double dLat = Math.toDegrees( getMaximumRadial() / Earth.getRadius()); double latRadians = Math.toRadians( origin.getLatitude()); double dLon = dLat * Math.cos(latRadians); double lat1 = origin.getLatitude() - dLat/2; double lon1 = origin.getLongitude() - dLon/2; bb = new LatLonRect( new LatLonPointImpl( lat1, lon1), dLat, dLon); return bb; }
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 MyLocation(EarthLocation from) { this.lat = from.getLatitude(); this.lon = from.getLongitude(); this.alt = Double.isNaN(from.getAltitude()) ? 0.0 : from.getAltitude(); }
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 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(double timeCoordValue, CalendarDate obsDate, EarthLocation loc, StructureData sdata) throws IOException { trackBB(loc.getLatLon(), obsDate); StructureDataScalar coords = new StructureDataScalar("Coords"); coords.addMember(timeName, null, null, DataType.DOUBLE, false, timeCoordValue); 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(sdata); obsRecno = super.writeStructureData(obsRecno, record, sdall, dataMap); }
public void writeRecord(double timeCoordValue, CalendarDate obsDate, EarthLocation loc, StructureData sdata) throws IOException { trackBB(loc.getLatLon(), obsDate); StructureDataScalar coords = new StructureDataScalar("Coords"); coords.addMember(timeName, null, null, DataType.DOUBLE, timeCoordValue); 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(sdata); obsRecno = super.writeStructureData(obsRecno, record, sdall, dataMap); }