Author: desruisseaux
Date: Wed Sep 18 21:48:57 2013
New Revision: 1524587

URL: http://svn.apache.org/r1524587
Log:
Ported more code from Geotk.

Added:
    
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/AxisDirections.java
   (with props)
Modified:
    
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/AffineTransforms2D.java
    
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrices.java
    
sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java
    
sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties
    
sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties

Added: 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/AxisDirections.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/AxisDirections.java?rev=1524587&view=auto
==============================================================================
--- 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/AxisDirections.java
 (added)
+++ 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/AxisDirections.java
 [UTF-8] Wed Sep 18 21:48:57 2013
@@ -0,0 +1,177 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.internal.referencing;
+
+import java.util.Map;
+import java.util.HashMap;
+import org.opengis.referencing.cs.AxisDirection;
+import org.opengis.referencing.cs.CoordinateSystem;
+import org.apache.sis.util.Static;
+
+import static org.opengis.referencing.cs.AxisDirection.*;
+
+// Related to JDK7
+import java.util.Objects;
+
+
+/**
+ * Utilities methods related to {@link AxisDirection}.
+ *
+ * @author  Martin Desruisseaux (Geomatys)
+ * @since   0.4 (derived from geotk-3.13)
+ * @version 0.4
+ * @module
+ */
+public final class AxisDirections extends Static {
+    /**
+     * Do not allow instantiation of this class.
+     */
+    private AxisDirections() {
+    }
+
+    /**
+     * For each direction, the opposite direction.
+     */
+    private static final Map<AxisDirection,AxisDirection> opposites = new 
HashMap<>(35);
+    static {
+        opposites.put(OTHER, OTHER);
+        final AxisDirection[] dir = {
+            NORTH,            SOUTH,
+            NORTH_NORTH_EAST, SOUTH_SOUTH_WEST,
+            NORTH_EAST,       SOUTH_WEST,
+            EAST_NORTH_EAST,  WEST_SOUTH_WEST,
+            EAST,             WEST,
+            EAST_SOUTH_EAST,  WEST_NORTH_WEST,
+            SOUTH_EAST,       NORTH_WEST,
+            SOUTH_SOUTH_EAST, NORTH_NORTH_WEST,
+            UP,               DOWN,
+            FUTURE,           PAST,
+            COLUMN_POSITIVE,  COLUMN_NEGATIVE,
+            ROW_POSITIVE,     ROW_NEGATIVE,
+            DISPLAY_RIGHT,    DISPLAY_LEFT,
+            DISPLAY_DOWN,     DISPLAY_UP // y values increase toward down.
+        };
+        for (int i=0; i<dir.length; i++) {
+            if (opposites.put(dir[i], dir[i ^ 1]) != null) {
+                throw new AssertionError(i);
+            }
+        }
+    }
+
+    /**
+     * Returns the "absolute" direction of the given direction.
+     * This "absolute" operation is similar to the {@code Math.abs(int)} 
method in that "negative" directions like
+     * ({@code SOUTH}, {@code WEST}, {@code DOWN}, {@code PAST}) are changed 
for their "positive" counterparts
+     * ({@code NORTH}, {@code EAST}, {@code UP}, {@code FUTURE}).
+     * More specifically, the following conversion table is applied:
+     *
+     * <table class="compact"><tr>
+     * <td><table class="sis">
+     *   <tr>
+     *     <th width='50%'>Direction</th>
+     *     <th width='50%'>Absolute value</th>
+     *   </tr>
+     *   <tr><td width='50%'>{@code NORTH}</td> <td width='50%'>{@code 
NORTH}</td> </tr>
+     *   <tr><td width='50%'>{@code SOUTH}</td> <td width='50%'>{@code 
NORTH}</td> </tr>
+     *   <tr><td width='50%'>{@code EAST}</td>  <td width='50%'>{@code 
EAST}</td>  </tr>
+     *   <tr><td width='50%'>{@code WEST}</td>  <td width='50%'>{@code 
EAST}</td>  </tr>
+     *   <tr><td width='50%'>{@code UP}</td>    <td width='50%'>{@code 
UP}</td>    </tr>
+     *   <tr><td width='50%'>{@code DOWN}</td>  <td width='50%'>{@code 
UP}</td>    </tr>
+     * </table></td>
+     * <td width='50%'><table class="sis">
+     *   <tr>
+     *     <th width='50%'>Direction</th>
+     *     <th width='50%'>Absolute value</th>
+     *   </tr>
+     *   <tr><td width='50%'>{@code DISPLAY_RIGHT}</td> <td width='50%'>{@code 
DISPLAY_RIGHT}</td> </tr>
+     *   <tr><td width='50%'>{@code DISPLAY_LEFT}</td>  <td width='50%'>{@code 
DISPLAY_RIGHT}</td> </tr>
+     *   <tr><td width='50%'>{@code DISPLAY_UP}</td>    <td width='50%'>{@code 
DISPLAY_UP}</td>    </tr>
+     *   <tr><td width='50%'>{@code DISPLAY_DOWN}</td>  <td width='50%'>{@code 
DISPLAY_UP}</td>    </tr>
+     *   <tr><td width='50%'>{@code FUTURE}</td>        <td width='50%'>{@code 
FUTURE}</td>        </tr>
+     *   <tr><td width='50%'>{@code PAST}</td>          <td width='50%'>{@code 
FUTURE}</td>        </tr>
+     * </table></td></tr>
+     *   <tr align="center"><td width='50%'>{@code OTHER}</td><td 
width='50%'>{@code OTHER}</td></tr>
+     * </table>
+     *
+     * @param  dir The direction for which to return the absolute direction.
+     * @return The direction from the above table.
+     */
+    public static AxisDirection absolute(final AxisDirection dir) {
+        if (dir != null) {
+            final AxisDirection opposite = opposite(dir);
+            if (opposite != null) {
+                if (opposite.ordinal() < dir.ordinal()) {
+                    return opposite;
+                }
+            }
+        }
+        return dir;
+    }
+
+    /**
+     * Returns the opposite direction of the given direction. The opposite 
direction of
+     * {@code NORTH} is {@code SOUTH}, and the opposite direction of {@code 
SOUTH} is {@code NORTH}.
+     * The same applies to {@code EAST}-{@code WEST}, {@code UP}-{@code DOWN} 
and {@code FUTURE}-{@code PAST},
+     * <i>etc.</i> If the given axis direction has no opposite, then this 
method returns {@code null}.
+     *
+     * @param  dir The direction for which to return the opposite direction.
+     * @return The opposite direction, or {@code null} if none or unknown.
+     */
+    public static AxisDirection opposite(final AxisDirection dir) {
+        return opposites.get(dir);
+    }
+
+    /**
+     * Returns {@code true} if the given direction is an "opposite" direction.
+     * If this method can not determine if the given direction is an "opposite"
+     * one, then it conservatively returns {@code true}.
+     *
+     * @param  dir The direction to test, or {@code null}.
+     * @return {@code true} if the given direction is an "opposite".
+     */
+    public static boolean isOpposite(final AxisDirection dir) {
+        return Objects.equals(dir, opposite(absolute(dir)));
+    }
+
+    /**
+     * Finds the dimension of an axis having the given direction or its 
opposite.
+     * If more than one axis has the given direction, only the first 
occurrence is returned.
+     * If both the given direction and its opposite exist, then the dimension 
for the given
+     * direction has precedence over the opposite direction.
+     *
+     * @param  cs The coordinate system to inspect, or {@code null}.
+     * @param  direction The direction of the axis to search.
+     * @return The dimension of the axis using the given direction or its 
opposite, or -1 if none.
+     */
+    public static int indexOf(final CoordinateSystem cs, final AxisDirection 
direction) {
+        int fallback = -1;
+        if (cs != null) {
+            final AxisDirection opposite = opposite(direction);
+            final int dimension = cs.getDimension();
+            for (int i=0; i<dimension; i++) {
+                final AxisDirection d = cs.getAxis(i).getDirection();
+                if (direction.equals(d)) {
+                    return i;
+                }
+                if (fallback < 0 && opposite != null && opposite.equals(d)) {
+                    fallback = i;
+                }
+            }
+        }
+        return fallback;
+    }
+}

