Examples of convertTo()


Examples of ucar.nc2.units.SimpleUnit.convertTo()

    }

    if (units != null) {
      try {
        SimpleUnit unit = SimpleUnit.factoryWithExceptions(units);
        return unit.convertTo(1.0, SimpleUnit.kmUnit);
      } catch (Exception e) {
        log.error(units + " not convertible to km");
      }
    }
    return 1.0;
View Full Code Here

Examples of ucar.nc2.units.SimpleUnit.convertTo()

  }

  protected static double getMetersConversionFactor( String unitsString ) throws Exception
  {
    SimpleUnit unit = SimpleUnit.factoryWithExceptions( unitsString );
    return unit.convertTo( 1.0, SimpleUnit.meterUnit );
  }

  protected void setStartDate() {}

  protected void setEndDate() {}
View Full Code Here

Examples of ucar.nc2.units.SimpleUnit.convertTo()

     * @throws Exception _more_
     */
    protected static double getMetersConversionFactor(
            String unitsString) throws Exception {
        SimpleUnit unit = SimpleUnit.factoryWithExceptions(unitsString);
        return unit.convertTo(1.0, SimpleUnit.meterUnit);
    }

    /**
     * _more_
     */
 
View Full Code Here

Examples of ucar.nc2.units.SimpleUnit.convertTo()

  }

  protected static double getMetersConversionFactor( String unitsString ) throws Exception
{
    SimpleUnit unit = SimpleUnit.factoryWithExceptions( unitsString );
    return unit.convertTo( 1.0, SimpleUnit.meterUnit );
  }

  public boolean syncExtend()
  {
    return false;
View Full Code Here

Examples of ucar.nc2.units.SimpleUnit.convertTo()

    this.nomTimeVName = nomTimeVName;
  }

  protected static double getMetersConversionFactor(String unitsString) throws Exception {
    SimpleUnit unit = SimpleUnit.factoryWithExceptions(unitsString);
    return unit.convertTo(1.0, SimpleUnit.meterUnit);
  }

  public Structure getRecordVar() {
    return (this.recordVar);
  }
View Full Code Here

Examples of ucar.nc2.units.SimpleUnit.convertTo()

                    if (srp.getProjUnitName() != null) {
                        try {
                            SimpleUnit unit =
                                SimpleUnit.factoryWithExceptions(
                                    srp.getProjUnitName());
                            scalef = unit.convertTo(srp.getProjUnitValue(),
                                    SimpleUnit.kmUnit);
                        } catch (Exception e) {
                            System.out.println(srp.getProjUnitValue() + " "
                                    + srp.getProjUnitName()
                                    + " not convertible to km");
View Full Code Here

Examples of ucar.nc2.units.SimpleUnit.convertTo()

        Array radialData = getRadialAxisDataCached();
        maxRadial = MAMath.getMaximum( radialData);

        String units = getRadialAxis().getUnitsString();
        SimpleUnit radialUnit = SimpleUnit.factory(units);
        maxRadial = radialUnit.convertTo(maxRadial, SimpleUnit.kmUnit); // convert to km

      } catch (IOException e) {
        e.printStackTrace();
      } catch (IllegalArgumentException e) {
        e.printStackTrace();
View Full Code Here

Examples of ucar.nc2.units.SimpleUnit.convertTo()

   * @return conversion factor : value in meters = factor * (value in units)
   * @throws Exception if not valid unit, or not convertible to meters
   */
  protected static double getMetersConversionFactor( String unitsString) throws Exception {
    SimpleUnit unit = SimpleUnit.factoryWithExceptions(unitsString);
    return unit.convertTo(1.0, SimpleUnit.meterUnit);
  }

  protected DateUnit timeUnit;

  public PointObsDatasetImpl() {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.