Package ucar.ma2

Examples of ucar.ma2.StructureDataIterator


  @Override
  protected void initStationHelper() {
    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


    }

    // iterate over obs in the profile
    public PointFeatureIterator getPointFeatureIterator(int bufferSize) throws IOException {
      Cursor cursorIter = cursor.copy();
      StructureDataIterator structIter = ft.getLeafFeatureDataIterator(cursorIter, bufferSize);
      StandardPointFeatureIterator iter = new StandardProfileFeatureIterator(ft, timeUnit, structIter, cursorIter);
      if ((boundingBox == null) || (dateRange == null) || (npts < 0))
        iter.setCalculateBounds(this);
      return iter;
    }
View Full Code Here

      this.cursor = cursor;
    }

    public PointFeatureIterator getPointFeatureIterator(int bufferSize) throws IOException {
      Cursor cursorIter = cursor.copy();
      StructureDataIterator siter = ft.getLeafFeatureDataIterator( cursorIter, bufferSize);
      StandardPointFeatureIterator iter = new StandardPointFeatureIterator(ft, timeUnit, siter, cursorIter);
      if ((boundingBox == null) || (dateRange == null) || (npts < 0))
        iter.setCalculateBounds(this);
      return iter;
    }
View Full Code Here

    if (record == null) {
      Dimension d = ncfile.findDimension("Time");
      record = new StructurePseudo(ncfile, null, "precord", d);
      System.out.println("   use psuedo record");
    }
    StructureDataIterator iter = record.getStructureIterator();
    while (iter.hasNext()) {
      StructureData sd = iter.next();
      if (first) {
        System.out.println("   record size = " + sd.getStructureMembers().getStructureSize() + " " +
                "   nvars = " + sd.getStructureMembers().getMembers().size());
      }
      first = false;
View Full Code Here

  protected void initStationHelper() {
    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

      cursor.recnum[1] = recnum;
      cursor.tableData[1] = stationData;
      cursor.currentIndex = 1;
      ft.addParentJoin(cursor); // there may be parent joins

      StructureDataIterator obsIter = ft.getLeafFeatureDataIterator(cursor, bufferSize);
      StandardPointFeatureIterator iter = new StandardPointFeatureIterator(ft, timeUnit, obsIter, cursor);
      if ((boundingBox == null) || (dateRange == null) || (npts < 0))
        iter.setCalculateBounds(this);
      return iter;
    }
View Full Code Here

      }
    }

    public PointFeatureIterator getPointFeatureIterator(int bufferSize) throws IOException {
      Cursor cursorIter = cursor.copy();
      StructureDataIterator siter = ft.getLeafFeatureDataIterator( cursorIter, bufferSize);
      StandardPointFeatureIterator iter = new StandardProfileFeatureIterator(ft, timeUnit, siter, cursorIter);
      if ((boundingBox == null) || (dateRange == null) || (npts < 0))
        iter.setCalculateBounds(this);
      return iter;
    }
View Full Code Here

    }


    //String ce = "date_time(\"alkjdf\",\"eriu\")&" + seqName + ".longitude>";
    String ce = "&" + seqName + ".longitude>359.9" + "&" + seqName + ".longitude<359.9205";
    StructureDataIterator dodsIt;
    try
    {
      dodsIt = struct.getStructureIterator( ce);
    }
    catch ( IOException e )
View Full Code Here

    ArraySequence as = (ArraySequence) data;
    as.getStructureDataCount();
    System.out.printf(" count = %d%n", as.getStructureDataCount());

    int count = 0;
    StructureDataIterator iter = as.getStructureDataIterator();
    while (iter.hasNext()) {
      StructureData sdata = iter.next();
      count++;
    }
    System.out.printf(" count = %d%n", count);

    int count2 = 0;
    StructureDataIterator iter2 = record.getStructureIterator();
    while (iter2.hasNext()) {
      StructureData sdata = iter2.next();
      count2++;
    }
    System.out.printf(" count2 = %d%n", count2);

    assert count2 == count;
View Full Code Here

    double maxLon = -Double.MAX_VALUE;

    // read all the data, create a RecordObs
    ArrayList records = new ArrayList();
    int recno = 0;
    StructureDataIterator ii = recordVar.getStructureIterator();
    while (ii.hasNext()) {
      StructureData sdata = ii.next();
      StructureMembers members = sdata.getStructureMembers();

      Object stationId = null;
      if (hasStations) {
        if ( stationIdType == DataType.INT) {
View Full Code Here

TOP

Related Classes of ucar.ma2.StructureDataIterator

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.