Class MappedPosition
- Object
-
- MappedPosition
-
- All Implemented Interfaces:
Serializable
public class MappedPosition extends Object implements Serializable
An association between a source and target direct positions. Accuracy information and comments can optionnaly be attached.- Since:
- 2.4
- Author:
- Jan Jezek, Martin Desruisseaux
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MappedPosition(int dimension)MappedPosition(Position source, Position target)Creates a mapped position from the specified direct positions.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object object)Compares this mapped position with the specified object for equality.doublegetAccuracy()Returns an estimation of mapping accuracy in units of target CRS axis, orDouble.NaNif unknow.StringgetComments()Returns the comments attached to this mapping, ornullif none.PositiongetSource()Returns the source direct position.PositiongetTarget()Returns the target direct position.inthashCode()Returns a hash code value for this mapped position.voidsetAccuracy(double accuracy)Set the accuracy.voidsetComments(String comments)Set the comments attached to this mapping.voidsetSource(Position point)Set the source direct position to the specified value.voidsetTarget(Position point)Set the target direct position to the specified value.StringtoString()Returns a string representation of this mapped position.
-
-
-
Method Detail
-
getSource
public Position getSource()
Returns the source direct position. For performance reasons, the current implementation returns a reference to the internal object. However users should avoid to modify directly the returned position and usesetSource(org.geotools.api.geometry.Position)instead.
-
setSource
public void setSource(Position point)
Set the source direct position to the specified value.
-
getTarget
public Position getTarget()
Returns the target direct position. For performance reasons, the current implementation returns a reference to the internal object. However users should avoid to modify directly the returned position and usesetTarget(org.geotools.api.geometry.Position)instead.
-
setTarget
public void setTarget(Position point)
Set the target direct position to the specified value.
-
getComments
public String getComments()
Returns the comments attached to this mapping, ornullif none.
-
setComments
public void setComments(String comments)
Set the comments attached to this mapping. May benullif none.
-
getAccuracy
public double getAccuracy()
Returns an estimation of mapping accuracy in units of target CRS axis, orDouble.NaNif unknow.
-
setAccuracy
public void setAccuracy(double accuracy)
Set the accuracy.
-
hashCode
public int hashCode()
Returns a hash code value for this mapped position.
-
equals
public boolean equals(Object object)
Compares this mapped position with the specified object for equality.
-
-