Class CoordSystemBuilder

    • Method Detail

      • isCoordinateVariable

        public static boolean isCoordinateVariable​(Variable.Builder<?> vb)
        Calculate if this is a classic coordinate variable: has same name as its first dimension. If type char, must be 2D, else must be 1D.
        Returns:
        true if a coordinate variable.
      • countDomainSize

        public static int countDomainSize​(Variable.Builder<?>... axes)
      • isCoordinateAxisForVariable

        protected boolean isCoordinateAxisForVariable​(CoordinateAxis.Builder<?> axis,
                                                      CoordSystemBuilder.VarProcess vp)
        Does this axis "fit" this variable. True if all of the dimensions in the axis also appear in the variable. If char variable, last dimension is left out.
        Parameters:
        axis - check if this axis is ok for the given variable
        vp - the given variable
        Returns:
        true if all of the dimensions in the axis also appear in the variable.
      • setConventionUsed

        protected void setConventionUsed​(String convName)
      • getConventionUsed

        public String getConventionUsed()
      • addUserAdvice

        protected void addUserAdvice​(String advice)
      • getParseInfo

        public String getParseInfo()
      • getUserAdvice

        public String getUserAdvice()
      • buildCoordinateSystems

        protected void buildCoordinateSystems()
      • identifyCoordinateAxes

        protected void identifyCoordinateAxes()
        Everything named in the coordinateAxes or coordinates attribute are Coordinate axes.
      • identifyCoordinateSystems

        protected void identifyCoordinateSystems()
        Identify coordinate systems, using _Coordinate.Systems attribute.
      • identifyCoordinateTransforms

        protected void identifyCoordinateTransforms()
        Identify coordinate transforms, using _CoordinateTransforms attribute.
      • getAxisType

        @Nullable
        protected AxisType getAxisType​(VariableDS.Builder vb)
        Identify what kind of AxisType the named variable is. Only called for variables already identified as Coordinate Axes. Default null - subclasses can override.
        Parameters:
        vb - a variable already identified as a Coordinate Axis
        Returns:
        AxisType or null if unknown.
      • makeCoordinateAxes

        protected void makeCoordinateAxes()
        Take previously identified Coordinate Axis and Coordinate Variables and make them into a CoordinateAxis. Uses the getAxisType() method to figure out the type, if not already set.
      • makeCoordinateSystems

        protected void makeCoordinateSystems()
      • assignCoordinateSystemsExplicit

        protected void assignCoordinateSystemsExplicit()
        Assign explicit CoordinateSystem objects to variables.
      • makeCoordinateSystemsImplicit

        protected void makeCoordinateSystemsImplicit()
        Make implicit CoordinateSystem objects for variables that dont already have one, by using the variables' list of coordinate axes, and any coordinateVariables for it. Must be at least 2 axes. All of a variable's _Coordinate Variables_ plus any variables listed in a *__CoordinateAxes_* or *_coordinates_* attribute will be made into an *_implicit_* Coordinate System. If there are at least two axes, and the coordinate system uses all of the variable's dimensions, it will be assigned to the data variable.
      • makeCoordinateTransforms

        protected void makeCoordinateTransforms()
        Take all previously identified Coordinate Transforms and create a CoordinateTransform object by calling CoordTransBuilder.makeCoordinateTransform().
      • assignCoordinateTransforms

        protected void assignCoordinateTransforms()
        Assign CoordinateTransform objects to Variables and Coordinate Systems.
      • makeCoordinateTransformVariable

        protected VariableDS.Builder makeCoordinateTransformVariable​(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:
        ct - based on the CoordinateTransform
        Returns:
        the Coordinate Transform Variable. You must add it to the dataset.