EllipsoidToCentricTransform changes for revisions 10795:10864

The main change in this commit does not apply to Apache SIS since the assertion code has been removed. Other changes are actually encoding problems.

Command line:

svn diff --extensions "--unified --ignore-space-change --ignore-all-space --ignore-eol-style" -r10795:10864 https://svn.osgeo.org/geotools/trunk/modules/library/referencing/src/main/java/org/geotools/referencing/operation/transform/GeocentricTransform.java
Revision 10795Revision 10864
/*
 * Geotools 2 - OpenSource mapping toolkit
 * (C) 2003, Geotools Project Managment Committee (PMC)
 * (C) 2001, 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
/*
 * Geotools 2 - OpenSource mapping toolkit
 * (C) 2003, Geotools Project Managment Committee (PMC)
 * (C) 2001, 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
// J2SE dependencies
import java.io.IOException;
import java.io.Serializable;
import java.io.ObjectInputStream;
import java.util.Collections;
import javax.units.Converter;
import javax.units.Unit;
import javax.units.SI;

// OpenGIS dependencies
import org.opengis.referencing.datum.Ellipsoid;
import org.opengis.parameter.ParameterValue;
import org.opengis.parameter.ParameterDescriptor;
import org.opengis.parameter.ParameterValueGroup;
import org.opengis.parameter.ParameterDescriptorGroup;
import org.opengis.parameter.ParameterNotFoundException;
import org.opengis.referencing.operation.MathTransform;

// Geotools dependencies
import org.geotools.metadata.citation.Citation;
import org.geotools.referencing.Identifier;
import org.geotools.referencing.operation.MathTransformProvider;
import org.geotools.parameter.ParameterReal;
import org.geotools.resources.cts.Resources;
import org.geotools.resources.cts.ResourceKeys;


/**
 * Transforms three dimensional {@linkplain org.geotools.referencing.crs.GeographicCRS geographic}
 * points to {@linkplain org.geotools.referencing.crs.GeocentricCRS geocentric} coordinate points.
// J2SE dependencies
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.Serializable;
import java.util.Collections;

import javax.units.Converter;
import javax.units.SI;
import javax.units.Unit;

import org.geotools.metadata.citation.Citation;
import org.geotools.parameter.ParameterReal;
import org.geotools.referencing.Identifier;
import org.geotools.referencing.operation.MathTransformProvider;
import org.geotools.resources.cts.ResourceKeys;
import org.geotools.resources.cts.Resources;
import org.opengis.parameter.ParameterDescriptor;
import org.opengis.parameter.ParameterDescriptorGroup;
import org.opengis.parameter.ParameterNotFoundException;
import org.opengis.parameter.ParameterValue;
import org.opengis.parameter.ParameterValueGroup;
import org.opengis.referencing.datum.Ellipsoid;
import org.opengis.referencing.operation.MathTransform;


/**
 * Transforms three dimensional {@linkplain org.geotools.referencing.crs.GeographicCRS geographic}
 * points to {@linkplain org.geotools.referencing.crs.GeocentricCRS geocentric} coordinate points.
private final double b;

/**
 * Square of semi-major axis (<var>a</var>²).
 */
private final double a2;

/**
 * Square of semi-minor axis (<var>b</var>²).
 */
private final double b2;
private final double b;

/**
 * Square of semi-major axis (<var>a</var>�).
 */
private final double a2;

/**
 * Square of semi-minor axis (<var>b</var>�).
 */
private final double b2;
final int dimSource = getSourceDimensions();
final boolean hasHeight = (dimSource>=3);
boolean   computeHeight = hasHeight;
assert computeHeight=true; // Intentional side effect
if (srcPts==dstPts && srcOff<dstOff && srcOff+numPts*dimSource>dstOff) {
    step    = -dimSource;
    srcOff -= (numPts-1)*step;
final int dimSource = getSourceDimensions();
final boolean hasHeight = (dimSource>=3);
boolean   computeHeight = hasHeight;
assert (computeHeight=true)==true; // Intentional side effect FIXME: are you insane?
if (srcPts==dstPts && srcOff<dstOff && srcOff+numPts*dimSource>dstOff) {
    step    = -dimSource;
    srcOff -= (numPts-1)*step;
final int dimSource = getSourceDimensions();
final boolean hasHeight = (dimSource>=3);
boolean   computeHeight = hasHeight;
assert computeHeight=true; // Intentional side effect
if (srcPts==dstPts && srcOff<dstOff && srcOff+numPts*dimSource>dstOff) {
    step    = -dimSource;
    srcOff -= (numPts-1)*step;
final int dimSource = getSourceDimensions();
final boolean hasHeight = (dimSource>=3);
boolean   computeHeight = hasHeight;
assert (computeHeight=true) == true; // Intentional side effect FIXME: are you insane?
if (srcPts==dstPts && srcOff<dstOff && srcOff+numPts*dimSource>dstOff) {
    step    = -dimSource;
    srcOff -= (numPts-1)*step;