Class ConvertUnits<T extends FeatureInput>

Type Parameters:
T - the type of FeatureInput this feature operates on

public class ConvertUnits<T extends FeatureInput> extends FeatureUnaryGeneric<T>
Converts a feature value from one unit type to another.

This class extends FeatureUnaryGeneric to provide unit conversion functionality for feature values using SpatialUnits.

  • Constructor Details

    • ConvertUnits

      public ConvertUnits()
  • Method Details

    • calculate

      protected double calculate(FeatureCalculationInput<T> input) throws FeatureCalculationException
      Description copied from class: Feature
      Calculates a value for some input.
      Specified by:
      calculate in class Feature<T extends FeatureInput>
      Parameters:
      input - the input to the calculation.
      Returns:
      the result of the calculation.
      Throws:
      FeatureCalculationException - if the calculation cannot successfully complete.
    • getUnitTypeFrom

      public String getUnitTypeFrom()
      The unit type to convert from. An empty string means no conversion is applied when converting from this unit.
    • setUnitTypeFrom

      public void setUnitTypeFrom(String unitTypeFrom)
      The unit type to convert from. An empty string means no conversion is applied when converting from this unit.
    • getUnitTypeTo

      public String getUnitTypeTo()
      The unit type to convert to. An empty string means no conversion is applied when converting to this unit.
    • setUnitTypeTo

      public void setUnitTypeTo(String unitTypeTo)
      The unit type to convert to. An empty string means no conversion is applied when converting to this unit.