001: /*
002: * GeoTools - OpenSource mapping toolkit
003: * http://geotools.org
004: * (C) 2004-2006, GeoTools Project Managment Committee (PMC)
005: *
006: * This library is free software; you can redistribute it and/or
007: * modify it under the terms of the GNU Lesser General Public
008: * License as published by the Free Software Foundation;
009: * version 2.1 of the License.
010: *
011: * This library is distributed in the hope that it will be useful,
012: * but WITHOUT ANY WARRANTY; without even the implied warranty of
013: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
014: * Lesser General Public License for more details.
015: */
016: package org.geotools.referencing.factory.wms;
017:
018: // OpenGIS dependencies
019: import org.opengis.parameter.ParameterValueGroup;
020:
021: /**
022: * Auto Equirectangular ({@code AUTO:42004}).
023: * In the notation below, "<code>${var}</code>" denotes a reference to the value of a variable
024: * "{@code var}". The variables "{@code lat0}" and "{@code lon0}" are the central point of the
025: * projection appearing in the CRS parameter of the map request.
026: *
027: * <pre>
028: * PROJCS["WGS 84 / Auto Equirectangular",
029: * GEOGCS["WGS 84",
030: * DATUM["WGS_1984",
031: * SPHEROID["WGS_1984", 6378137, 298.257223563]],
032: * PRIMEM["Greenwich", 0],
033: * UNIT["Decimal_Degree", 0.0174532925199433]],
034: * PROJECTION["Equirectangular"],
035: * PARAMETER["Latitude_of_Origin", 0],
036: * PARAMETER["Central_Meridian", ${central_meridian}],
037: * PARAMETER["Standard_Parallel_1", ${standard_parallel}],
038: * UNIT["Meter", 1]]
039: * </pre>
040: *
041: * Where:
042: *
043: * <pre>
044: * ${standard_parallel} = ${lat0}
045: * ${central_meridian} = ${lon0}
046: * </pre>
047: *
048: * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/library/referencing/src/main/java/org/geotools/referencing/factory/wms/Auto42004.java $
049: * @version $Id: Auto42004.java 20874 2006-08-07 10:00:01Z jgarnett $
050: * @author Jody Garnett
051: * @author Rueben Schulz
052: * @author Martin Desruisseaux
053: */
054: final class Auto42004 extends Factlet {
055: /**
056: * A shared (thread-safe) instance.
057: */
058: public static final Auto42004 DEFAULT = new Auto42004();
059:
060: /**
061: * Do not allows instantiation except the {@link #DEFAULT} constant.
062: */
063: private Auto42004() {
064: }
065:
066: /**
067: * {@inheritDoc}
068: */
069: public int code() {
070: return 42004;
071: }
072:
073: /**
074: * {@inheritDoc}
075: */
076: public String getName() {
077: return "WGS 84 / Auto Equirectangular";
078: }
079:
080: /**
081: * {@inheritDoc}
082: */
083: public String getClassification() {
084: return "Equirectangular";
085: }
086:
087: /**
088: * {@inheritDoc}
089: */
090: protected void setProjectionParameters(
091: final ParameterValueGroup parameters, final Code code) {
092: final double centralMeridian = code.longitude;
093: final double standardParallel1 = code.latitude;
094:
095: parameters.parameter("central_meridian").setValue(
096: centralMeridian);
097: parameters.parameter("latitude_of_origin").setValue(0.0);
098: parameters.parameter("standard_parallel_1").setValue(
099: standardParallel1);
100: }
101: }
|