Package ucar.nc2.dt

Interface PointCollection

    • Method Detail

      • getDataClass

        Class getDataClass()
        Deprecated.
        The getData() methods return objects of this Class
        Returns:
        Class of the data
      • getTimeUnits

        DateUnit getTimeUnits()
        Deprecated.
        Get the units of Calendar time. To get a Date, from a time value, call DateUnit.makeDate(double value). To get units as a String, call DateUnit.getUnitsString().
        Returns:
        the units of Calendar time.
      • getData

        List getData()
              throws IOException
        Deprecated.
        Get all data. Return null if too expensive to implement. Call getDataCount() to get estimate of size. This will return a list of getDataClass(), but the actual data may or may not already be read in to memory. In any case, you call dataType.getData() to get the data.
        Returns:
        List of type getDataClass()
        Throws:
        IOException - on io error
        See Also:
        as a (possibly) more efficient alternative
      • getData

        List getData​(CancelTask cancel)
              throws IOException
        Deprecated.
        Get all data, allow user to cancel. Return null if too expensive to implement. Call getDataCount() to get estimate of size. This will return a list of getDataClass(), but the actual data may or may not already be read in to memory. In any case, you call dataType.getData() to get the data.
        Parameters:
        cancel - allow user to cancel. Implementors should return ASAP.
        Returns:
        List of type getDataClass()
        Throws:
        IOException - on io error
        See Also:
        as a (possibly) more efficient alternative
      • getDataCount

        int getDataCount()
        Deprecated.
        Get estimate of number of data records (may not be exact). Return -1 if not able to estimate.
        Returns:
        number of data records or -1
      • getData

        List getData​(LatLonRect boundingBox,
                     Date start,
                     Date end)
              throws IOException
        Deprecated.
        Get all data within the specified bounding box and date range.
        Parameters:
        boundingBox - restrict data to this bounding nox
        start - restrict data to after this time
        end - restrict data to before this time
        Returns:
        List of type getDataClass()
        Throws:
        IOException - on io error
        See Also:
        as a (possibly) more efficient alternative
      • getData

        List getData​(LatLonRect boundingBox,
                     Date start,
                     Date end,
                     CancelTask cancel)
              throws IOException
        Deprecated.
        Get all data within the specified bounding box and date range, allow user to cancel.
        Parameters:
        boundingBox - restrict data to this bounding nox
        start - restrict data to after this time
        end - restrict data to before this time
        cancel - allow user to cancel. Implementors should return ASAP.
        Returns:
        List of type getDataClass()
        Throws:
        IOException - on io error
        See Also:
        as a (possibly) more efficient alternative
      • getDataIterator

        DataIterator getDataIterator​(int bufferSize)
                              throws IOException
        Deprecated.
        Get an efficient iterator over all the data in the Collection. You must fully process the data, or copy it out of the StructureData, as you iterate over it. DO NOT KEEP ANY REFERENCES to the dataType object or the StructureData object.

        This is the efficient way to get all the data, it can be 100 times faster than getData(). This will return an iterator over type getDataClass(), and the actual data has already been read into memory, that is, dataType.getData() will not incur any I/O. This is accomplished by buffering bufferSize amount of data at once.

        We dont need a cancelTask, just stop the iteration if the user want to cancel.

         Example for point observations:
         

        Iterator iter = pointObsDataset.getDataIterator(); while (iter.hasNext()) { PointObsDatatype pobs = (PointObsDatatype) iter.next(); StructureData sdata = pobs.getData(); // process fully }

        Parameters:
        bufferSize - if > 0, the internal buffer size, else use the default. Typically 100k - 1M for best results.
        Returns:
        iterator over type getDataClass(), no guarenteed order.
        Throws:
        IOException - on io error