Class OffsetTransformation

java.lang.Object
com.kheops.jmap.spatial.UnaryTransformation
com.kheops.jmap.spatial.OffsetTransformation
All Implemented Interfaces:
Transformation, Serializable, Cloneable
Direct Known Subclasses:
TranslationTransformation

public class OffsetTransformation extends UnaryTransformation
See Also:
  • Constructor Details

    • OffsetTransformation

      public OffsetTransformation(double dx, double dy)
      Creates a new instance of the transformation.
      Parameters:
      dx - the translation to apply to the longitude.
      dy - the translation to apply to the latitude.
    • OffsetTransformation

      public OffsetTransformation(Point offset)
      Creates a new instance of the transformation.
      Parameters:
      offset - the translation to apply to the longitude and the latitude.
  • Method Details

    • getDx

      public double getDx()
      Returns the translation to apply to the longitude.
      Returns:
      the value of the translation.
    • getDy

      public double getDy()
      Returns the translation to apply to the latitude.
      Returns:
      the value of the translation.
    • transform

      public Geometry transform(Point point)
      Translate the specified coordinate with the specified translation values specified at the transformation creation.
      Parameters:
      point - the coordinate to translate.
      Returns:
      the translated point. The returned instance is always the same instance as point that was specified in parameter.
    • clone

      public Object clone()
      Clones the current transformation.
      Specified by:
      clone in interface Transformation
      Specified by:
      clone in class UnaryTransformation
      Returns:
      a new transformation instance initialized with the same translation values than the current one.