01: /*
02: * GeoTools - OpenSource mapping toolkit
03: * http://geotools.org
04: * (C) 2004-2006, 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.factory.wms;
17:
18: // OpenGIS dependencies
19: import org.opengis.parameter.ParameterValueGroup;
20:
21: /**
22: * Auto Mollweide ({@code AUTO:42005}).
23: * In the notation below, "<code>${var}</code>" denotes a reference to the value of a variable
24: * "{@code var}". The variables "{@code lat0}" and "{@code lon0}" are the central point of the
25: * projection appearing in the CRS parameter of the map request.
26: *
27: * <pre>
28: * PROJCS["WGS 84 / Auto Mollweide",
29: * GEOGCS["WGS 84",
30: * DATUM["WGS_1984",
31: * SPHEROID["WGS_1984", 6378137, 298.257223563]],
32: * PRIMEM["Greenwich", 0],
33: * UNIT["Decimal_Degree", 0.0174532925199433]],
34: * PROJECTION["Mollweide"],
35: * PARAMETER["Central_Meridian", ${central_meridian}],
36: * UNIT["Meter", 1]]
37: * </pre>
38: *
39: * Where:
40: *
41: * <pre>
42: * ${central_meridian} = ${lon0}
43: * </pre>
44: *
45: * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/library/referencing/src/main/java/org/geotools/referencing/factory/wms/Auto42005.java $
46: * @version $Id: Auto42005.java 20874 2006-08-07 10:00:01Z jgarnett $
47: * @author Jody Garnett
48: * @author Rueben Schulz
49: * @author Martin Desruisseaux
50: */
51: final class Auto42005 extends Factlet {
52: /**
53: * A shared (thread-safe) instance.
54: */
55: public static final Auto42005 DEFAULT = new Auto42005();
56:
57: /**
58: * Do not allows instantiation except the {@link #DEFAULT} constant.
59: */
60: private Auto42005() {
61: }
62:
63: /**
64: * {@inheritDoc}
65: */
66: public int code() {
67: return 42005;
68: }
69:
70: /**
71: * {@inheritDoc}
72: */
73: public String getName() {
74: return "WGS 84 / Auto Mollweider";
75: }
76:
77: /**
78: * {@inheritDoc}
79: */
80: public String getClassification() {
81: return "Mollweide";
82: }
83:
84: /**
85: * {@inheritDoc}
86: */
87: protected void setProjectionParameters(
88: final ParameterValueGroup parameters, final Code code) {
89: final double centralMeridian = code.longitude;
90:
91: parameters.parameter("central_meridian").setValue(
92: centralMeridian);
93: }
94: }
|