MapProjection changes for revisions 23992:23993

Most changes in this commit seem to be the result of some "auto reformat" tool execution. The Java - GeoAPI - GeoTools import ordering is altered, imports used only in Javadoc are lost and the encoding of non-ASCII characters is broken. This change has been reverted, except for the removal of really unused imports which are kept removed.

The commit contains also information which can be retrieved from the following sources:

Removing those information cause a test failures, since the JUnit tests compare the name declared in the code with the name declared in the EPSG database. Test failures are fixed by re-introducing the parameter names as indicated in the test error message.

Command line:

svn diff --extensions "--unified --ignore-space-change --ignore-all-space --ignore-eol-style" -r23992:23993 https://svn.osgeo.org/geotools/trunk/modules/library/referencing/src/main/java/org/geotools/referencing/operation/projection/MapProjection.java
Revision 23992Revision 23993
*    http://geotools.org
*
*   (C) 2003-2006, Geotools Project Managment Committee (PMC)
*   (C) 2001, Institut de Recherche pour le Développement
*   (C) 2000, Frank Warmerdam
*   (C) 1999, Fisheries and Oceans Canada
*
*    http://geotools.org
*
*   (C) 2003-2006, Geotools Project Managment Committee (PMC)
*   (C) 2001, Institut de Recherche pour le D�veloppement
*   (C) 2000, Frank Warmerdam
*   (C) 1999, Fisheries and Oceans Canada
*
* @since 2.0
* @version $Id$
* @source $URL$
* @author André Gosselin
* @author Martin Desruisseaux
* @author Rueben Schulz
*
* @since 2.0
* @version $Id$
* @source $URL$
* @author Andr� Gosselin
* @author Martin Desruisseaux
* @author Rueben Schulz
*
protected final double excentricity;

/**
 * The square of excentricity: e² = (a²-b²)/a² where
 * <var>e</var> is the {@linkplain #excentricity excentricity},
 * <var>a</var> is the {@linkplain #semiMajor semi major} axis length and
 * <var>b</var> is the {@linkplain #semiMinor semi minor} axis length.
protected final double excentricity;

/**
 * The square of excentricity: e� = (a�-b�)/a� where
 * <var>e</var> is the {@linkplain #excentricity excentricity},
 * <var>a</var> is the {@linkplain #semiMajor semi major} axis length and
 * <var>b</var> is the {@linkplain #semiMinor semi minor} axis length.
*         <ul>
*           <li>"semi_major" (mandatory: no default)</li>
*           <li>"semi_minor" (mandatory: no default)</li>
*           <li>"central_meridian"   (default to 0°)</li>
*           <li>"latitude_of_origin" (default to 0°)</li>
*           <li>"scale_factor"       (default to 1 )</li>
*           <li>"false_easting"      (default to 0 )</li>
*           <li>"false_northing"     (default to 0 )</li>
*         <ul>
*           <li>"semi_major" (mandatory: no default)</li>
*           <li>"semi_minor" (mandatory: no default)</li>
*           <li>"central_meridian"   (default to 0�)</li>
*           <li>"latitude_of_origin" (default to 0�)</li>
*           <li>"scale_factor"       (default to 1 )</li>
*           <li>"false_easting"      (default to 0 )</li>
*           <li>"false_northing"     (default to 0 )</li>
/*
 * Makes sure that the longitude before conversion stay within +/- PI radians. As a
 * special case, we do not check the range if no rotation were applied on the longitude.
 * This is because the user may have a big area ranging from -180° to +180°. With the
 * slight rounding errors related to map projections, the 180° longitude may be slightly
 * over the limit. Rolling the longitude would changes its sign. For example a bounding
 * box from 30° to +180° would become 30° to -180°, which is probably not what the user
 * wanted.
 */
