Class CoordTransBuilder


  • public class CoordTransBuilder
    extends Object
    Manager for Coordinate Transforms.
    • Constructor Detail

      • CoordTransBuilder

        public CoordTransBuilder()
    • Method Detail

      • registerTransform

        public static void registerTransform​(String transformName,
                                             Class c)
        Register a class that implements a Coordinate Transform.
        Parameters:
        transformName - name of transform. This name is used in the datasets to identify the transform, eg CF names.
        c - class that implements CoordTransBuilderIF.
      • registerTransform

        public static void registerTransform​(String transformName,
                                             String className)
                                      throws ClassNotFoundException
        Register a class that implements a Coordinate Transform.
        Parameters:
        transformName - name of transform. This name is used in the datasets to identify the transform, eg CF names.
        className - name of class that implements CoordTransBuilderIF.
        Throws:
        ClassNotFoundException - if Class.forName( className) fails
      • registerTransformMaybe

        public static void registerTransformMaybe​(String transformName,
                                                  String className)
        Register a class that implements a Coordinate Transform.
        Parameters:
        transformName - name of transform. This name is used in the datasets to identify the transform, eg CF names.
        className - name of class that implements CoordTransBuilderIF.
      • makeCoordinateTransform

        @Nullable
        public static CoordinateTransform makeCoordinateTransform​(NetcdfDataset ds,
                                                                  AttributeContainer ctv,
                                                                  Formatter parseInfo,
                                                                  Formatter errInfo)
        Make a CoordinateTransform object from the parameters in a Coordinate Transform Variable, using an intrinsic or registered CoordTransBuilder.
        Parameters:
        ds - enclosing dataset, only used for vertical transforms
        ctv - the Coordinate Transform Variable - container for the transform parameters
        parseInfo - pass back information about the parsing.
        errInfo - pass back error information.
        Returns:
        CoordinateTransform, or null if failure.
      • makeCoordinateTransform

        @Nullable
        public static CoordinateTransform makeCoordinateTransform​(NetcdfDataset ds,
                                                                  AttributeContainer ctv,
                                                                  Formatter parseInfo,
                                                                  Formatter errInfo,
                                                                  com.google.common.collect.ImmutableList<CoordinateAxis> coordAxes)
        Make a CoordinateTransform object from the parameters in a Coordinate Transform Variable, using an intrinsic or registered CoordTransBuilder.
        Parameters:
        ds - enclosing dataset, only used for vertical transforms
        ctv - the Coordinate Transform Variable - container for the transform parameters
        parseInfo - pass back information about the parsing.
        errInfo - pass back error information.
        coordAxes - any precomputed coordinate axes
        Returns:
        CoordinateTransform, or null if failure.
      • makeDummyTransformVariable

        public static VariableDS makeDummyTransformVariable​(NetcdfDataset ds,
                                                            CoordinateTransform ct)
        Create a "dummy" Coordinate Transform Variable based on the given CoordinateTransform. This creates a scalar Variable with dummy data, and adds the Parameters of the CoordinateTransform as attributes.
        Parameters:
        ds - for this dataset
        ct - based on the CoordinateTransform
        Returns:
        the Coordinate Transform Variable. You must add it to the dataset.
      • makeProjection

        @Deprecated
        public static ProjectionImpl makeProjection​(CoverageTransform gct,
                                                    Formatter errInfo)
        Deprecated.
        Make a CoordinateTransform object from the parameters in a CoordTransform, using an intrinsic or registered CoordTransBuilder.
        Parameters:
        errInfo - pass back error information.
        Returns:
        CoordinateTransform, or null if failure. TODO return Projection in ver6