Propchange: 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/AxisDirections.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/AxisDirections.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain;charset=UTF-8

Modified: 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/AffineTransforms2D.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/AffineTransforms2D.java?rev=1524587&r1=1524586&r2=1524587&view=diff
==============================================================================
--- 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/AffineTransforms2D.java
 [UTF-8] (original)
+++ 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/AffineTransforms2D.java
 [UTF-8] Wed Sep 18 21:48:57 2013
@@ -67,12 +67,24 @@ public final class AffineTransforms2D ex
             return (AffineTransform) matrix;
         }
         MatrixSIS.ensureSizeMatch(3, matrix);
-        if (Matrices.isAffine(matrix)) {
-            return new AffineTransform(matrix.getElement(0,0), 
matrix.getElement(1,0),
-                                       matrix.getElement(0,1), 
matrix.getElement(1,1),
-                                       matrix.getElement(0,2), 
matrix.getElement(1,2));
+        if (!Matrices.isAffine(matrix)) {
+            throw new 
IllegalStateException(Errors.format(Errors.Keys.NotAnAffineTransform));
         }
-        throw new 
IllegalStateException(Errors.format(Errors.Keys.NotAnAffineTransform));
+        return new AffineTransform(matrix.getElement(0,0), 
matrix.getElement(1,0),
+                                   matrix.getElement(0,1), 
matrix.getElement(1,1),
+                                   matrix.getElement(0,2), 
matrix.getElement(1,2));
+    }
+
+    /**
+     * Creates a 3×3 matrix from the given affine transform.
+     *
+     * @param  transform The affine transform to copy as a matrix.
+     * @return A matrix containing the same terms than the given affine 
transform.
+     */
+    public static Matrix3 toMatrix(final AffineTransform transform) {
+        return new Matrix3(transform.getScaleX(), transform.getShearX(), 
transform.getTranslateX(),
+                           transform.getShearY(), transform.getScaleY(), 
transform.getTranslateY(),
+                           0,                     0,                     1);
     }
 
     /**

Modified: 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrices.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrices.java?rev=1524587&r1=1524586&r2=1524587&view=diff
==============================================================================
--- 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrices.java
 [UTF-8] (original)
+++ 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrices.java
 [UTF-8] Wed Sep 18 21:48:57 2013
@@ -16,14 +16,18 @@
  */
 package org.apache.sis.referencing.operation.matrix;
 
