01: /*
02: * Geotools2 - OpenSource mapping toolkit
03: * http://geotools.org
04: * (C) 2002-2005, Geotools Project Managment Committee (PMC)
05: *
06: * This library is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU Lesser General Public
08: * License as published by the Free Software Foundation;
09: * version 2.1 of the License.
10: *
11: * This library is distributed in the hope that it will be useful,
12: * but WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14: * Lesser General Public License for more details.
15: */
16: package org.geotools.referencing.operation.builder;
17:
18: import org.geotools.geometry.DirectPosition2D;
19: import org.opengis.geometry.DirectPosition;
20:
21: /**
22: * DirectPosition associated with another DirectPosition.
23: *
24: * @since 2.4
25: * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/library/referencing/src/main/java/org/geotools/referencing/operation/builder/ExtendedPosition.java $
26: * @version $Id: ExtendedPosition.java 28966 2008-01-27 17:36:43Z acuster $
27: * @author Jan Jezek
28: */
29: class ExtendedPosition extends DirectPosition2D {
30: /** */
31: private static final long serialVersionUID = 4400395722009854165L;
32:
33: /** Coordinate associated with original coordinate. */
34: private DirectPosition mappedposition;
35:
36: /**
37: * Creates a MappedPosition
38: * @param c the original DirectPosition.
39: * @param mappedposition the associated DirectPosition.
40: */
41: public ExtendedPosition(DirectPosition c,
42: DirectPosition mappedposition) {
43: super (c);
44: this .mappedposition = mappedposition;
45: }
46:
47: /**
48: * Returns the mapped DirectPosition.
49: *
50: * @return this coordinate's associated coordinate
51: */
52: public DirectPosition getMappedposition() {
53: return mappedposition;
54: }
55:
56: /**
57: * Sets the mapped DirectPosition.
58: *
59: * @param mappedCoordinate Coordinate to be mapped to the existing one.
60: */
61: public void setMappedposition(DirectPosition mappedCoordinate) {
62: this.mappedposition = mappedCoordinate;
63: }
64: }
|