Package ucar.nc2.dataset
Class CoordTransBuilder
- java.lang.Object
-
- ucar.nc2.dataset.CoordTransBuilder
-
public class CoordTransBuilder extends Object
Manager for Coordinate Transforms.
-
-
Constructor Summary
Constructors Constructor Description CoordTransBuilder()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description 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.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.static VariableDS
makeDummyTransformVariable(NetcdfDataset ds, CoordinateTransform ct)
Create a "dummy" Coordinate Transform Variable based on the given CoordinateTransform.static ProjectionImpl
makeProjection(CoverageTransform gct, Formatter errInfo)
Deprecated.static void
registerTransform(String transformName, Class c)
Register a class that implements a Coordinate Transform.static void
registerTransform(String transformName, String className)
Register a class that implements a Coordinate Transform.static void
registerTransformMaybe(String transformName, String className)
Register a class that implements a Coordinate Transform.
-
-
-
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 transformsctv
- the Coordinate Transform Variable - container for the transform parametersparseInfo
- 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 transformsctv
- the Coordinate Transform Variable - container for the transform parametersparseInfo
- 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 datasetct
- 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
-
-