+import org.opengis.geometry.Envelope;
+import org.opengis.referencing.cs.AxisDirection;
 import org.opengis.referencing.operation.Matrix;
 import org.opengis.referencing.operation.MathTransform;
+import org.opengis.geometry.MismatchedDimensionException;
 import org.apache.sis.util.Static;
 import org.apache.sis.util.CharSequences;
 import org.apache.sis.util.ComparisonMode;
 import org.apache.sis.util.ArgumentChecks;
 import org.apache.sis.util.resources.Errors;
 import org.apache.sis.internal.util.Numerics;
+import org.apache.sis.internal.referencing.AxisDirections;
 
 // Related to JDK7
 import java.util.Objects;
@@ -41,6 +45,7 @@ import java.util.Objects;
  *       {@link #create         create}.
  *   </li>
  *   <li>Creating new matrices for coordinate operation steps:
+ *       {@link #createTransform(Envelope, AxisDirection[], Envelope, 
AxisDirection[]) createTransform},
  *       {@link #createDimensionSelect createDimensionSelect},
  *       {@link #createPassThrough     createPassThrough}.
  *   </li>
@@ -178,6 +183,196 @@ public final class Matrices extends Stat
     }
 
     /**
+     * Implementation of {@code createTransform(…)} public methods expecting 
envelopes and/or axis directions.
+     *
+     * @param useEnvelopes {@code true} if source and destination envelopes 
shall be taken in account.
+     *        If {@code false}, then source and destination envelopes will be 
ignored and may be null.
+     */
+    private static MatrixSIS createTransform(final Envelope srcEnvelope, final 
AxisDirection[] srcAxes,
+                                             final Envelope dstEnvelope, final 
AxisDirection[] dstAxes,
+                                             final boolean useEnvelopes)
+    {
+        final MatrixSIS matrix = createZero(dstAxes.length+1, 
srcAxes.length+1);
+        /*
+         * Maps source axes to destination axes. If no axis is moved (for 
example if the user
+         * want to transform (NORTH,EAST) to (SOUTH,EAST)), then source and 
destination index
+         * will be equal.   If some axes are moved (for example if the user 
want to transform
+         * (NORTH,EAST) to (EAST,NORTH)), then ordinates at index {@code 
srcIndex} will have
+         * to be moved at index {@code dstIndex}.
+         */
+        for (int dstIndex = 0; dstIndex < dstAxes.length; dstIndex++) {
+            boolean hasFound = false;
+            final AxisDirection dstDir = dstAxes[dstIndex];
+            final AxisDirection search = AxisDirections.absolute(dstDir);
+            for (int srcIndex = 0; srcIndex < srcAxes.length; srcIndex++) {
+                final AxisDirection srcDir = srcAxes[srcIndex];
+                if (search.equals(AxisDirections.absolute(srcDir))) {
+                    if (hasFound) {
+                        throw new IllegalArgumentException(Errors.format(
+                                Errors.Keys.ColinearAxisDirections_2, srcDir, 
dstDir));
+                    }
+                    hasFound = true;
+                    /*
+                     * Set the matrix elements. Some matrix elements will 
never be set.
+                     * They will be left to zero, which is their desired value.
+                     */
+                    final boolean same = srcDir.equals(dstDir);
+                    double scale = same ? +1 : -1;
+                    double translate = 0;
+                    if (useEnvelopes) {
+                        translate  = same ? dstEnvelope.getMinimum(dstIndex)
+                                          : dstEnvelope.getMaximum(dstIndex);
+                        scale     *= dstEnvelope.getSpan(dstIndex) /
+                                     srcEnvelope.getSpan(srcIndex);
+                        translate -= srcEnvelope.getMinimum(srcIndex) * scale;
+                    }
+                    matrix.setElement(dstIndex, srcIndex,       scale);
+                    matrix.setElement(dstIndex, srcAxes.length, translate);
+                }
+            }
+            if (!hasFound) {
+                throw new IllegalArgumentException(Errors.format(
+                        Errors.Keys.CanNotMapAxisToDirection_2, 
dstAxes[dstIndex], "srcAxes"));
+            }
+        }
+        matrix.setElement(dstAxes.length, srcAxes.length, 1);
+        return matrix;
+    }
+
+    /**
+     * Creates a transform matrix mapping the given source envelope to the 
given destination envelope.
+     * The given envelopes can have any dimensions, which are handled as below:
+     *
+     * <ul>
+     *   <li>If the two envelopes have the same {@linkplain 
Envelope#getDimension() dimension},
+     *       then the transform is {@linkplain #isAffine(Matrix) affine}.</li>
+     *   <li>If the destination envelope has less dimensions than the source 
envelope,
+     *       then trailing dimensions are silently dropped.</li>
+     *   <li>If the target envelope has more dimensions than the source 
envelope,
+     *       then the transform will append trailing ordinates with the 0 
value.</li>
+     * </ul>
+     *
+     * @param  srcEnvelope The source envelope.
+     * @param  dstEnvelope The destination envelope.
+     * @return The transform from the given source envelope to target envelope.
+     *
+     * @see #createTransform(AxisDirection[], AxisDirection[])
+     * @see #createTransform(Envelope, AxisDirection[], Envelope, 
AxisDirection[])
+     */
+    public static MatrixSIS createTransform(final Envelope srcEnvelope, final 
Envelope dstEnvelope) {
+        final int srcDim = srcEnvelope.getDimension();
+        final int dstDim = dstEnvelope.getDimension();
+        final MatrixSIS matrix = createZero(dstDim+1, srcDim+1);
+        for (int i = Math.min(srcDim, dstDim); --i >= 0;) {
+            double scale     = dstEnvelope.getSpan(i)    / 
srcEnvelope.getSpan(i);
+            double translate = dstEnvelope.getMinimum(i) - 
srcEnvelope.getMinimum(i)*scale;
+            matrix.setElement(i, i,         scale);
+            matrix.setElement(i, srcDim, translate);
+        }
+        matrix.setElement(dstDim, srcDim, 1);
+        return matrix;
+    }
+
+    /**
+     * Creates a transform matrix changing axis order and/or direction. For 
example the transform may convert
+     * (<i>northing</i>, <i>westing</i>) coordinates into (<i>easting</i>, 
<i>northing</i>) coordinates.
+     * This method tries to associate each {@code dstAxes} direction to either 
an equals {@code srcAxis}
+     * direction, or to an opposite {@code srcAxis} direction.
+     *
+     * <ul>
+     *   <li>If some {@code srcAxes} directions can not be mapped to {@code 
dstAxes} directions, then the transform
+     *       will silently drops the ordinates associated to those extra 
source axis directions.</li>
+     *   <li>If some {@code dstAxes} directions can not be mapped to {@code 
srcAxes} directions,
+     *       then an exception will be thrown.</li>
+     * </ul>
+     *
+     * {@example It is legal to transform from (<i>easting</i>, 
<i>northing</i>, <i>up</i>) to
+     *           (<i>easting</i>, <i>northing</i>) - this is the first above 
case, but illegal
+     *           to transform (<i>easting</i>, <i>northing</i>) to 
(<i>easting</i>, <i>up</i>).}
+     *
+     * <b>Code example:</b> the following method call:
+     *
+     * {@preformat java
+     *   matrix = Matrices.createTransform(new AxisDirection[] 
{AxisDirection.NORTH, AxisDirection.WEST},
+     *                                     new AxisDirection[] 
{AxisDirection.EAST, AxisDirection.NORTH});
+     * }
+     *
+     * will return the following square matrix, which can be used in 
coordinate conversions as below:
+     *
+     * {@preformat math
+     *   ┌    ┐   ┌         ┐   ┌    ┐
+     *   │ -x │   │ 0 -1  0 │   │  y │
+     *   │  y │ = │ 1  0  0 │ × │ +x │
+     *   │  1 │   │ 0  0  1 │   │  1 │
+     *   └    ┘   └         ┘   └    ┘
+     * }
+     *
+     * @param  srcAxes The ordered sequence of axis directions for source 
coordinate system.
+     * @param  dstAxes The ordered sequence of axis directions for destination 
coordinate system.
+     * @return The transform from the given source axis directions to the 
given target axis directions.
+     * @throws IllegalArgumentException If {@code dstAxes} contains at least 
one axis not found in {@code srcAxes},
+     *         or if some colinear axes were found.
+     *
+     * @see #createTransform(Envelope, Envelope)
+     * @see #createTransform(Envelope, AxisDirection[], Envelope, 
AxisDirection[])
+     */
+    public static MatrixSIS createTransform(final AxisDirection[] srcAxes, 
final AxisDirection[] dstAxes) {
+        return createTransform(null, srcAxes, null, dstAxes, false);
+    }
+
+    /**
+     * Creates a transform matrix mapping the given source envelope to the 
given destination envelope,
+     * combined with changes in axis order and/or direction.
+     * Invoking this method is equivalent to concatenating the following 
matrix transforms:
+     *
+     * <ul>
+     *   <li><code>{@linkplain #createTransform(Envelope, Envelope) 
createTransform}(srcEnvelope, dstEnvelope)</code></li>
+     *   <li><code>{@linkplain #createTransform(AxisDirection[], 
AxisDirection[]) createTransform}(srcAxes, dstAxes)</code></li>
+     * </ul>
+     *
+     * @param  srcEnvelope The source envelope.
+     * @param  srcAxes     The ordered sequence of axis directions for source 
coordinate system.
+     * @param  dstEnvelope The destination envelope.
+     * @param  dstAxes     The ordered sequence of axis directions for 
destination coordinate system.
+     * @return The transform from the given source envelope and axis directions
+     *         to the given envelope and target axis directions.
+     * @throws MismatchedDimensionException If an envelope {@linkplain 
Envelope#getDimension() dimension} does not
+     *         match the length of the axis directions sequence.
+     * @throws IllegalArgumentException If {@code dstAxes} contains at least 
one axis not found in {@code srcAxes},
+     *         or if some colinear axes were found.
+     *
+     * @see #createTransform(Envelope, Envelope)
+     * @see #createTransform(AxisDirection[], AxisDirection[])
+     */
+    public static MatrixSIS createTransform(final Envelope srcEnvelope, final 
AxisDirection[] srcAxes,
+                                            final Envelope dstEnvelope, final 
AxisDirection[] dstAxes)
+    {
+        ensureDimensionMatch("srcEnvelope", srcEnvelope, srcAxes.length);
+        ensureDimensionMatch("dstEnvelope", dstEnvelope, dstAxes.length);
+        return createTransform(srcEnvelope, srcAxes, dstEnvelope, dstAxes, 
true);
+    }
+
+    /**
+     * Convenience method for checking object dimension validity.
+     * This method is invoked for argument checking.
+     *
+     * @param  name      The name of the argument to check.
+     * @param  envelope  The envelope to check.
+     * @param  dimension The expected dimension for the object.
+     * @throws MismatchedDimensionException if the envelope doesn't have the 
expected dimension.
+     */
+    private static void ensureDimensionMatch(final String name, final Envelope 
envelope,
+            final int dimension) throws MismatchedDimensionException
+    {
+        ArgumentChecks.ensureNonNull(name, envelope);
+        final int dim = envelope.getDimension();
+        if (dimension != dim) {
+            throw new MismatchedDimensionException(Errors.format(
+                    Errors.Keys.MismatchedDimension_3, name, dimension, dim));
+        }
+    }
+
+    /**
      * Creates a matrix for a transform that keep only a subset of source 
ordinate values.
      * The matrix size will be ({@code selectedDimensions.length}+1) × ({@code 
sourceDimensions}+1).
      * The matrix will contain only zero elements, except for the following 
cells which will contain 1:

Modified: 
sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java?rev=1524587&r1=1524586&r2=1524587&view=diff
==============================================================================
--- 
sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java
 [UTF-8] (original)
+++ 
sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java
 [UTF-8] Wed Sep 18 21:48:57 2013
@@ -94,6 +94,11 @@ public final class Errors extends Indexe
         public static final int CanNotInstantiate_1 = 81;
 
         /**
+         * Can not map an axis from “{0}” to direction “{1}”.
+         */
+        public static final int CanNotMapAxisToDirection_2 = 123;
+
+        /**
          * Can not open “{0}”.
          */
         public static final int CanNotOpen_1 = 97;
@@ -129,6 +134,11 @@ public final class Errors extends Indexe
         public static final int CloneNotSupported_1 = 42;
 
         /**
+         * Axis directions {0} and {1} are colinear.
+         */
+        public static final int ColinearAxisDirections_2 = 122;
+
+        /**
          * Thread “{0}” is dead.
          */
         public static final int DeadThread_1 = 43;

Modified: 
sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties?rev=1524587&r1=1524586&r2=1524587&view=diff
==============================================================================
--- 
sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties
 [ISO-8859-1] (original)
+++ 
sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties
 [ISO-8859-1] Wed Sep 18 21:48:57 2013
@@ -30,6 +30,7 @@ CanNotConvertFromType_2         = Can no
 CanNotConvertValue_2            = Can not convert value \u201c{0}\u201d to 
type \u2018{1}\u2019.
 CanNotComputeDerivative         = Can not compute the derivative.
 CanNotInstantiate_1             = Can not instantiate an object of type 
\u2018{0}\u2019.
+CanNotMapAxisToDirection_2      = Can not map an axis from \u201c{0}\u201d to 
direction \u201c{1}\u201d.
 CanNotOpen_1                    = Can not open \u201c{0}\u201d.
 CanNotParseFile_2               = Can not parse \u201c{1}\u201d as a file in 
the {0} format.
 CanNotRead_1                    = Can not read \u201c{0}\u201d.
@@ -37,6 +38,7 @@ CanNotRepresentInFormat_2       = Can no
 CanNotSetPropertyValue_1        = Can not set a value for property 
\u201c{0}\u201d.
 ClassNotFinal_1                 = Class \u2018{0}\u2019 is not final.
 CloneNotSupported_1             = Can not clone an object of type 
\u2018{0}\u2019.
+ColinearAxisDirections_2        = Axis directions {0} and {1} are colinear.
 DeadThread_1                    = Thread \u201c{0}\u201d is dead.
 DuplicatedElement_1             = Element \u201c{0}\u201d is duplicated.
 DuplicatedIdentifier_1          = Identifier \u201c{0}\u201d is duplicated.

Modified: 
sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties?rev=1524587&r1=1524586&r2=1524587&view=diff
==============================================================================
--- 
sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties
 [ISO-8859-1] (original)
+++ 
sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties
 [ISO-8859-1] Wed Sep 18 21:48:57 2013
@@ -20,6 +20,7 @@ CanNotConvertFromType_2         = Ne peu
 CanNotConvertValue_2            = La valeur \u201c{0}\u201d ne peut pas 
\u00eatre convertie vers le type \u2018{1}\u2019.
 CanNotComputeDerivative         = La d\u00e9riv\u00e9 ne peut pas \u00eatre 
calcul\u00e9e.
 CanNotInstantiate_1             = Ne peut pas cr\u00e9er un objet de type 
\u2018{0}\u2019.
+CanNotMapAxisToDirection_2      = Aucun axe de \u201c{0}\u201d n\u2019a pu 
\u00eatre associ\u00e9 \u00e0 la direction \u201c{1}\u201d.
 CanNotOpen_1                    = Ne peut pas ouvrir \u201c{0}\u201d.
 CanNotParseFile_2               = Ne peut pas lire \u201c{1}\u201d comme un 
fichier au format {0}.
 CanNotRead_1                    = Ne peut pas lire \u201c{0}\u201d.
@@ -27,6 +28,7 @@ CanNotRepresentInFormat_2       = Ne peu
 CanNotSetPropertyValue_1        = Ne peut pas d\u00e9finir une valeur pour la 
propri\u00e9t\u00e9 \u201c{0}\u201d.
 ClassNotFinal_1                 = La classe \u2018{0}\u2019 n\u2019est pas 
finale.
 CloneNotSupported_1             = Un objet de type \u2018{0}\u2019 ne peut pas 
\u00eatre clon\u00e9.
+ColinearAxisDirections_2        = Les directions d\u2019axes {0} et {1} sont 
colin\u00e9aires.
 DeadThread_1                    = La t\u00e2che \u201c{0}\u201d est morte.
 DuplicatedElement_1             = L\u2019\u00e9lement \u201c{0}\u201d est 
dupliqu\u00e9.
 DuplicatedIdentifier_1          = L\u2019identifiant \u201c{0}\u201d est 
dupliqu\u00e9.


Reply via email to