001: /*
002: * GeoTools - OpenSource mapping toolkit
003: * http://geotools.org
004: *
005: * (C) 2005-2006, Geotools Project Managment Committee (PMC)
006: *
007: * This library is free software; you can redistribute it and/or
008: * modify it under the terms of the GNU Lesser General Public
009: * License as published by the Free Software Foundation;
010: * version 2.1 of the License.
011: *
012: * This library is distributed in the hope that it will be useful,
013: * but WITHOUT ANY WARRANTY; without even the implied warranty of
014: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015: * Lesser General Public License for more details.
016: */
017: package org.geotools.referencing.operation.projection;
018:
019: // OpenGIS dependencies
020: import org.opengis.parameter.ParameterDescriptor;
021: import org.opengis.parameter.ParameterDescriptorGroup;
022: import org.opengis.parameter.ParameterNotFoundException;
023: import org.opengis.parameter.ParameterValueGroup;
024: import org.opengis.referencing.operation.ConicProjection;
025: import org.opengis.referencing.operation.MathTransform;
026:
027: // Geotools dependencies
028: import org.geotools.metadata.iso.citation.Citations;
029: import org.geotools.referencing.NamedIdentifier;
030: import org.geotools.resources.i18n.VocabularyKeys;
031: import org.geotools.resources.i18n.Vocabulary;
032:
033: /**
034: * Lambert Conical Conformal Projection using ESRI parameters.
035: * ESRI includes a {@code scale_factor} parameter.
036: *
037: * @since 2.2
038: * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/library/referencing/src/main/java/org/geotools/referencing/operation/projection/LambertConformalESRI.java $
039: * @version $Id: LambertConformalESRI.java 24384 2007-02-14 00:23:05Z desruisseaux $
040: * @author Rueben Schulz
041: * @author Martin Desruisseaux
042: */
043: public class LambertConformalESRI extends LambertConformal {
044: /**
045: * Constructs a new map projection from the supplied parameters.
046: *
047: * @param parameters The parameter values in standard units.
048: * @throws ParameterNotFoundException if a mandatory parameter is missing.
049: */
050: protected LambertConformalESRI(final ParameterValueGroup parameters)
051: throws ParameterNotFoundException {
052: super (parameters);
053: }
054:
055: /**
056: * {@inheritDoc}
057: */
058: public ParameterDescriptorGroup getParameterDescriptors() {
059: return Provider.PARAMETERS;
060: }
061:
062: //////////////////////////////////////////////////////////////////////////////////////////
063: //////////////////////////////////////////////////////////////////////////////////////////
064: //////// ////////
065: //////// PROVIDERS ////////
066: //////// ////////
067: //////////////////////////////////////////////////////////////////////////////////////////
068: //////////////////////////////////////////////////////////////////////////////////////////
069:
070: /**
071: * The {@linkplain org.geotools.referencing.operation.MathTransformProvider math transform
072: * provider} for a {@linkplain LambertConformal2SP Lambert Conformal ESRI} projection.
073: *
074: * @since 2.2
075: * @version $Id: LambertConformalESRI.java 24384 2007-02-14 00:23:05Z desruisseaux $
076: * @author Rueben Schulz
077: *
078: * @see org.geotools.referencing.operation.DefaultMathTransformFactory
079: */
080: public static final class Provider extends AbstractProvider {
081: /**
082: * The parameters group.
083: */
084: static final ParameterDescriptorGroup PARAMETERS = createDescriptorGroup(
085: new NamedIdentifier[] {
086: new NamedIdentifier(Citations.ESRI,
087: "Lambert_Conformal_Conic"),
088: new NamedIdentifier(
089: Citations.GEOTOOLS,
090: Vocabulary
091: .formatInternational(VocabularyKeys.LAMBERT_CONFORMAL_PROJECTION)) },
092: new ParameterDescriptor[] { SEMI_MAJOR, SEMI_MINOR,
093: CENTRAL_MERIDIAN, LATITUDE_OF_ORIGIN,
094: STANDARD_PARALLEL_1, STANDARD_PARALLEL_2,
095: SCALE_FACTOR, FALSE_EASTING, FALSE_NORTHING });
096:
097: /**
098: * Constructs a new provider.
099: */
100: public Provider() {
101: super (PARAMETERS);
102: }
103:
104: /**
105: * Returns the operation type for this map projection.
106: */
107: public Class getOperationType() {
108: return ConicProjection.class;
109: }
110:
111: /**
112: * Creates a transform from the specified group of parameter values.
113: *
114: * @param parameters The group of parameter values.
115: * @return The created math transform.
116: * @throws ParameterNotFoundException if a required parameter was not found.
117: */
118: protected MathTransform createMathTransform(
119: final ParameterValueGroup parameters)
120: throws ParameterNotFoundException {
121: return new LambertConformalESRI(parameters);
122: }
123: }
124: }
|