Examples of Station


Examples of thredds.catalog.query.Station

            return null;
          }

          stations = new HashMap( 2*stations.size());
          for (int i = 0; i < stationC.size(); i++) {
            Station s =  (Station) stationC.get(i);
            stations.put( s.getName(), s);
          }
        }

        return (Station) stations.get(name);
    }
View Full Code Here

Examples of thredds.catalog.query.Station

    public List getStations( LatLonRect boundingBox)throws IOException {
        LatLonPointImpl latlonPt = new LatLonPointImpl();
        ArrayList result = new ArrayList();
        List stationC = radarCollection.getStations();
        for (int i = 0; i < stationC.size(); i++) {
          Station s =  (Station) stationC.get(i);
          latlonPt.set( s.getLocation().getLatitude(), s.getLocation().getLongitude());
          if (boundingBox.contains( latlonPt))
            result.add( s);
        }
        return result;
View Full Code Here

Examples of thredds.catalog.query.Station

    public void testDqcRadarStation() throws IOException {
        if(ds== null)
            testDqc();
       
        Station stn = ds.getStation("KFTG");
        assert null != stns;
        long now = System.currentTimeMillis();
        long yday0 = now - (36*60*60*1000);
        long yday1 = now - (30*60*60*1000);
        Date ts0 = new Date(yday0);
        Date ts1 = new Date(yday1);
        DateSelection dateS = new DateSelection(ts0, ts1);
        dateS.setInterval((double)3600*0);
        dateS.setRoundTo((double)3600*0);
        dateS.setPreRange((double)500*0);
        dateS.setPostRange((double)500*0);
        List absList2 = ds.getRadarStationTimes(stn.getValue(), ts0, ts1);
        assert null != absList2;
        List ulist = ds.getDataURIs(stn.getValue(), dateS);
        assert null != ulist;
        dateS.setInterval((double)3600*1000);
        ulist = ds.getDataURIs(stn.getValue(), dateS);
        assert null != ulist;
        List tlist = ds.getRadarStationTimes(stn.getValue(), null, null);
        assert null != tlist;
        Date ts = DateUnit.getStandardOrISO((String)tlist.get(1));
        assert null != ts;
        URI stURL = ds.getRadarDatasetURI(stn.getValue(),ts);
        assert null != stURL;


    }
View Full Code Here

Examples of thredds.catalog.query.Station

   
    public void testDqcRadarDatasetURIs() throws IOException {
        if(ds== null)
            testDqc();

        Station stn = (thredds.catalog.query.Station)(stns.get(1));
        assert null != stn;
        DateSelection dateS = new DateSelection();
        dateS.setInterval((double)3600*1000);
        dateS.setRoundTo((double)3600*1000);
        dateS.setPreRange((double)500*1000);
        dateS.setPostRange((double)500*1000);
        List ulist = ds.getDataURIs(stn.getValue(), dateS );
        assert null != ulist;
        List tlist = ds.getRadarStationTimes(stn.getValue(), null, null);
        assert null != tlist;
        List data = ds.getDataURIs(stn.getValue(), dateS );
        assert null != data;
        dateS.setPreRange((double)200*1000);
        dateS.setPostRange((double)200*1000);
        List data1 = ds.getDataURIs(stn.getValue(), dateS );
        assert null != data1;
        dateS.setPostRange((double)200*0);
        List data2 = ds.getDataURIs(stn.getValue(), dateS );
        assert null != data2;
        dateS.setPreRange((double)200*0);
        dateS.setPostRange((double)200*1000);
        List data3 = ds.getDataURIs(stn.getValue(), dateS );
        assert null != data3;
        dateS.setPreRange((double)100*1000);
        dateS.setPostRange((double)100*1000);
        List data4 = ds.getDataURIs(stn.getValue(), dateS );
        assert null != data4;

    }
View Full Code Here

Examples of thredds.catalog.query.Station

    public void testDqcRadarDatasetATimes() throws IOException {
        if(ds== null)
            testDqc();

        Station stn = (thredds.catalog.query.Station)ds.getStation("KFTG");
        assert null != stn;
        List tlist = ds.getRadarStationTimes(stn.getValue(), null, null);
        assert null != tlist;
        Date ts = DateUnit.getStandardOrISO((String)tlist.get(1));
        assert null != ts;
        URI stURL = ds.getRadarDatasetURI(stn.getValue(),ts);
        assert null != stURL;
        RadialDatasetSweep rds = ds.getRadarDataset(stn.getValue(),ts);
        assert null != rds;
    }
View Full Code Here

Examples of thredds.catalog.query.Station

    public void testDqcRadarDatasetTimesRange() throws IOException {
        if(ds== null)
            testDqc();

        Station stn = (thredds.catalog.query.Station)ds.getStation("KFTG");
        assert null != stn;
        List rList = ds.getRadarStationTimes(stn.getValue(), null, null);
        assert null != rList;
        Date ts0 = DateUnit.getStandardOrISO((String)rList.get(5));
        Date ts1 = DateUnit.getStandardOrISO((String)rList.get(1));
        List subList = ds.getRadarStationTimes(stn.getValue(),ts0, ts1);
        assert null != subList;

        Iterator it1 = subList.iterator();
                while(it1.hasNext()) {
                    Date result = DateUnit.getStandardOrISO((String)it1.next());
                    assert null != result;
        }

        long now = System.currentTimeMillis();
        long yday0 = now - (36*60*60*1000);
        long yday1 = now - (24*60*60*1000);
        ts0 = new Date(yday0);
        ts1 = new Date(yday1);
        DateSelection dateS = new DateSelection(ts0, ts1);
        dateS.setInterval((double)3600*1000);
        dateS.setRoundTo((double)3600*1000);
        dateS.setPreRange((double)500*1000);
        dateS.setPostRange((double)500*1000);
        List data = ds.getData(stn.getValue(), dateS);
        assert null != data;
        Iterator it = data.iterator();

        while(it.hasNext()) {
            RadialDatasetSweep rds = (RadialDatasetSweep)it.next();
View Full Code Here

Examples of thredds.catalog.query.Station

    public void testDqcRadarDatasetATimesGetData() throws IOException {
        if(ds== null)
            testDqc();

        Station stn = (thredds.catalog.query.Station)ds.getStation("KFTG");
        assert null != stn;
        List tlist = ds.getRadarStationTimes(stn.getValue(), null, null);
        assert null != tlist;
        int sz = tlist.size();
        Date ts = DateUnit.getStandardOrISO((String)tlist.get(1));

        URI stURL = ds.getRadarDatasetURI(stn.getValue(), ts);
        assert null != stURL;
        Date tsn = DateUnit.getStandardOrISO((String)tlist.get(0));
        Date ts1 = DateUnit.getStandardOrISO((String)tlist.get(sz-1));
        DateSelection dateS = new DateSelection(ts1, tsn);
        dateS.setInterval((double)3600*1000);
 
View Full Code Here

Examples of thredds.catalog.query.Station

    public List getRadarStations() {
        List      sl  = selStation.getStations();
        ArrayList dsl = new ArrayList();

        for (Iterator it = sl.iterator(); it.hasNext(); ) {
            Station s = (Station) it.next();
            dsl.add(s);
        }
        return dsl;
    }
View Full Code Here

Examples of thredds.catalog.query.Station

            throws IOException {
        List      sl  = selStation.getStations();
        ArrayList dsl = new ArrayList();

        for (Iterator it = sl.iterator(); it.hasNext(); ) {
            Station         s        = (Station) it.next();
            LatLonPointImpl latlonPt = new LatLonPointImpl();
            latlonPt.set(s.getLocation().getLatitude(),
                         s.getLocation().getLongitude());
            if (boundingBox.contains(latlonPt)) {
                dsl.add(s);
            }
            if ((cancel != null) && cancel.isCancel()) {
                return null;
View Full Code Here

Examples of thredds.catalog.query.Station

        System.out.println(" errs= " + errlog);

        List stns = ds.getStations();
        System.out.println(" nstns= " + stns.size());

        Station stn = (Station) (stns.get(2));

        // List ulist = stn.getRadarStationURIs();
        // assert null != ulist;
        Date ts1 = DateUnit.getStandardOrISO("2007-06-9T12:12:00");
        Date ts2 = DateUnit.getStandardOrISO("2007-06-9T23:12:00");

        List tlist = ds.getRadarStationTimes(stn.getValue(), ts1, ts2);
        int                sz    = tlist.size();
        Date ts0 = DateUnit.getStandardOrISO((String) tlist.get(1));
        RadialDatasetSweep rds   = ds.getRadarDataset(stn.getValue(), ts0);
        URI                stURL = ds.getRadarDatasetURI(stn.getValue(), ts0);
        assert null != stURL;
        assert 0 != sz;
        DateSelection dateS = new DateSelection(ts1, ts2);
        dateS.setInterval((double) 3600 * 1000);
        dateS.setRoundTo((double) 3600 * 1000);
        dateS.setPreRange((double) 500 * 1000);
        dateS.setPostRange((double) 500 * 1000);



        for (int i = 0; i < stns.size(); i++) {
            stn = (Station) stns.get(i);
            List times = ds.getRadarStationTimes(
                             stn.getValue(),
                             new Date(
                                 System.currentTimeMillis()
                                 - 3600 * 1000 * 24 * 100), new Date(
                                     System.currentTimeMillis()));
            if (times.size() > 0) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.