org.geotools.referencing.operation.builder
Class MappedPosition

Object
  extended by 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
MappedPosition(DirectPosition source, DirectPosition target)
          Creates a mapped position from the specified direct positions.
MappedPosition(int dimension)
          Creates a mapped position with source and target position of the specified dimension.
 
Method Summary
 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, or Double.NaN if unknow.
 String getComments()
          Returns the comments attached to this mapping, or null if none.
 DirectPosition getSource()
          Returns the source direct position.
 DirectPosition 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(DirectPosition point)
          Set the source direct position to the specified value.
 void setTarget(DirectPosition point)
          Set the target direct position to the specified value.
 String toString()
          Returns a string representation of this mapped position.
 
Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MappedPosition

public MappedPosition(int dimension)
Creates a mapped position with source and target position of the specified dimension. The initial coordinate values are 0.


MappedPosition

public MappedPosition(DirectPosition source,
                      DirectPosition target)
Creates a mapped position from the specified direct positions.

Parameters:
source - The original direct position.
target - The associated direct position.
Method Detail

getSource

public DirectPosition 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 use setSource(org.opengis.geometry.DirectPosition) instead.


setSource

public void setSource(DirectPosition point)
Set the source direct position to the specified value.


getTarget

public DirectPosition 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 use setTarget(org.opengis.geometry.DirectPosition) instead.


setTarget

public void setTarget(DirectPosition point)
Set the target direct position to the specified value.


getComments

public String getComments()
Returns the comments attached to this mapping, or null if none.


setComments

public void setComments(String comments)
Set the comments attached to this mapping. May be null if none.


getAccuracy

public double getAccuracy()
Returns an estimation of mapping accuracy in units of target CRS axis, or Double.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.

Overrides:
hashCode in class Object

equals

public boolean equals(Object object)
Compares this mapped position with the specified object for equality.

Overrides:
equals in class Object

toString

public String toString()
Returns a string representation of this mapped position.

Overrides:
toString in class Object


Copyright © 1996-2014 Geotools. All Rights Reserved.