Package ucar.unidata.geoloc

Examples of ucar.unidata.geoloc.Station


    // for METAR it's ID.
    // For profiler data, there are two variables IDA and IDB where IDA is the first 4 chars and IDB is the second 4.

    sbuff.append("ID ");
    for (int i = 0; i < stations.size(); i++) {
      Station s = (Station) stations.get(i);
      if (i > 0) sbuff.append(",");
      sbuff.append(s.getName());
    }
}
View Full Code Here


    try {
      stationHelper = new StationHelper();
      StructureDataIterator siter = ft.getStationDataIterator(-1);
      while (siter.hasNext()) {
        StructureData stationData = siter.next();
        Station s = makeStation(stationData, siter.getCurrentRecno());
        if (s != null)
          stationHelper.addStation( s);
      }
    } catch (IOException ioe) {
      throw new RuntimeException(ioe);
View Full Code Here

      throw new RuntimeException(ioe);
    }
  }

  public Station makeStation(StructureData stationData, int recnum) {
    Station s = ft.makeStation(stationData);
    if (s == null) return null;
    return new StandardStationProfileFeature(s, stationData, recnum);
  }
View Full Code Here

        TimedCollection.Dataset td = iter.next();
        Formatter errlog = new Formatter();
        currentDataset = (FeatureDatasetPoint) FeatureDatasetFactoryManager.open(FeatureType.STATION, td.getLocation(), null, errlog);
        List<FeatureCollection> fcList = currentDataset.getPointFeatureCollectionList();
        StationTimeSeriesFeatureCollection stnCollection = (StationTimeSeriesFeatureCollection) fcList.get(0);
        Station s = stnCollection.getStation(getName());
        if (s == null) {
          System.out.printf("CompositeStationFeatureIterator dataset: %s missing station %s%n",
                  td.getLocation(), getName());
          return getNextIterator();
        }

        StationTimeSeriesFeature stnFeature = stnCollection.getStationFeature(s);
        if (CompositeDatasetFactory.debug)
          System.out.printf("CompositeStationFeatureIterator open dataset: %s for %s%n", td.getLocation(), s.getName());
        return stnFeature.getPointFeatureIterator(bufferSize);
      }
View Full Code Here

   * @param stationData station data structure
   * @param recnum station data recnum within table
   * @return Station or null, skip this Station
   */
  public Station makeStation(StructureData stationData, int recnum) {
    Station s = ft.makeStation(stationData);
    if (s == null) return null;
    return new StandardStationFeatureImpl(s, timeUnit, stationData, recnum);
  }
View Full Code Here

      stationHelper = new StationHelper();

      StructureDataIterator siter = ft.getStationDataIterator(-1);
      while (siter.hasNext()) {
        StructureData stationData = siter.next();
        Station s = makeStation(stationData, siter.getCurrentRecno());
        if (s != null)
          stationHelper.addStation( s);
      }
    } catch (IOException ioe) {
      throw new RuntimeException(ioe);
View Full Code Here

              PointFeature pf = pfi.next();
              // the call to cursor.getParentStructure() in
              // in StandardPointFeatureIterator.makeStation()
              // is returning the observation structure, not the
              // station structure since Cursor.currentIndex = 0
              Station s = stsfc.getStation(pf);
              System.out.println("stn= " + s);
            }
          } finally {
            pfi.finish();
          }
View Full Code Here

        }

        Element       rootElem = doc.getRootElement();
        List<Element> children = rootElem.getChildren();
        for (Element child : children) {
            Station s;
            if (null != (s = readStation(child))) {
                stations.put(s.getName(), s);
            }
        }

        return stations;
    }
View Full Code Here

        // System.exit(0);
        stns = dsc.getStations();
        System.out.println(" nstns= " + stns.size());

        Station stn = dsc.getRadarStation("DVN")//(StationImpl)stns.get(12);
        System.out.println("stn = " + stn);

        // List ulist = stn.getRadarStationURIs();
        // assert null != ulist;
        List tl  = dsc.getRadarTimeSpan();
        Date ts1 = DateUnit.getStandardOrISO("1998-06-28T01:01:21Z");
        Date ts2 = DateUnit.getStandardOrISO("1998-07-30T19:01:21Z");
        List pd  = dsc.getRadarProducts();
        List<Date> tlist = dsc.getRadarStationTimes(stn.getName(), "BREF1",
                               ts1, ts2);
        int sz = tlist.size();
        for (int i = 0; i < 3; i++) {
            Date ts0 = (Date) tlist.get(i);
            RadialDatasetSweep rds = dsc.getRadarDataset(stn.getName(),
                                         "BREF1", ts0);
            int tt = 0;
        }

        Date ts0   = (Date) tlist.get(0);
        URI  stURL = dsc.getRadarDatasetURI(stn.getName(), "BREF1", ts0);
        assert null != stURL;
        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<Date> times = dsc.getRadarStationTimes(
                                   stn.getName(),
                                   "BREF1",
                                   new Date(
                                       System.currentTimeMillis()
                                       - 3600 * 1000 * 24 * 100), new Date(
                                           System.currentTimeMillis()));
View Full Code Here

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

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

    Station stn = (Station) stns.get(13);
    List data = ds.getData( stn, null);
    for (int i = 0; i < data.size(); i++) {
      StationObsDatatypeImpl obs=  (StationObsDatatypeImpl) data.get(i);
      StructureData sdata = obs.getData();
      System.out.println(i+" "+sdata.getScalarString("line"));
View Full Code Here

TOP

Related Classes of ucar.unidata.geoloc.Station

Copyright © 2018 www.massapicom. 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.