ptDst = transformNormalized(centralMeridian!=0 ?
/*
 * Makes sure that the longitude before conversion stay within +/- PI radians. As a
 * special case, we do not check the range if no rotation were applied on the longitude.
 * This is because the user may have a big area ranging from -180� to +180�. With the
 * slight rounding errors related to map projections, the 180� longitude may be slightly
 * over the limit. Rolling the longitude would changes its sign. For example a bounding
 * box from 30� to +180� would become 30� to -180�, which is probably not what the user
 * wanted.
 */
ptDst = transformNormalized(centralMeridian!=0 ?
    throws ProjectionException
{
    /*
     * Vérifie s'il faudra parcourir le tableau en sens inverse.
     * Ce sera le cas si les tableaux source et destination se
     * chevauchent et que la destination est après la source.
     */
    final boolean reverse = (src==dest && srcOffset<dstOffset &&
                             srcOffset+(2*numPts) > dstOffset);
    throws ProjectionException
{
    /*
     * V�rifie s'il faudra parcourir le tableau en sens inverse.
     * Ce sera le cas si les tableaux source et destination se
     * chevauchent et que la destination est apr�s la source.
     */
    final boolean reverse = (src==dest && srcOffset<dstOffset &&
                             srcOffset+(2*numPts) > dstOffset);
/*
 * Makes sure that the longitude after conversion stay within +/- PI radians. As a
 * special case, we do not check the range if no rotation were applied on the longitude.
 * This is because the user may have a big area ranging from -180° to +180°. With the
 * slight rounding errors related to map projections, the 180° longitude may be slightly
 * over the limit. Rolling the longitude would changes its sign. For example a bounding
 * box from 30° to +180° would become 30° to -180°, which is probably not what the user
 * wanted.
 */
final double x = Math.toDegrees(centralMeridian!=0 ?
/*
 * Makes sure that the longitude after conversion stay within +/- PI radians. As a
 * special case, we do not check the range if no rotation were applied on the longitude.
 * This is because the user may have a big area ranging from -180� to +180�. With the
 * slight rounding errors related to map projections, the 180� longitude may be slightly
 * over the limit. Rolling the longitude would changes its sign. For example a bounding
 * box from 30� to +180� would become 30� to -180�, which is probably not what the user
 * wanted.
 */
final double x = Math.toDegrees(centralMeridian!=0 ?
        throws TransformException
{
    /*
     * Vérifie s'il faudra parcourir le tableau en sens inverse.
     * Ce sera le cas si les tableaux source et destination se
     * chevauchent et que la destination est après la source.
     */
    final boolean reverse = (src==dest && srcOffset<dstOffset &&
                             srcOffset+(2*numPts) > dstOffset);
        throws TransformException
{
    /*
     * V�rifie s'il faudra parcourir le tableau en sens inverse.
     * Ce sera le cas si les tableaux source et destination se
     * chevauchent et que la destination est apr�s la source.
     */
    final boolean reverse = (src==dest && srcOffset<dstOffset &&
                             srcOffset+(2*numPts) > dstOffset);
}

/**
 * Compute function <code>f(s,c,e²) = c/sqrt(1 - s²&times;e²)</code> needed for the true scale
 * latitude (Snyder 14-15), where <var>s</var> and <var>c</var> are the sine and cosine of
 * the true scale latitude, and <var>e²</var> is the {@linkplain #excentricitySquared
 * eccentricity squared}.
 */
final double msfn(final double s, final double c) {
}

/**
 * Compute function <code>f(s,c,e�) = c/sqrt(1 - s�&times;e�)</code> needed for the true scale
 * latitude (Snyder 14-15), where <var>s</var> and <var>c</var> are the sine and cosine of
 * the true scale latitude, and <var>e�</var> is the {@linkplain #excentricitySquared
 * eccentricity squared}.
 */
final double msfn(final double s, final double c) {
/**
 * The operation parameter descriptor for the {@linkplain #centralMeridian central meridian}
 * parameter value. Valid values range is from -180 to 180°. Default value is 0.
 */
public static final ParameterDescriptor CENTRAL_MERIDIAN = createDescriptor(
        new NamedIdentifier[] {
/**
 * The operation parameter descriptor for the {@linkplain #centralMeridian central meridian}
 * parameter value. Valid values range is from -180 to 180�. Default value is 0.
 */
public static final ParameterDescriptor CENTRAL_MERIDIAN = createDescriptor(
        new NamedIdentifier[] {
/**
 * The operation parameter descriptor for the {@linkplain #latitudeOfOrigin latitude of origin}
 * parameter value. Valid values range is from -90 to 90°. Default value is 0.
 */
public static final ParameterDescriptor LATITUDE_OF_ORIGIN = createDescriptor(
        new NamedIdentifier[] {
/**
 * The operation parameter descriptor for the {@linkplain #latitudeOfOrigin latitude of origin}
 * parameter value. Valid values range is from -90 to 90�. Default value is 0.
 */
public static final ParameterDescriptor LATITUDE_OF_ORIGIN = createDescriptor(
        new NamedIdentifier[] {
/**
 * The operation parameter descriptor for the {@linkplain Mercator#standardParallel standard
 * parallel} parameter value. Valid values range is from -90 to 90°. Default value is 0.
 */
public static final ParameterDescriptor STANDARD_PARALLEL = createDescriptor(
        new NamedIdentifier[] {
/**
 * The operation parameter descriptor for the {@linkplain Mercator#standardParallel standard
 * parallel} parameter value. Valid values range is from -90 to 90�. Default value is 0.
 */
public static final ParameterDescriptor STANDARD_PARALLEL = createDescriptor(
        new NamedIdentifier[] {
/**
 * The operation parameter descriptor for the standard parallel 1 parameter value.
 * Valid values range is from -90 to 90°. Default value is 0.
 */
public static final ParameterDescriptor STANDARD_PARALLEL_1 = createDescriptor(
        new NamedIdentifier[] {
/**
 * The operation parameter descriptor for the standard parallel 1 parameter value.
 * Valid values range is from -90 to 90�. Default value is 0.
 */
public static final ParameterDescriptor STANDARD_PARALLEL_1 = createDescriptor(
        new NamedIdentifier[] {
/**
 * The operation parameter descriptor for the standard parallel 2 parameter value.
 * Valid values range is from -90 to 90°. Default value is 0.
 */
public static final ParameterDescriptor STANDARD_PARALLEL_2 = createOptionalDescriptor(
        new NamedIdentifier[] {
/**
 * The operation parameter descriptor for the standard parallel 2 parameter value.
 * Valid values range is from -90 to 90�. Default value is 0.
 */
public static final ParameterDescriptor STANDARD_PARALLEL_2 = createOptionalDescriptor(
        new NamedIdentifier[] {
    new NamedIdentifier(Citations.OGC,     "false_easting"),
    new NamedIdentifier(Citations.EPSG,    "False easting"),
    new NamedIdentifier(Citations.EPSG,    "Easting at false origin"),
    new NamedIdentifier(Citations.GEOTIFF, "FalseEasting")
},
0, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, SI.METER);
    new NamedIdentifier(Citations.OGC,     "false_easting"),
    new NamedIdentifier(Citations.EPSG,    "False easting"),
    new NamedIdentifier(Citations.EPSG,    "Easting at false origin"),
    new NamedIdentifier(Citations.EPSG,    "Easting at projection centre"),
    new NamedIdentifier(Citations.GEOTIFF, "FalseEasting")
},
0, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, SI.METER);
    new NamedIdentifier(Citations.OGC,     "false_northing"),
    new NamedIdentifier(Citations.EPSG,    "False northing"),
    new NamedIdentifier(Citations.EPSG,    "Northing at false origin"),
    new NamedIdentifier(Citations.GEOTIFF, "FalseNorthing")
},
0, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, SI.METER);
    new NamedIdentifier(Citations.OGC,     "false_northing"),
    new NamedIdentifier(Citations.EPSG,    "False northing"),
    new NamedIdentifier(Citations.EPSG,    "Northing at false origin"),
    new NamedIdentifier(Citations.EPSG,    "Northing at projection centre"),
    new NamedIdentifier(Citations.GEOTIFF, "FalseNorthing")
},
0, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, SI.METER);