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; }
public List<Station> getStations(LatLonRect boundingBox) throws IOException { if (boundingBox == null) return stations; LatLonPointImpl latlonPt = new LatLonPointImpl(); List<Station> result = new ArrayList<Station>(); for (Station s : stations) { latlonPt.set(s.getLatitude(), s.getLongitude()); if (boundingBox.contains(latlonPt)) result.add(s); } return result; }
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; }
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; }
public List<StationFeature> getStationFeatures(LatLonRect boundingBox) throws IOException { if (boundingBox == null) return stations; LatLonPointImpl latlonPt = new LatLonPointImpl(); List<StationFeature> result = new ArrayList<>(); for (StationFeature s : stations) { latlonPt.set(s.getLatitude(), s.getLongitude()); if (boundingBox.contains(latlonPt)) result.add(s); } return result; }
public List<StationFeature> getStationFeatures(LatLonRect boundingBox) throws IOException { if (boundingBox == null) return stations; LatLonPointImpl latlonPt = new LatLonPointImpl(); List<StationFeature> result = new ArrayList<>(); for (StationFeature s : stations) { latlonPt.set(s.getLatitude(), s.getLongitude()); if (boundingBox.contains(latlonPt)) result.add(s); } return result; }
public List<Station> getStations(LatLonRect boundingBox) throws IOException { if (boundingBox == null) return getStations(); LatLonPointImpl latlonPt = new LatLonPointImpl(); List<Station> result = new ArrayList<>(); for (StationFeature s : stations) { latlonPt.set(s.getLatitude(), s.getLongitude()); if (boundingBox.contains(latlonPt)) result.add(s); } return result; }
public List<Station> getStations(LatLonRect boundingBox) throws IOException { if (boundingBox == null) return getStations(); LatLonPointImpl latlonPt = new LatLonPointImpl(); List<Station> result = new ArrayList<>(); for (StationFeature s : stations) { latlonPt.set(s.getLatitude(), s.getLongitude()); if (boundingBox.contains(latlonPt)) result.add(s); } return result; }
public List<ucar.unidata.geoloc.Station> getStations(LatLonRect boundingBox, CancelTask cancel) throws IOException { LatLonPointImpl latlonPt = new LatLonPointImpl(); List<ucar.unidata.geoloc.Station> result = new ArrayList<ucar.unidata.geoloc.Station>(); List<ucar.unidata.geoloc.Station> stations = obsDataset.getStations(); for (ucar.unidata.geoloc.Station s : stations) { latlonPt.set(s.getLatitude(), s.getLongitude()); if (boundingBox.contains(latlonPt)) result.add(s); if ((cancel != null) && cancel.isCancel()) return null; } return result; }
public List<ucar.unidata.geoloc.Station> getStations(LatLonRect boundingBox, CancelTask cancel) throws IOException { LatLonPointImpl latlonPt = new LatLonPointImpl(); List<ucar.unidata.geoloc.Station> result = new ArrayList<ucar.unidata.geoloc.Station>(); List<ucar.unidata.geoloc.Station> stations = obsDataset.getStations(); for (ucar.unidata.geoloc.Station s : stations) { latlonPt.set(s.getLatitude(), s.getLongitude()); if (boundingBox.contains(latlonPt)) result.add(s); if ((cancel != null) && cancel.isCancel()) return null; } return result; }
public List<ucar.unidata.geoloc.Station> getStations(LatLonRect boundingBox, CancelTask cancel) throws IOException { LatLonPointImpl latlonPt = new LatLonPointImpl(); List<ucar.unidata.geoloc.Station> result = new ArrayList<ucar.unidata.geoloc.Station>(); List<ucar.unidata.geoloc.Station> stations = obsDataset.getStations(); for (ucar.unidata.geoloc.Station s : stations) { latlonPt.set(s.getLatitude(), s.getLongitude()); if (boundingBox.contains(latlonPt)) result.add(s); if ((cancel != null) && cancel.isCancel()) return null; } return result; }
/** * Transform a rotated longitude (X) and rotated latitude (Y) into a "real" * longitude-latitude pair. */ public LatLonPoint projToLatLon(ProjectionPoint ppt, LatLonPointImpl destPoint) { /* Tor's algorithm public double[] inv(double[] lonlat) return rotate(lonlat, -polerotate, -lonpole, -sinDlat); */ double[] lonlat = new double[2]; lonlat[0] = ppt.getX(); lonlat[1] = ppt.getY(); double[] rlonlat = rotate(lonlat, -polerotate, -lonpole, -sinDlat); if (destPoint == null) destPoint = new LatLonPointImpl(rlonlat[1], rlonlat[0]); else destPoint.set(rlonlat[1], rlonlat[0]); if (show) System.out.println("Proj= " + ppt + " latlon= " + destPoint); return destPoint; }
/** * Transform a rotated longitude (X) and rotated latitude (Y) into a "real" * longitude-latitude pair. */ public LatLonPoint projToLatLon(ProjectionPoint ppt, LatLonPointImpl destPoint) { /* Tor's algorithm public double[] inv(double[] lonlat) return rotate(lonlat, -polerotate, -lonpole, -sinDlat); */ double[] lonlat = new double[2]; lonlat[0] = ppt.getX(); lonlat[1] = ppt.getY(); double[] rlonlat = rotate(lonlat, -polerotate, -lonpole, -sinDlat); if (destPoint == null) destPoint = new LatLonPointImpl(rlonlat[1], rlonlat[0]); else destPoint.set(rlonlat[1], rlonlat[0]); if (show) System.out.println("Proj= " + ppt + " latlon= " + destPoint); return destPoint; }