Class NetcdfPointDataSource

All Implemented Interfaces:
Sharable, DataSource, DataSourceFactory, XmlPersistable
Direct Known Subclasses:
NetcdfMetarDataSource, NetcdfPointCloudDataSource, WRFHDNetcdfDataSource

public class NetcdfPointDataSource extends PointDataSource
A data source for netCDF or CDM point data
Version:
$Revision: 1.32 $ $Date: 2007/07/31 19:29:16 $
Author:
Don Murray
  • Field Details

    • fixedDataset

      protected ucar.nc2.ft.FeatureDatasetPoint fixedDataset
      a fixed dataset
  • Constructor Details

    • NetcdfPointDataSource

      public NetcdfPointDataSource() throws VisADException
      Default constructor
      Throws:
      VisADException - problem creating the object
    • NetcdfPointDataSource

      public NetcdfPointDataSource(ucar.nc2.ft.FeatureDatasetPoint fixedDataset, DataSourceDescriptor descriptor, Hashtable properties) throws VisADException
      Create a new NetcdfPointDataSource
      Parameters:
      fixedDataset - the data source
      descriptor - data source descriptor
      properties - extra properties for initialization
      Throws:
      VisADException - problem creating the data
    • NetcdfPointDataSource

      public NetcdfPointDataSource(DataSourceDescriptor descriptor, String source, Hashtable properties) throws VisADException
      Create a new NetcdfPointDataSource
      Parameters:
      descriptor - data source descriptor
      source - source of data (filename/URL)
      properties - extra properties for initialization
      Throws:
      VisADException - problem creating the data
    • NetcdfPointDataSource

      public NetcdfPointDataSource(DataSourceDescriptor descriptor, String[] sources, Hashtable properties) throws VisADException
      Create a new NetcdfPointDataSource
      Parameters:
      descriptor - data source descriptor
      sources - sources of data (filename/URL)
      properties - extra properties for initialization
      Throws:
      VisADException - problem creating the data
    • NetcdfPointDataSource

      public NetcdfPointDataSource(DataSourceDescriptor descriptor, List sources, Hashtable properties) throws VisADException
      Create a new NetcdfPointDataSource
      Parameters:
      descriptor - data source descriptor
      sources - List source of data (filenames/URLs)
      properties - extra properties for initialization
      Throws:
      VisADException - problem creating the data
  • Method Details

    • canDoGeoSelection

      public boolean canDoGeoSelection()
      Can this datasource do the geoselection subsetting and decimation
      Specified by:
      canDoGeoSelection in interface DataSource
      Overrides:
      canDoGeoSelection in class DataSourceImpl
      Returns:
      can do geo subsetting
    • canDoGeoSelectionStride

      protected boolean canDoGeoSelectionStride()
      Used for the geo subsetting property gui as to whether to show the stride or not
      Overrides:
      canDoGeoSelectionStride in class DataSourceImpl
      Returns:
      default is true
    • canSaveDataToLocalDisk

      public boolean canSaveDataToLocalDisk()
      Is this data source capable of saving its data to local disk
      Specified by:
      canSaveDataToLocalDisk in interface DataSource
      Overrides:
      canSaveDataToLocalDisk in class DataSourceImpl
      Returns:
      Can save to local disk
    • equals

      public boolean equals(Object o)
      Check to see if this NetcdfPointDataSource is equal to the object in question.
      Overrides:
      equals in class FilesDataSource
      Parameters:
      o - object in question
      Returns:
      true if they are the same or equivalent objects
    • hashCode

      public int hashCode()
      Get the hashcode for this object
      Overrides:
      hashCode in class Object
      Returns:
      hash code
    • initAfterCreation

      public void initAfterCreation()
      Initialize after we have been created.
      Specified by:
      initAfterCreation in interface DataSource
      Overrides:
      initAfterCreation in class FilesDataSource
    • getDataset

      protected ucar.nc2.ft.FeatureDatasetPoint getDataset(String file)
      Return the FeatureDatasetPoint associated with this DataSource.
      Parameters:
      file - the file name
      Returns:
      dataset
    • doMakeDataset

      protected ucar.nc2.ft.FeatureDatasetPoint doMakeDataset(String file)
      Make the dataset
      Parameters:
      file - the file name
      Returns:
      the dataset
    • getSample

      protected FieldImpl getSample(DataChoice dataChoice) throws Exception
      Read a sample of the data. e.g., just the first ob
      Overrides:
      getSample in class PointDataSource
      Parameters:
      dataChoice - The data choice
      Returns:
      The first ob
      Throws:
      Exception - On badness
    • makeObs

      protected FieldImpl makeObs(DataChoice dataChoice, DataSelection subset, ucar.unidata.geoloc.LatLonRect bbox) throws Exception
      Make PointObs from the choice
      Specified by:
      makeObs in class PointDataSource
      Parameters:
      dataChoice - choice for data (source of data)
      subset - subsetting parameters
      bbox - bounding box. may be null
      Returns:
      data of the form index -> (EarthLocation, Time, Data)
      Throws:
      Exception - problem creating data
    • makeObs

      protected FieldImpl makeObs(DataChoice dataChoice, DataSelection subset, ucar.unidata.geoloc.LatLonRect bbox, boolean sample) throws Exception
      make the obs
      Parameters:
      dataChoice - the datachoice
      subset - teh data selection
      bbox - the bbox
      sample - just a taste?
      Returns:
      the obs
      Throws:
      Exception - on badness
    • doRemove

      public void doRemove()
      Gets called by the DataManager when this DataSource has been removed.
      Specified by:
      doRemove in interface DataSource
      Overrides:
      doRemove in class PointDataSource
    • main

      public static void main(String[] args)
      test
      Parameters:
      args - args