Package com.kheops.jmap.spatial
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
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionOffsetTransformation(double dx, double dy) Creates a new instance of the transformation.OffsetTransformation(Point offset) Creates a new instance of the transformation. -
Method Summary
Modifier and TypeMethodDescriptionclone()Clones the current transformation.doublegetDx()Returns the translation to apply to the longitude.doublegetDy()Returns the translation to apply to the latitude.Translate the specified coordinate with the specified translation values specified at the transformation creation.
-
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
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
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
Clones the current transformation.- Specified by:
clonein interfaceTransformation- Specified by:
clonein classUnaryTransformation- Returns:
- a new transformation instance initialized with the same translation values than the current one.
-