Class PointDatasetStandardFactory

  • All Implemented Interfaces:
    FeatureDatasetFactory

    public class PointDatasetStandardFactory
    extends Object
    implements FeatureDatasetFactory
    Standard handler for Point obs dataset based on a NetcdfDataset object. Registered with FeatureDatasetFactoryManager. The convention-specific stuff is handled by TableAnayser.
    • Constructor Detail

      • PointDatasetStandardFactory

        public PointDatasetStandardFactory()
    • Method Detail

      • setDebugFlags

        public static void setDebugFlags​(DebugFlags debugFlags)
      • isMine

        public Object isMine​(FeatureType wantFeatureType,
                             NetcdfDataset ds,
                             Formatter errlog)
        Check if this is a POINT datatype. If so, a TableAnalyser is used to analyze its structure. The TableAnalyser is reused when the dataset is opened.
        1. Can handle ANY_POINT FeatureType.
        2. Must have time, lat, lon axis (from CoordSysBuilder)
        3. Call TableAnalyzer.factory() to create a TableAnalyzer
        4. TableAnalyzer must agree it can handle the requested FeatureType
        Specified by:
        isMine in interface FeatureDatasetFactory
        Parameters:
        wantFeatureType - desired feature type, null means FeatureType.ANY_POINT
        ds - analyse this dataset
        errlog - log error messages here (may not be null)
        Returns:
        if successful, return non-null. This object is then passed back into open(), so analysis can be reused.
      • open

        public FeatureDataset open​(FeatureType wantFeatureType,
                                   NetcdfDataset ncd,
                                   Object analyser,
                                   CancelTask task,
                                   Formatter errlog)
                            throws IOException
        Description copied from interface: FeatureDatasetFactory
        Open a NetcdfDataset as a FeatureDataset. Should only be called if isMine() returns non-null.
        Specified by:
        open in interface FeatureDatasetFactory
        Parameters:
        wantFeatureType - open as this feature type. If null, open as any feature type.
        ncd - an already opened NetcdfDataset.
        analyser - the object returned from isMine(). Likely given to a different instance of FeatureDatasetFactory
        task - user may cancel, may be null
        errlog - write error messages here, may be null
        Returns:
        a subclass of FeatureDataset
        Throws:
        IOException - on error