01: /*
02: * GeoTools - OpenSource mapping toolkit
03: * http://geotools.org
04: * (C) 2004-2006, GeoTools Project Managment Committee (PMC)
05: * (C) 2004, Institut de Recherche pour le Développement
06: *
07: * This library is free software; you can redistribute it and/or
08: * modify it under the terms of the GNU Lesser General Public
09: * License as published by the Free Software Foundation;
10: * version 2.1 of the License.
11: *
12: * This library is distributed in the hope that it will be useful,
13: * but WITHOUT ANY WARRANTY; without even the implied warranty of
14: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15: * Lesser General Public License for more details.
16: *
17: * This package contains documentation from OpenGIS specifications.
18: * OpenGIS consortium's work is fully acknowledged here.
19: */
20: package org.geotools.referencing.operation;
21:
22: // J2SE dependencies
23: import java.util.Map;
24:
25: // OpenGIS dependencies
26: import org.opengis.referencing.crs.CoordinateReferenceSystem;
27: import org.opengis.referencing.operation.MathTransform;
28: import org.opengis.referencing.operation.Transformation;
29: import org.opengis.referencing.operation.OperationMethod;
30:
31: /**
32: * An operation on coordinates that usually includes a change of Datum. The parameters
33: * of a coordinate transformation are empirically derived from data containing the coordinates
34: * of a series of points in both coordinate reference systems. This computational process
35: * is usually "over-determined", allowing derivation of error (or accuracy) estimates
36: * for the transformation. Also, the stochastic nature of the parameters may result
37: * in multiple (different) versions of the same coordinate transformation.
38: *
39: * @since 2.1
40: * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/library/referencing/src/main/java/org/geotools/referencing/operation/DefaultTransformation.java $
41: * @version $Id: DefaultTransformation.java 20874 2006-08-07 10:00:01Z jgarnett $
42: * @author Martin Desruisseaux
43: *
44: * @see DefaultConversion
45: */
46: public class DefaultTransformation extends DefaultOperation implements
47: Transformation {
48: /**
49: * Serial number for interoperability with different versions.
50: */
51: private static final long serialVersionUID = -7486704846151648971L;
52:
53: /**
54: * Constructs a transformation from a set of properties. The properties given in argument
55: * follow the same rules than for the {@link AbstractCoordinateOperation} constructor.
56: *
57: * @param properties Set of properties. Should contains at least <code>"name"</code>.
58: * @param sourceCRS The source CRS.
59: * @param targetCRS The target CRS.
60: * @param transform Transform from positions in the {@linkplain #getSourceCRS source CRS}
61: * to positions in the {@linkplain #getTargetCRS target CRS}.
62: * @param method The operation method.
63: */
64: public DefaultTransformation(final Map properties,
65: final CoordinateReferenceSystem sourceCRS,
66: final CoordinateReferenceSystem targetCRS,
67: final MathTransform transform, final OperationMethod method) {
68: super (properties, sourceCRS, targetCRS, transform, method);
69: if (false) {
70: // The EPSG database do not always defines an operation version.
71: // Consequently, we relax the rule saying that version is mandatory.
72: ensureNonNull(OPERATION_VERSION_KEY, operationVersion);
73: }
74: }
75: }
|