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.OperationMethod;
28: import org.opengis.referencing.operation.MathTransform;
29: import org.opengis.referencing.operation.Conversion;
30: import org.opengis.referencing.operation.Projection;
31:
32: /**
33: * A {@linkplain DefaultConversion conversion} transforming
34: * (<var>longitude</var>,<var>latitude</var>) coordinates to cartesian coordinates
35: * (<var>x</var>,<var>y</var>).
36: *
37: * <P>An unofficial list of projections and their parameters can
38: * be found <A HREF="http://www.remotesensing.org/geotiff/proj_list/">there</A>.
39: * Most projections expect the following parameters:
40: * <code>"central_meridian"</code> (default to 0),
41: * <code>"latitude_of_origin"</code> (default to 0),
42: * <code>"scale_factor"</code> (default to 1),
43: * <code>"false_easting"</code> (default to 0) and
44: * <code>"false_northing"</code> (default to 0).</P>
45: *
46: * @since 2.1
47: * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/library/referencing/src/main/java/org/geotools/referencing/operation/DefaultProjection.java $
48: * @version $Id: DefaultProjection.java 20874 2006-08-07 10:00:01Z jgarnett $
49: * @author Martin Desruisseaux
50: *
51: * @see org.geotools.referencing.crs.DefaultProjectedCRS
52: * @see <A HREF="http://mathworld.wolfram.com/MapProjection.html">Map projections on MathWorld</A>
53: */
54: public class DefaultProjection extends DefaultConversion implements
55: Projection {
56: /**
57: * Serial number for interoperability with different versions.
58: */
59: private static final long serialVersionUID = -7176751851369816864L;
60:
61: /**
62: * Constructs a new projection with the same values than the specified one, together with the
63: * specified source and target CRS. While the source conversion can be an arbitrary one, it is
64: * typically a {@linkplain DefiningConversion defining conversion}.
65: *
66: * @param conversion The defining conversion.
67: * @param sourceCRS The source CRS.
68: * @param targetCRS The target CRS.
69: * @param transform Transform from positions in the {@linkplain #getSourceCRS source CRS}
70: * to positions in the {@linkplain #getTargetCRS target CRS}.
71: */
72: public DefaultProjection(final Conversion conversion,
73: final CoordinateReferenceSystem sourceCRS,
74: final CoordinateReferenceSystem targetCRS,
75: final MathTransform transform) {
76: super (conversion, sourceCRS, targetCRS, transform);
77: }
78:
79: /**
80: * Constructs a projection from a set of properties. The properties given in argument
81: * follow the same rules than for the {@link AbstractCoordinateOperation} constructor.
82: *
83: * @param properties Set of properties. Should contains at least <code>"name"</code>.
84: * @param sourceCRS The source CRS, or {@code null} if not available.
85: * @param targetCRS The target CRS, or {@code null} if not available.
86: * @param transform Transform from positions in the {@linkplain #getSourceCRS source coordinate
87: * reference system} to positions in the {@linkplain #getTargetCRS target
88: * coordinate reference system}.
89: * @param method The operation method.
90: */
91: public DefaultProjection(final Map properties,
92: final CoordinateReferenceSystem sourceCRS,
93: final CoordinateReferenceSystem targetCRS,
94: final MathTransform transform, final OperationMethod method) {
95: super(properties, sourceCRS, targetCRS, transform, method);
96: }
97: }
|