/* * Geotools 2 - OpenSource mapping toolkit * (C) 2003, Geotools Project Managment Committee (PMC) * (C) 2002, Institut de Recherche pour le Développement * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package org.geotools.ct; /** * A one dimensional, identity transform. Output values are identical to input values. * This class is really a special case of {@link LinearTransform1D} optimized for speed. * * @source $URL$ * @version $Id$ * @author Martin Desruisseaux * * @deprecated Replaced by {@link org.geotools.referencing.operation.IdentityTransform1D} * in the org.geotools.referencing.operation.transform package. */ final class IdentityTransform1D extends LinearTransform1D { /** * Serial number for interoperability with different versions. */ private static final long serialVersionUID = -7378774584053573789L; /** * The shared instance of the identity transform. */ public static final LinearTransform1D ONE = new IdentityTransform1D(); /** * Construct a new identity transform. */ private IdentityTransform1D() { super(1, 0); } /** * Transforms the specified value. */ public double transform(double value) { return value; } /** * Transforms a list of coordinate point ordinal values. */ public void transform(final float[] srcPts, int srcOff, final float[] dstPts, int dstOff, int numPts) { System.arraycopy(srcPts, srcOff, dstPts, dstOff, numPts); } /** * Transforms a list of coordinate point ordinal values. */ public void transform(final double[] srcPts, int srcOff, final double[] dstPts, int dstOff, int numPts) { System.arraycopy(srcPts, srcOff, dstPts, dstOff, numPts); } }