public StationTimeSeriesFeatureImpl(Station s, DateUnit timeUnit, String altUnits, int npts) { super(s.getName(), timeUnit, altUnits); this.s = s; this.npts = npts; setBoundingBox( new LatLonRect(s.getLatLon(), .0001, .0001)); }
public LatLonRect getBoundingBox() { return isGlobal ? new LatLonRect() : new LatLonRect(new LatLonPointImpl(getLatStart(), getLonStart()), getLatExtent(), getLonExtent()); } }
public StationFeatureImpl(Station s, DateUnit timeUnit, int npts) { super(s.getName()); this.s = s; this.timeUnit = timeUnit; this.npts = npts; setBoundingBox( new LatLonRect(s.getLatLon(), .0001, .0001)); }
protected void trackBB(LatLonPoint loc, CalendarDate obsDate) { if (loc != null) { if (llbb == null) { llbb = new LatLonRect(loc, .001, .001); return; } llbb.extend(loc); } // date is handled specially if ((minDate == null) || minDate.isAfter(obsDate)) minDate = obsDate; if ((maxDate == null) || maxDate.isBefore(obsDate)) maxDate = obsDate; }
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 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 LatLonRect getBoundingBox(List stnList) { ucar.unidata.geoloc.Station s = (ucar.unidata.geoloc.Station) stnList.get(0); LatLonPointImpl llpt = new LatLonPointImpl(); llpt.set(s.getLatitude(), s.getLongitude()); LatLonRect rect = new LatLonRect(llpt, .001, .001); for (int i = 1; i < stnList.size(); i++) { s = (ucar.unidata.geoloc.Station) stnList.get(i); llpt.set(s.getLatitude(), s.getLongitude()); rect.extend(llpt); } return rect; }
private LatLonRect getBoundingBox(List stnList) { ucar.unidata.geoloc.Station s = (ucar.unidata.geoloc.Station) stnList.get(0); LatLonPointImpl llpt = new LatLonPointImpl(); llpt.set(s.getLatitude(), s.getLongitude()); LatLonRect rect = new LatLonRect(llpt, .001, .001); for (int i = 1; i < stnList.size(); i++) { s = (ucar.unidata.geoloc.Station) stnList.get(i); llpt.set(s.getLatitude(), s.getLongitude()); rect.extend(llpt); } return rect; }
private LatLonRect getBoundingBox(List stnList) { ucar.unidata.geoloc.Station s = (ucar.unidata.geoloc.Station) stnList.get(0); LatLonPointImpl llpt = new LatLonPointImpl(); llpt.set(s.getLatitude(), s.getLongitude()); LatLonRect rect = new LatLonRect(llpt, .001, .001); for (int i = 1; i < stnList.size(); i++) { s = (ucar.unidata.geoloc.Station) stnList.get(i); llpt.set(s.getLatitude(), s.getLongitude()); rect.extend(llpt); } return rect; }
private LatLonRect getBoundingBox(List stnList) { ucar.unidata.geoloc.Station s = (ucar.unidata.geoloc.Station) stnList.get(0); LatLonPointImpl llpt = new LatLonPointImpl(); llpt.set(s.getLatitude(), s.getLongitude()); LatLonRect rect = new LatLonRect(llpt, .001, .001); for (int i = 1; i < stnList.size(); i++) { s = (ucar.unidata.geoloc.Station) stnList.get(i); llpt.set(s.getLatitude(), s.getLongitude()); rect.extend(llpt); } return rect; }
private LatLonRect getBoundingBox(List stnList) { ucar.unidata.geoloc.Station s = (ucar.unidata.geoloc.Station) stnList.get(0); LatLonPointImpl llpt = new LatLonPointImpl(); llpt.set(s.getLatitude(), s.getLongitude()); LatLonRect rect = new LatLonRect(llpt, .001, .001); for (int i = 1; i < stnList.size(); i++) { s = (ucar.unidata.geoloc.Station) stnList.get(i); llpt.set(s.getLatitude(), s.getLongitude()); rect.extend(llpt); } return rect; }
private LatLonRect getBoundingBox(List stnList) { ucar.unidata.geoloc.Station s = (ucar.unidata.geoloc.Station) stnList.get(0); LatLonPointImpl llpt = new LatLonPointImpl(); llpt.set(s.getLatitude(), s.getLongitude()); LatLonRect rect = new LatLonRect(llpt, .001, .001); for (int i = 1; i < stnList.size(); i++) { s = (ucar.unidata.geoloc.Station) stnList.get(i); llpt.set(s.getLatitude(), s.getLongitude()); rect.extend(llpt); } return rect; }
protected void setBoundingBox() { Attribute lon_range = netcdfDataset.findGlobalAttribute("lon_range"); double lon_start = lon_range.getNumericValue(0).doubleValue(); double lon_end = lon_range.getNumericValue(1).doubleValue(); Attribute lat_range = netcdfDataset.findGlobalAttribute("lat_range"); double lat_start = lat_range.getNumericValue(0).doubleValue(); double lat_end = lat_range.getNumericValue(1).doubleValue(); boundingBox = new LatLonRect(new LatLonPointImpl(lat_start, lon_start), new LatLonPointImpl(lat_end, lon_end)); }
protected void trackBB(EarthLocation loc, CalendarDate obsDate) { if (loc != null) { if (llbb == null) { llbb = new LatLonRect(loc.getLatLon(), .001, .001); return; } llbb.extend(loc.getLatLon()); } // date is handled specially if ((minDate == null) || minDate.isAfter(obsDate)) minDate = obsDate; if ((maxDate == null) || maxDate.isBefore(obsDate)) maxDate = obsDate; }
static public LatLonRect getBoundingBox(NetcdfDataset ds) { double lat_max = getAttAsDouble( ds, "geospatial_lat_max"); double lat_min = getAttAsDouble( ds, "geospatial_lat_min"); double lon_max = getAttAsDouble( ds, "geospatial_lon_max"); double lon_min = getAttAsDouble( ds, "geospatial_lon_min"); return new LatLonRect(new LatLonPointImpl(lat_min, lon_min), lat_max-lat_min, lon_max-lon_min); }
static public LatLonRect getBoundingBox(NetcdfDataset ds) { double lat_max = getAttAsDouble( ds, "geospatial_lat_max"); double lat_min = getAttAsDouble( ds, "geospatial_lat_min"); double lon_max = getAttAsDouble( ds, "geospatial_lon_max"); double lon_min = getAttAsDouble( ds, "geospatial_lon_min"); return new LatLonRect(new LatLonPointImpl(lat_min, lon_min), lat_max-lat_min, lon_max-lon_min); }
static public LatLonRect getBoundingBox(NetcdfDataset ds) { double lat_max = getAttAsDouble( ds, "geospatial_lat_max"); double lat_min = getAttAsDouble( ds, "geospatial_lat_min"); double lon_max = getAttAsDouble( ds, "geospatial_lon_max"); double lon_min = getAttAsDouble( ds, "geospatial_lon_min"); return new LatLonRect(new LatLonPointImpl(lat_min, lon_min), lat_max-lat_min, lon_max-lon_min); }
static public LatLonRect getBoundingBox(NetcdfDataset ds) { double lat_max = getAttAsDouble( ds, "geospatial_lat_max"); double lat_min = getAttAsDouble( ds, "geospatial_lat_min"); double lon_max = getAttAsDouble( ds, "geospatial_lon_max"); double lon_min = getAttAsDouble( ds, "geospatial_lon_min"); return new LatLonRect(new LatLonPointImpl(lat_min, lon_min), lat_max-lat_min, lon_max-lon_min); }
@Parameterized.Parameters(name = "{0}") public static List<Object[]> getTestParameters() { List<Object[]> result = new ArrayList<>(); result.add(new Object[]{topdir + "formats/dmsp/F14200307192230.n.OIS", "infraredImagery", new LatLonRect(new LatLonPointImpl(-5, -52.0), new LatLonPointImpl(25, -20.0))}); // this fails //result.add(new Object[]{topdir + "formats/netcdf4/ncom_relo_fukushima_1km_tmp_2011040800_t000.nc4", "surf_salt_flux", new LatLonRect(new LatLonPointImpl(43, 141), 5, 5)}); return result; }
void runCenter(double center) { LatLonPointImpl ptL = new LatLonPointImpl(0.0, 0.0); double xinc = 22.5; double yinc = 20.0; for (double lon = 0.0; lon < 380.0; lon += xinc) { ptL.setLongitude(center+lon); LatLonRect llbb = new LatLonRect(ptL, yinc, xinc); ProjectionRect ma2 = p.latLonToProjBB(llbb); LatLonRect p2 = p.projToLatLonBB(ma2); Assert.assertTrue(llbb + " => " + ma2 + " => " + p2, llbb.nearlyEquals(p2)); } }