org.openstreetmap.osmosis.core.util
Class FixedPrecisionCoordinateConvertor

java.lang.Object
  extended by org.openstreetmap.osmosis.core.util.FixedPrecisionCoordinateConvertor

public final class FixedPrecisionCoordinateConvertor
extends java.lang.Object

Converts a double coordinate value into an equivalent integer with fixed precision.

Author:
Brett Henderson

Method Summary
static double convertToDouble(int coordinate)
          Converts the requested coordinate from fixed to double precision.
static int convertToFixed(double coordinate)
          Converts the requested coordinate from double to fixed precision.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

convertToFixed

public static int convertToFixed(double coordinate)
Converts the requested coordinate from double to fixed precision.

Parameters:
coordinate - The double coordinate value.
Returns:
The fixed coordinate value.

convertToDouble

public static double convertToDouble(int coordinate)
Converts the requested coordinate from fixed to double precision.

Parameters:
coordinate - The fixed coordinate value.
Returns:
The double coordinate value.