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 boolean
equals(Object object)
Compares this mapped position with the specified object for equality.double
getAccuracy()
Returns an estimation of mapping accuracy in units of target CRS axis, orDouble.NaN
if unknow.String
getComments()
Returns the comments attached to this mapping, ornull
if none.Position
getSource()
Returns the source direct position.Position
getTarget()
Returns the target direct position.int
hashCode()
Returns a hash code value for this mapped position.void
setAccuracy(double accuracy)
Set the accuracy.void
setComments(String comments)
Set the comments attached to this mapping.void
setSource(Position point)
Set the source direct position to the specified value.void
setTarget(Position point)
Set the target direct position to the specified value.String
toString()
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, ornull
if none.
-
setComments
public void setComments(String comments)
Set the comments attached to this mapping. May benull
if none.
-
getAccuracy
public double getAccuracy()
Returns an estimation of mapping accuracy in units of target CRS axis, orDouble.NaN
if 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.
-
-