sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1755610 [4/7] - in /sis/branches/JDK7: ./ core/ core/sis-feature/src/main/java/org/apache/sis/feature/ core/sis-feature/src/main/java/org/apache/sis/feature/builder/ core/sis-feature/src/test/java/org/apache/sis/feature/ core/sis-feature/s...
Date Tue, 09 Aug 2016 14:48:05 GMT
Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/Extents.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/Extents.java?rev=1755610&r1=1755609&r2=1755610&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/Extents.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/Extents.java [UTF-8] Tue Aug  9 14:48:04 2016
@@ -17,7 +17,10 @@
 package org.apache.sis.metadata.iso.extent;
 
 import java.util.Date;
+import java.util.List;
+import java.util.ArrayList;
 import javax.measure.unit.Unit;
+import org.opengis.geometry.Envelope;
 import org.opengis.temporal.TemporalPrimitive;
 import org.opengis.metadata.extent.Extent;
 import org.opengis.metadata.extent.VerticalExtent;
@@ -28,19 +31,26 @@ import org.opengis.metadata.extent.Geogr
 import org.opengis.referencing.cs.CoordinateSystemAxis;
 import org.opengis.referencing.cs.AxisDirection;
 import org.opengis.referencing.crs.VerticalCRS;
+import org.opengis.referencing.crs.GeographicCRS;
+import org.opengis.referencing.crs.CoordinateReferenceSystem;
 import org.opengis.referencing.datum.VerticalDatum;
 import org.opengis.referencing.datum.VerticalDatumType;
+import org.opengis.referencing.operation.TransformException;
+import org.apache.sis.metadata.InvalidMetadataException;
 import org.apache.sis.measure.Longitude;
 import org.apache.sis.measure.MeasurementRange;
 import org.apache.sis.measure.Range;
 import org.apache.sis.util.resources.Vocabulary;
+import org.apache.sis.util.resources.Errors;
 import org.apache.sis.util.ArgumentChecks;
 import org.apache.sis.util.Static;
 
 import static java.lang.Math.*;
-import static org.apache.sis.internal.metadata.MetadataUtilities.getInclusion;
 import static org.apache.sis.internal.metadata.ReferencingServices.AUTHALIC_RADIUS;
 
+// Branch-dependent imports
+import org.opengis.geometry.Geometry;
+
 
 /**
  * Convenience static methods for extracting information from {@link Extent} objects.
@@ -56,7 +66,7 @@ import static org.apache.sis.internal.me
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.3
- * @version 0.6
+ * @version 0.8
  * @module
  *
  * @see org.apache.sis.geometry.Envelopes
@@ -84,53 +94,106 @@ public final class Extents extends Stati
 
     /**
      * Returns a single geographic bounding box from the specified extent.
-     * If no bounding box is found, then this method returns {@code null}.
-     * If a single bounding box is found, then that box is returned directly.
-     * If more than one box is found, then all those boxes are
-     * {@linkplain DefaultGeographicBoundingBox#add added} together.
+     * This method tries to find the bounding box in the cheapest way
+     * before to fallback on more expansive computations:
+     *
+     * <ol>
+     *   <li>First, this method searches geographic elements that are instance of {@link GeographicBoundingBox}.<ul>
+     *     <li>If exactly one such instance is found, then this method returns that instance directly (no copy).</li>
+     *     <li>If more than one instance is found, then this method computes and returns the
+     *         {@linkplain DefaultGeographicBoundingBox#add union} of all bounding boxes.</li>
+     *   </ul></li>
+     *   <li>If above step found no {@code GeographicBoundingBox}, then this method inspects geographic elements
+     *       that are instance of {@link BoundingPolygon}, taking in account only the envelopes associated to a
+     *       coordinate reference system of kind {@link GeographicCRS}. If such envelopes are found, then this
+     *       method computes and returns their union.</li>
+     *   <li>If above step found no polygon's envelope associated to a geographic CRS, then in last resort this
+     *       method uses all polygon's envelopes regardless their coordinate reference system (provided that the
+     *       CRS is not null), applying coordinate transformations if needed.</li>
+     *   <li>If above step found no polygon's envelope, then this method returns {@code null}.</li>
+     * </ol>
      *
-     * @param  extent The extent to convert to a geographic bounding box, or {@code null}.
-     * @return A geographic bounding box extracted from the given extent, or {@code null} in none.
+     * @param  extent  the extent to convert to a geographic bounding box, or {@code null}.
+     * @return a geographic bounding box extracted from the given extent, or {@code null} if none.
+     *
+     * @see org.apache.sis.referencing.CRS#getDomainOfValidity(CoordinateReferenceSystem)
      */
     public static GeographicBoundingBox getGeographicBoundingBox(final Extent extent) {
-        GeographicBoundingBox candidate = null;
+        GeographicBoundingBox bounds = null;
         if (extent != null) {
+            boolean useOnlyGeographicEnvelopes = false;
             DefaultGeographicBoundingBox modifiable = null;
+            final List<Envelope> fallbacks = new ArrayList<>();
             for (final GeographicExtent element : extent.getGeographicElements()) {
-                final GeographicBoundingBox bounds;
-                if (element instanceof GeographicBoundingBox) {
-                    bounds = (GeographicBoundingBox) element;
-                } else if (element instanceof BoundingPolygon) {
-                    // TODO: iterates through all polygons and invoke Polygon.getEnvelope();
-                    continue;
-                } else {
-                    continue;
-                }
                 /*
-                 * A single geographic bounding box has been extracted. Now add it to previous
-                 * ones (if any). All exclusion boxes before the first inclusion box are ignored.
+                 * If a geographic bounding box can be obtained, add it to the previous boxes (if any).
+                 * All exclusion boxes before the first inclusion box are ignored.
                  */
-                if (candidate == null) {
+                if (element instanceof GeographicBoundingBox) {
+                    final GeographicBoundingBox item = (GeographicBoundingBox) element;
+                    if (bounds == null) {
+                        // We use DefaultGeographicBoundingBox.getInclusion(Boolean) below because
+                        // add(…) method that we use cares about the case where inclusion is false.
+                        if (DefaultGeographicBoundingBox.getInclusion(item.getInclusion())) {
+                            bounds = item;
+                        }
+                    } else {
+                        if (modifiable == null) {
+                            bounds = modifiable = new DefaultGeographicBoundingBox(bounds);
+                        }
+                        modifiable.add(item);
+                    }
+                } else if (bounds == null && element instanceof BoundingPolygon) {
                     /*
-                     * Reminder: 'inclusion' is a mandatory attribute, so it should never be
-                     * null for a valid metadata object.  If the metadata object is invalid,
-                     * it is better to get an exception than having a code doing silently
-                     * some probably inappropriate work.
+                     * If no GeographicBoundingBox has been found so far but we found a BoundingPolygon, remember
+                     * its Envelope but do not transform it yet. We will transform envelopes later only if needed.
+                     *
+                     * No need for DefaultGeographicBoundingBox.getInclusion(Boolean) below because we do not perform
+                     * any processing (apart just ignoring the element) for cases where the inclusion value is false.
                      */
-                    if (getInclusion(bounds.getInclusion())) {
-                        candidate = bounds;
+                    if (!Boolean.FALSE.equals(element.getInclusion())) {
+                        for (final Geometry geometry : ((BoundingPolygon) extent).getPolygons()) {
+                            final Envelope envelope = geometry.getEnvelope();
+                            if (envelope != null) {
+                                final CoordinateReferenceSystem crs = envelope.getCoordinateReferenceSystem();
+                                if (crs != null) {
+                                    if (crs instanceof GeographicCRS) {
+                                        if (!useOnlyGeographicEnvelopes) {
+                                            useOnlyGeographicEnvelopes = true;
+                                            fallbacks.clear();
+                                        }
+                                    } else if (useOnlyGeographicEnvelopes) {
+                                        continue;
+                                    }
+                                    fallbacks.add(envelope);
+                                }
+                            }
+                        }
                     }
-                } else {
-                    if (modifiable == null) {
-                        modifiable = new DefaultGeographicBoundingBox();
-                        modifiable.setBounds(candidate);
-                        candidate = modifiable;
+                }
+            }
+            /*
+             * If we found not explicit GeographicBoundingBox element, use the information that we
+             * collected in BoundingPolygon elements. This may involve coordinate transformations.
+             */
+            if (bounds == null) try {
+                for (final Envelope envelope : fallbacks) {
+                    final DefaultGeographicBoundingBox item = new DefaultGeographicBoundingBox();
+                    item.setBounds(envelope);
+                    if (bounds == null) {
+                        bounds = item;
+                    } else {
+                        if (modifiable == null) {
+                            bounds = modifiable = new DefaultGeographicBoundingBox(bounds);
+                        }
+                        modifiable.add(item);
                     }
-                    modifiable.add(bounds);
                 }
+            } catch (TransformException e) {
+                throw new InvalidMetadataException(Errors.format(Errors.Keys.CanNotTransformEnvelope), e);
             }
         }
-        return candidate;
+        return bounds;
     }
 
     /**
@@ -188,8 +251,8 @@ public final class Extents extends Stati
      *   were found, this method would compute their union.</div></li>
      * </ul>
      *
-     * @param  extent The extent to convert to a vertical measurement range, or {@code null}.
-     * @return A vertical measurement range created from the given extent, or {@code null} if none.
+     * @param  extent  the extent to convert to a vertical measurement range, or {@code null}.
+     * @return a vertical measurement range created from the given extent, or {@code null} if none.
      *
      * @since 0.4
      */
@@ -262,8 +325,8 @@ public final class Extents extends Stati
     /**
      * Returns the union of all time ranges found in the given extent, or {@code null} if none.
      *
-     * @param  extent The extent to convert to a time range, or {@code null}.
-     * @return A time range created from the given extent, or {@code null} if none.
+     * @param  extent  the extent to convert to a time range, or {@code null}.
+     * @return a time range created from the given extent, or {@code null} if none.
      *
      * @since 0.4
      */
@@ -309,10 +372,10 @@ public final class Extents extends Stati
      *   <li>If {@code location} is outside the [0 … 1] range, then the result will be outside the temporal extent.</li>
      * </ul>
      *
-     * @param  extent   The extent from which to get an instant, or {@code null}.
-     * @param  location 0 for the start time, 1 for the end time, 0.5 for the average time, or the
-     *                  coefficient (usually in the [0 … 1] range) for interpolating an instant.
-     * @return An instant interpolated at the given location, or {@code null} if none.
+     * @param  extent    the extent from which to get an instant, or {@code null}.
+     * @param  location  0 for the start time, 1 for the end time, 0.5 for the average time, or the
+     *                   coefficient (usually in the [0 … 1] range) for interpolating an instant.
+     * @return an instant interpolated at the given location, or {@code null} if none.
      *
      * @since 0.4
      */
@@ -351,11 +414,11 @@ public final class Extents extends Stati
      * <p>This method never modify the given boxes, but may return directly one of the given arguments if it
      * already represents the intersection result.</p>
      *
-     * @param  b1 The first bounding box, or {@code null}.
-     * @param  b2 The second bounding box, or {@code null}.
-     * @return The intersection (may be any of the {@code b1} or {@code b2} argument if unchanged),
+     * @param  b1  the first bounding box, or {@code null}.
+     * @param  b2  the second bounding box, or {@code null}.
+     * @return the intersection (may be any of the {@code b1} or {@code b2} argument if unchanged),
      *         or {@code null} if the two given boxes are null.
-     * @throws IllegalArgumentException If the {@linkplain DefaultGeographicBoundingBox#getInclusion() inclusion status}
+     * @throws IllegalArgumentException if the {@linkplain DefaultGeographicBoundingBox#getInclusion() inclusion status}
      *         is not the same for both boxes.
      *
      * @see DefaultGeographicBoundingBox#intersect(GeographicBoundingBox)
@@ -379,8 +442,8 @@ public final class Extents extends Stati
      * {@linkplain org.apache.sis.referencing.CommonCRS#SPHERE GRS 1980 Authalic Sphere}.
      * However this may change in any future SIS version.</p>
      *
-     * @param  box The geographic bounding box for which to compute the area, or {@code null}.
-     * @return An estimation of the area in the given bounding box (m²),
+     * @param  box  the geographic bounding box for which to compute the area, or {@code null}.
+     * @return an estimation of the area in the given bounding box (m²),
      *         or {@linkplain Double#NaN NaN} if the given box was null.
      *
      * @since 0.4

Modified: sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/test/MetadataAssert.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/test/MetadataAssert.java?rev=1755610&r1=1755609&r2=1755610&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/test/MetadataAssert.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/test/MetadataAssert.java [UTF-8] Tue Aug  9 14:48:04 2016
@@ -19,6 +19,7 @@ package org.apache.sis.test;
 import java.util.Locale;
 import org.opengis.util.InternationalString;
 import org.opengis.metadata.citation.Citation;
+import org.opengis.metadata.citation.Responsibility;
 import org.opengis.referencing.IdentifiedObject;
 import org.apache.sis.io.wkt.Symbols;
 import org.apache.sis.io.wkt.WKTFormat;
@@ -31,7 +32,7 @@ import org.apache.sis.io.wkt.Convention;
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.4
- * @version 0.6
+ * @version 0.8
  * @module
  */
 public strictfp class MetadataAssert extends Assert {
@@ -56,9 +57,9 @@ public strictfp class MetadataAssert ext
     /**
      * Asserts that the English title of the given citation is equals to the expected string.
      *
-     * @param message  The message to report in case of test failure.
-     * @param expected The expected English title.
-     * @param citation The citation to test.
+     * @param message   the message to report in case of test failure.
+     * @param expected  the expected English title.
+     * @param citation  the citation to test.
      *
      * @since 0.6
      *
@@ -72,12 +73,30 @@ public strictfp class MetadataAssert ext
     }
 
     /**
+     * Asserts that the given citation has only one responsible party,
+     * and its English name is equals to the expected string.
+     *
+     * @param message   the message to report in case of test failure.
+     * @param expected  the expected English responsibly party name.
+     * @param citation  the citation to test.
+     *
+     * @since 0.8
+     */
+    public static void assertPartyNameEquals(final String message, final String expected, final Citation citation) {
+        assertNotNull(message, citation);
+        final Responsibility r = TestUtilities.getSingleton(citation.getCitedResponsibleParties());
+        final InternationalString name = TestUtilities.getSingleton(r.getParties()).getName();
+        assertNotNull(message, name);
+        assertEquals(message, expected, name.toString(Locale.US));
+    }
+
+    /**
      * Asserts that the WKT 2 of the given object is equal to the expected one.
      * This method expected the {@code “…”} quotation marks instead of {@code "…"}
      * for easier readability of {@link String} constants in Java code.
      *
-     * @param expected The expected text, or {@code null} if {@code object} is expected to be null.
-     * @param object The object to format in <cite>Well Known Text</cite> format, or {@code null}.
+     * @param expected  the expected text, or {@code null} if {@code object} is expected to be null.
+     * @param object    the object to format in <cite>Well Known Text</cite> format, or {@code null}.
      */
     public static void assertWktEquals(final String expected, final Object object) {
         assertWktEquals(Convention.WKT2, expected, object);
@@ -88,9 +107,9 @@ public strictfp class MetadataAssert ext
      * This method expected the {@code “…”} quotation marks instead of {@code "…"} for easier readability of
      * {@link String} constants in Java code.
      *
-     * @param convention The WKT convention to use.
-     * @param expected   The expected text, or {@code null} if {@code object} is expected to be null.
-     * @param object     The object to format in <cite>Well Known Text</cite> format, or {@code null}.
+     * @param convention  the WKT convention to use.
+     * @param expected    the expected text, or {@code null} if {@code object} is expected to be null.
+     * @param object      the object to format in <cite>Well Known Text</cite> format, or {@code null}.
      */
     public static void assertWktEquals(final Convention convention, final String expected, final Object object) {
         if (expected == null) {
@@ -112,9 +131,9 @@ public strictfp class MetadataAssert ext
      * This method is like {@link #assertWktEquals(String, Object)}, but the use of regular expression allows some
      * tolerance for example on numerical parameter values that may be subject to a limited form of rounding errors.
      *
-     * @param convention The WKT convention to use.
-     * @param expected   The expected regular expression, or {@code null} if {@code object} is expected to be null.
-     * @param object     The object to format in <cite>Well Known Text</cite> format, or {@code null}.
+     * @param convention  the WKT convention to use.
+     * @param expected    the expected regular expression, or {@code null} if {@code object} is expected to be null.
+     * @param object      the object to format in <cite>Well Known Text</cite> format, or {@code null}.
      *
      * @since 0.6
      */

Modified: sis/branches/JDK7/core/sis-referencing/pom.xml
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/pom.xml?rev=1755610&r1=1755609&r2=1755610&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/pom.xml (original)
+++ sis/branches/JDK7/core/sis-referencing/pom.xml Tue Aug  9 14:48:04 2016
@@ -75,7 +75,7 @@ Implementations of Coordinate Reference
       <id>rmarechal</id>
       <email>remi.marechal@geomatys.com</email>
       <organization>Geomatys</organization>
-      <organizationUrl>http://www.geomatys.com/</organizationUrl>
+      <organizationUrl>http://www.geomatys.com</organizationUrl>
       <timezone>+1</timezone>
       <roles>
         <role>developer</role>

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/CRS.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/CRS.java?rev=1755610&r1=1755609&r2=1755610&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/CRS.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/CRS.java [UTF-8] Tue Aug  9 14:48:04 2016
@@ -22,6 +22,7 @@ import java.util.ArrayList;
 import java.util.Collections;
 import javax.measure.unit.NonSI;
 import org.opengis.util.FactoryException;
+import org.opengis.geometry.Envelope;
 import org.opengis.referencing.NoSuchAuthorityCodeException;
 import org.opengis.referencing.IdentifiedObject;
 import org.opengis.referencing.cs.EllipsoidalCS;
@@ -42,13 +43,19 @@ import org.opengis.referencing.crs.Engin
 import org.opengis.referencing.operation.OperationNotFoundException;
 import org.opengis.metadata.citation.Citation;
 import org.opengis.metadata.extent.Extent;
+import org.opengis.metadata.extent.BoundingPolygon;
 import org.opengis.metadata.extent.GeographicBoundingBox;
+import org.opengis.metadata.extent.GeographicExtent;
 import org.opengis.referencing.operation.CoordinateOperation;
+import org.opengis.referencing.operation.TransformException;
+import org.apache.sis.geometry.Envelopes;
+import org.apache.sis.geometry.GeneralEnvelope;
 import org.apache.sis.internal.metadata.AxisDirections;
 import org.apache.sis.internal.referencing.PositionalAccuracyConstant;
 import org.apache.sis.internal.referencing.CoordinateOperations;
 import org.apache.sis.internal.referencing.ReferencingUtilities;
 import org.apache.sis.internal.system.DefaultFactories;
+import org.apache.sis.internal.system.Loggers;
 import org.apache.sis.referencing.cs.DefaultVerticalCS;
 import org.apache.sis.referencing.cs.DefaultEllipsoidalCS;
 import org.apache.sis.referencing.crs.DefaultGeographicCRS;
@@ -61,12 +68,16 @@ import org.apache.sis.referencing.factor
 import org.apache.sis.metadata.iso.extent.DefaultGeographicBoundingBox;
 import org.apache.sis.metadata.iso.extent.Extents;
 import org.apache.sis.util.resources.Errors;
+import org.apache.sis.util.logging.Logging;
 import org.apache.sis.util.ArgumentChecks;
 import org.apache.sis.util.Utilities;
 import org.apache.sis.util.Static;
 
 import static java.util.Collections.singletonMap;
 
+// Branch-dependent imports
+import org.opengis.geometry.Geometry;
+
 
 /**
  * Static methods working on {@linkplain CoordinateReferenceSystem Coordinate Reference Systems}.
@@ -113,7 +124,7 @@ import static java.util.Collections.sing
  *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @since   0.3
- * @version 0.7
+ * @version 0.8
  * @module
  */
 public final class CRS extends Static {
@@ -166,9 +177,9 @@ public final class CRS extends Static {
      * Note that the {@link IdentifiedObjects#lookupURN(IdentifiedObject, Citation)}
      * method can be seen as a converse of this method.
      *
-     * @param  code The authority code.
-     * @return The Coordinate Reference System for the given authority code.
-     * @throws NoSuchAuthorityCodeException If there is no known CRS associated to the given code.
+     * @param  code  the authority code.
+     * @return the Coordinate Reference System for the given authority code.
+     * @throws NoSuchAuthorityCodeException if there is no known CRS associated to the given code.
      * @throws FactoryException if the CRS creation failed for an other reason.
      *
      * @see #getAuthorityFactory(String)
@@ -228,8 +239,8 @@ public final class CRS extends Static {
      * Applications which need to parse a large amount of WKT strings should consider to use
      * the {@link org.apache.sis.io.wkt.WKTFormat} class instead than this method.
      *
-     * @param  text Coordinate system encoded in Well-Known Text format (version 1 or 2).
-     * @return The parsed Coordinate Reference System.
+     * @param  text  coordinate system encoded in Well-Known Text format (version 1 or 2).
+     * @return the parsed Coordinate Reference System.
      * @throws FactoryException if the given WKT can not be parsed.
      *
      * @see org.apache.sis.io.wkt
@@ -249,8 +260,8 @@ public final class CRS extends Static {
      * For reading XML documents from readers or input streams,
      * see static methods in the {@link org.apache.sis.xml.XML} class.
      *
-     * @param  xml Coordinate reference system encoded in XML format.
-     * @return The unmarshalled Coordinate Reference System.
+     * @param  xml  coordinate reference system encoded in XML format.
+     * @return the unmarshalled Coordinate Reference System.
      * @throws FactoryException if the object creation failed.
      *
      * @see org.apache.sis.xml.XML#unmarshal(String)
@@ -288,9 +299,9 @@ public final class CRS extends Static {
      * transform. If there is no known operation between the given pair of CRS, then this method throws an
      * {@link OperationNotFoundException}.
      *
-     * @param  sourceCRS      the CRS of source coordinates.
-     * @param  targetCRS      the CRS of target coordinates.
-     * @param  areaOfInterest the area of interest, or {@code null} if none.
+     * @param  sourceCRS       the CRS of source coordinates.
+     * @param  targetCRS       the CRS of target coordinates.
+     * @param  areaOfInterest  the area of interest, or {@code null} if none.
      * @return the mathematical operation from {@code sourceCRS} to {@code targetCRS}.
      * @throws OperationNotFoundException if no operation was found between the given pair of CRS.
      * @throws FactoryException if the operation can not be created for another reason.
@@ -338,8 +349,8 @@ public final class CRS extends Static {
      *
      * See {@link AbstractCoordinateOperation#getLinearAccuracy()} for more details on the above heuristic rules.
      *
-     * @param  operation The coordinate operation for which to get the accuracy estimation, or {@code null}.
-     * @return The accuracy estimation (always in meters), or NaN if unknown.
+     * @param  operation  the coordinate operation for which to get the accuracy estimation, or {@code null}.
+     * @return the accuracy estimation (always in meters), or NaN if unknown.
      *
      * @see #findOperation(CoordinateReferenceSystem, CoordinateReferenceSystem, GeographicBoundingBox)
      *
@@ -362,8 +373,8 @@ public final class CRS extends Static {
      * {@linkplain org.apache.sis.metadata.iso.extent.DefaultGeographicBoundingBox#add(GeographicBoundingBox) added}
      * together.
      *
-     * @param  operation The coordinate operation for which to get the domain of validity, or {@code null}.
-     * @return The geographic area where the operation is valid, or {@code null} if unspecified.
+     * @param  operation  the coordinate operation for which to get the domain of validity, or {@code null}.
+     * @return the geographic area where the operation is valid, or {@code null} if unspecified.
      *
      * @see #findOperation(CoordinateReferenceSystem, CoordinateReferenceSystem, GeographicBoundingBox)
      * @see Extents#getGeographicBoundingBox(Extent)
@@ -383,10 +394,10 @@ public final class CRS extends Static {
      * {@linkplain org.apache.sis.metadata.iso.extent.DefaultGeographicBoundingBox#add(GeographicBoundingBox) added}
      * together.
      *
-     * @param  crs The coordinate reference system for which to get the domain of validity, or {@code null}.
-     * @return The geographic area where the coordinate reference system is valid, or {@code null} if unspecified.
+     * @param  crs  the coordinate reference system for which to get the domain of validity, or {@code null}.
+     * @return the geographic area where the coordinate reference system is valid, or {@code null} if unspecified.
      *
-     * @see #getEnvelope(CoordinateReferenceSystem)
+     * @see #getDomainOfValidity(CoordinateReferenceSystem)
      * @see Extents#getGeographicBoundingBox(Extent)
      *
      * @category information
@@ -396,6 +407,95 @@ public final class CRS extends Static {
     }
 
     /**
+     * Returns the domain of validity of the specified coordinate reference system, or {@code null} if unknown.
+     * If non-null, then the returned envelope will use the same coordinate reference system them the given CRS
+     * argument.
+     *
+     * <p>This method looks in two places:</p>
+     * <ol>
+     *   <li>First, it checks the {@linkplain org.apache.sis.referencing.crs.AbstractCRS#getDomainOfValidity()
+     *       domain of validity} associated with the given CRS. Only geographic extents that are instances of
+     *       {@link BoundingPolygon} associated to the given CRS are taken in account for this first step.</li>
+     *   <li>If the above step did not found found any bounding polygon, then the
+     *       {@linkplain #getGeographicBoundingBox(CoordinateReferenceSystem) geographic bounding boxes}
+     *       are used as a fallback and tranformed to the given CRS.</li>
+     * </ol>
+     *
+     * @param  crs  the coordinate reference system, or {@code null}.
+     * @return the envelope with coordinates in the given CRS, or {@code null} if none.
+     *
+     * @see #getGeographicBoundingBox(CoordinateReferenceSystem)
+     *
+     * @category information
+     * @since 0.8
+     */
+    public static Envelope getDomainOfValidity(final CoordinateReferenceSystem crs) {
+        Envelope envelope = null;
+        GeneralEnvelope merged = null;
+        if (crs != null) {
+            final Extent domainOfValidity = crs.getDomainOfValidity();
+            if (domainOfValidity != null) {
+                for (final GeographicExtent extent : domainOfValidity.getGeographicElements()) {
+                    if (extent instanceof BoundingPolygon && !Boolean.FALSE.equals(extent.getInclusion())) {
+                        for (final Geometry geometry : ((BoundingPolygon) extent).getPolygons()) {
+                            final Envelope candidate = geometry.getEnvelope();
+                            if (candidate != null) {
+                                final CoordinateReferenceSystem sourceCRS = candidate.getCoordinateReferenceSystem();
+                                if (sourceCRS == null || Utilities.equalsIgnoreMetadata(sourceCRS, crs)) {
+                                    if (envelope == null) {
+                                        envelope = candidate;
+                                    } else {
+                                        if (merged == null) {
+                                            envelope = merged = new GeneralEnvelope(envelope);
+                                        }
+                                        merged.add(envelope);
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+        }
+        /*
+         * If no envelope was found, uses the geographic bounding box as a fallback. We will
+         * need to transform it from WGS84 to the supplied CRS. This step was not required in
+         * the previous block because the later selected only envelopes in the right CRS.
+         */
+        if (envelope == null) {
+            final GeographicBoundingBox bounds = getGeographicBoundingBox(crs);
+            if (bounds != null && !Boolean.FALSE.equals(bounds.getInclusion())) {
+                /*
+                 * We do not assign WGS84 unconditionally to the geographic bounding box, because
+                 * it is not defined to be on a particular datum; it is only approximative bounds.
+                 * We try to get the GeographicCRS from the user-supplied CRS in order to reduce
+                 * the amount of transformation needed.
+                 */
+                final SingleCRS targetCRS = getHorizontalComponent(crs);
+                final GeographicCRS sourceCRS = ReferencingUtilities.toNormalizedGeographicCRS(targetCRS);
+                if (sourceCRS != null) {
+                    envelope = merged = new GeneralEnvelope(bounds);
+                    merged.translate(-getGreenwichLongitude(sourceCRS), 0);
+                    merged.setCoordinateReferenceSystem(sourceCRS);
+                    try {
+                        envelope = Envelopes.transform(envelope, targetCRS);
+                    } catch (TransformException exception) {
+                        /*
+                         * The envelope is probably outside the range of validity for this CRS.
+                         * It should not occurs, since the envelope is supposed to describe the
+                         * CRS area of validity. Logs a warning and returns null, since it is a
+                         * legal return value according this method contract.
+                         */
+                        unexpectedException("getEnvelope", exception);
+                        envelope = null;
+                    }
+                }
+            }
+        }
+        return envelope;
+    }
+
+    /**
      * Returns {@code true} if the given CRS is horizontal. The current implementation considers a
      * CRS as horizontal if it is two-dimensional and comply with one of the following conditions:
      *
@@ -414,7 +514,7 @@ public final class CRS extends Static {
      *       Conversely, a future SIS versions may impose more conditions on <code>EngineeringCRS</code>.
      *       See <a href="http://issues.apache.org/jira/browse/SIS-161">SIS-161</a>.
      *
-     * @param  crs The coordinate reference system, or {@code null}.
+     * @param  crs  the coordinate reference system, or {@code null}.
      * @return {@code true} if the given CRS is non-null and likely horizontal, or {@code false} otherwise.
      *
      * @see #getHorizontalComponent(CoordinateReferenceSystem)
@@ -448,8 +548,8 @@ public final class CRS extends Static {
      * <p>In the special case where a three-dimensional geographic CRS is found, this method will create a
      * two-dimensional geographic CRS without the vertical axis.</p>
      *
-     * @param  crs The coordinate reference system, or {@code null}.
-     * @return The first horizontal CRS, or {@code null} if none.
+     * @param  crs  the coordinate reference system, or {@code null}.
+     * @return the first horizontal CRS, or {@code null} if none.
      *
      * @category information
      */
@@ -511,10 +611,10 @@ public final class CRS extends Static {
      * <em>in last resort</em>, only if it can not find an existing {@code VerticalCRS} instance.
      * <strong>Note that this is not a valid CRS according ISO 19111</strong> — use with care.</p>
      *
-     * @param  crs The coordinate reference system, or {@code null}.
+     * @param  crs  the coordinate reference system, or {@code null}.
      * @param  allowCreateEllipsoidal {@code true} for allowing the creation of orphan CRS for ellipsoidal heights.
      *         The recommended value is {@code false}.
-     * @return The first vertical CRS, or {@code null} if none.
+     * @return the first vertical CRS, or {@code null} if none.
      *
      * @category information
      */
@@ -560,8 +660,8 @@ public final class CRS extends Static {
      * Otherwise if the given CRS is compound, then this method searches for the first temporal component
      * in the order of the {@linkplain #getSingleComponents(CoordinateReferenceSystem) single components list}.
      *
-     * @param  crs The coordinate reference system, or {@code null}.
-     * @return The first temporal CRS, or {@code null} if none.
+     * @param  crs  the coordinate reference system, or {@code null}.
+     * @return the first temporal CRS, or {@code null} if none.
      *
      * @category information
      */
@@ -619,8 +719,8 @@ public final class CRS extends Static {
      * Note that such flat lists are the only one allowed by ISO/OGC standards for compound CRS.
      * The hierarchical structure is an Apache SIS flexibility.</div>
      *
-     * @param  crs The coordinate reference system, or {@code null}.
-     * @return The single coordinate reference systems, or an empty list if the given CRS is {@code null}.
+     * @param  crs  the coordinate reference system, or {@code null}.
+     * @return the single coordinate reference systems, or an empty list if the given CRS is {@code null}.
      * @throws ClassCastException if a CRS is neither a {@link SingleCRS} or a {@link CompoundCRS}.
      *
      * @see DefaultCompoundCRS#getSingleComponents()
@@ -666,12 +766,12 @@ public final class CRS extends Static {
      * This method does <strong>not</strong> attempt to build new CRS from the components.
      * For example it does not attempt to create a 3D geographic CRS from a 2D one + a vertical component.
      *
-     * @param  crs   The coordinate reference system to decompose, or {@code null}.
-     * @param  lower The first dimension to keep, inclusive.
-     * @param  upper The last  dimension to keep, exclusive.
-     * @return The sub-coordinate system, or {@code null} if the given {@code crs} was {@code null}
+     * @param  crs    the coordinate reference system to decompose, or {@code null}.
+     * @param  lower  the first dimension to keep, inclusive.
+     * @param  upper  the last  dimension to keep, exclusive.
+     * @return the sub-coordinate system, or {@code null} if the given {@code crs} was {@code null}
      *         or can not be decomposed for dimensions in the [{@code lower} … {@code upper}] range.
-     * @throws IndexOutOfBoundsException If the given index are out of bounds.
+     * @throws IndexOutOfBoundsException if the given index are out of bounds.
      *
      * @since 0.5
      *
@@ -706,8 +806,8 @@ check:  while (lower != 0 || upper != di
      * Returns the Greenwich longitude of the prime meridian of the given CRS in degrees.
      * If the prime meridian uses an other unit than degrees, then the value will be converted.
      *
-     * @param  crs The coordinate reference system from which to get the prime meridian.
-     * @return The Greenwich longitude (in degrees) of the prime meridian of the given CRS.
+     * @param  crs  the coordinate reference system from which to get the prime meridian.
+     * @return the Greenwich longitude (in degrees) of the prime meridian of the given CRS.
      *
      * @since 0.5
      *
@@ -738,10 +838,10 @@ check:  while (lower != 0 || upper != di
      *     META-INF/services/org.opengis.referencing.crs.CRSAuthorityFactory
      * }
      *
-     * @param  authority The authority of the desired factory (typically {@code "EPSG"} or {@code "OGC"}),
+     * @param  authority  the authority of the desired factory (typically {@code "EPSG"} or {@code "OGC"}),
      *         or {@code null} for the {@link org.apache.sis.referencing.factory.MultiAuthoritiesFactory}
      *         instance that manage all factories.
-     * @return The system-wide authority factory used by SIS for the given authority.
+     * @return the system-wide authority factory used by SIS for the given authority.
      * @throws FactoryException if no factory can be returned for the given authority.
      *
      * @see #forCode(String)
@@ -755,4 +855,12 @@ check:  while (lower != 0 || upper != di
         }
         return AuthorityFactories.ALL.getAuthorityFactory(CRSAuthorityFactory.class, authority, null);
     }
+
+    /**
+     * Invoked when an unexpected exception occurred. Those exceptions must be non-fatal, i.e. the caller
+     * <strong>must</strong> have a reasonable fallback (otherwise it should propagate the exception).
+     */
+    private static void unexpectedException(final String methodName, final Exception exception) {
+        Logging.unexpectedException(Logging.getLogger(Loggers.REFERENCING), CRS.class, methodName, exception);
+    }
 }

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/IdentifiedObjects.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/IdentifiedObjects.java?rev=1755610&r1=1755609&r2=1755610&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/IdentifiedObjects.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/IdentifiedObjects.java [UTF-8] Tue Aug  9 14:48:04 2016
@@ -106,9 +106,9 @@ public final class IdentifiedObjects ext
      * values depend on the {@linkplain org.apache.sis.referencing.cs.DefaultCoordinateSystemAxis#getUnit()
      * units of measurement}.</div>
      *
-     * @param  object The identified object to view as a properties map.
-     * @param  excludes The keys of properties to exclude from the map.
-     * @return A view of the identified object properties as an immutable map.
+     * @param  object    the identified object to view as a properties map.
+     * @param  excludes  the keys of properties to exclude from the map.
+     * @return a view of the identified object properties as an immutable map.
      */
     public static Map<String,?> getProperties(final IdentifiedObject object, final String... excludes) {
         ArgumentChecks.ensureNonNull("object", object);
@@ -122,9 +122,9 @@ public final class IdentifiedObjects ext
      * stop at the first match. This method is useful in the rare cases where the same authority
      * declares more than one name, and all those names are of interest.
      *
-     * @param  object The object to get the names and aliases from, or {@code null}.
-     * @param  authority The authority for the names to return, or {@code null} for any authority.
-     * @return The object's names and aliases, or an empty set if no name or alias matching the
+     * @param  object     the object to get the names and aliases from, or {@code null}.
+     * @param  authority  the authority for the names to return, or {@code null} for any authority.
+     * @return the object's names and aliases, or an empty set if no name or alias matching the
      *         specified authority has been found.
      */
     public static Set<String> getNames(final IdentifiedObject object, final Citation authority) {
@@ -157,9 +157,9 @@ public final class IdentifiedObjects ext
      * interfaces (for example {@link NamedIdentifier}). In such cases, the identifier view has
      * precedence.
      *
-     * @param  object The object to get the name from, or {@code null}.
-     * @param  authority The authority for the name to return, or {@code null} for any authority.
-     * @return The object's name (either an {@linkplain Identifier#getCode() identifier code}
+     * @param  object     the object to get the name from, or {@code null}.
+     * @param  authority  the authority for the name to return, or {@code null} for any authority.
+     * @return the object's name (either an {@linkplain Identifier#getCode() identifier code}
      *         or a {@linkplain GenericName#tip() name tip}), or {@code null} if no name matching the
      *         specified authority has been found.
      *
@@ -174,10 +174,10 @@ public final class IdentifiedObjects ext
      * every properties are checked for null values, even the properties that are supposed to
      * be mandatory (not all implementation defines all mandatory values).
      *
-     * @param  object    The object to get the name from, or {@code null}.
-     * @param  authority The authority for the name to return, or {@code null} for any authority.
-     * @param  addTo     If non-null, the collection where to add all names found.
-     * @return The object's name (either an {@linkplain Identifier#getCode() identifier code}
+     * @param  object     the object to get the name from, or {@code null}.
+     * @param  authority  the authority for the name to return, or {@code null} for any authority.
+     * @param  addTo      if non-null, the collection where to add all names found.
+     * @return the object's name (either an {@linkplain Identifier#getCode() identifier code}
      *         or a {@linkplain GenericName#tip() name tip}), or {@code null} if no name matching the
      *         specified authority has been found.
      */
@@ -265,10 +265,10 @@ public final class IdentifiedObjects ext
      * order and returns the first identifier with an {@linkplain NamedIdentifier#getAuthority() authority} citation
      * {@linkplain Citations#identifierMatches(Citation, Citation) matching} the specified authority.
      *
-     * @param  object The object to get the identifier from, or {@code null}.
-     * @param  authority The authority for the identifier to return, or {@code null} for
+     * @param  object     the object to get the identifier from, or {@code null}.
+     * @param  authority  the authority for the identifier to return, or {@code null} for
      *         the first identifier regardless its authority.
-     * @return The object's identifier, or {@code null} if no identifier matching the specified authority
+     * @return the object's identifier, or {@code null} if no identifier matching the specified authority
      *         has been found.
      *
      * @see AbstractIdentifiedObject#getIdentifier()
@@ -303,8 +303,8 @@ public final class IdentifiedObjects ext
      *       database looking for a match, use one of the search methods defined below.</li>
      * </ul>
      *
-     * @param  object The identified object, or {@code null}.
-     * @return A string representation of the first identifier or name, or {@code null} if none.
+     * @param  object  the identified object, or {@code null}.
+     * @return a string representation of the first identifier or name, or {@code null} if none.
      *
      * @see #getIdentifier(IdentifiedObject, Citation)
      * @see #lookupURN(IdentifiedObject, Citation)
@@ -337,8 +337,8 @@ public final class IdentifiedObjects ext
      *   <li><code>object.{@linkplain AbstractIdentifiedObject#getIdentifiers() getIdentifiers()}</code> in iteration order</li>
      * </ul>
      *
-     * @param  object The identified object, or {@code null}.
-     * @return The first name, alias or identifier which is a valid Unicode identifier, or {@code null} if none.
+     * @param  object  the identified object, or {@code null}.
+     * @return the first name, alias or identifier which is a valid Unicode identifier, or {@code null} if none.
      *
      * @see org.apache.sis.metadata.iso.ImmutableIdentifier
      * @see org.apache.sis.metadata.iso.citation.Citations#getUnicodeIdentifier(Citation)
@@ -397,11 +397,11 @@ public final class IdentifiedObjects ext
      *
      * This method can be seen as a converse of {@link CRS#forCode(String)}.
      *
-     * @param  object The object (usually a {@linkplain org.apache.sis.referencing.crs.AbstractCRS
+     * @param  object  the object (usually a {@linkplain org.apache.sis.referencing.crs.AbstractCRS
      *         coordinate reference system}) whose identifier is to be found, or {@code null}.
-     * @param  authority The authority for the identifier to return, or {@code null} for
+     * @param  authority  the authority for the identifier to return, or {@code null} for
      *         the first identifier regardless its authority.
-     * @return The identifier, or {@code null} if none was found without ambiguity or if the given object was null.
+     * @return the identifier, or {@code null} if none was found without ambiguity or if the given object was null.
      * @throws FactoryException if an error occurred during the search.
      *
      * @see #newFinder(String)
@@ -455,9 +455,9 @@ public final class IdentifiedObjects ext
      *
      * This method can be seen as a converse of {@link CRS#forCode(String)}.
      *
-     * @param  object The object (usually a {@linkplain org.apache.sis.referencing.crs.AbstractCRS
+     * @param  object  the object (usually a {@linkplain org.apache.sis.referencing.crs.AbstractCRS
      *         coordinate reference system}) whose EPSG code is to be found, or {@code null}.
-     * @return The EPSG code, or {@code null} if none was found without ambiguity or if the given object was null.
+     * @return the EPSG code, or {@code null} if none was found without ambiguity or if the given object was null.
      * @throws FactoryException if an error occurred during the search.
      *
      * @see #newFinder(String)
@@ -476,7 +476,7 @@ public final class IdentifiedObjects ext
                         return null;
                     }
                 } catch (NumberFormatException e) {
-                    Logging.recoverableException(Logging.getLogger(Loggers.CRS_FACTORY), IdentifiedObjects.class, "lookupEPSG", e);
+                    Logging.recoverableException(Logging.getLogger(Loggers.REFERENCING), IdentifiedObjects.class, "lookupEPSG", e);
                 }
             }
         }
@@ -512,9 +512,9 @@ public final class IdentifiedObjects ext
      *     Set<IdentifiedObject> found = finder.find(object);
      * }</div>
      *
-     * @param  authority The authority of the objects to search (typically {@code "EPSG"} or {@code "OGC"}),
+     * @param  authority  the authority of the objects to search (typically {@code "EPSG"} or {@code "OGC"}),
      *         or {@code null} for searching among the objects created by all authorities.
-     * @return A finder to use for looking up unidentified objects.
+     * @return a finder to use for looking up unidentified objects.
      * @throws NoSuchAuthorityFactoryException if the given authority is not found.
      * @throws FactoryException if the finder can not be created for another reason.
      *
@@ -564,8 +564,8 @@ public final class IdentifiedObjects ext
      *
      * If the {@code object} argument is {@code null}, then this method returns {@code false}.
      *
-     * @param  object The object for which to check the name or alias, or {@code null}.
-     * @param  name The name to compare with the object name or aliases.
+     * @param  object  the object for which to check the name or alias, or {@code null}.
+     * @param  name    the name to compare with the object name or aliases.
      * @return {@code true} if the primary name or at least one alias matches the specified {@code name}.
      *
      * @see AbstractIdentifiedObject#isHeuristicMatchForName(String)
@@ -636,9 +636,9 @@ public final class IdentifiedObjects ext
      *
      * <p>The above tables may be expanded in any future SIS version.</p>
      *
-     * @param  type A type assignable to one of the types listed in above table.
-     * @param  identifier The identifier for which to format a URN, or {@code null}.
-     * @return The URN for the given identifier, or {@code null} if the given identifier was null
+     * @param  type  a type assignable to one of the types listed in above table.
+     * @param  identifier  the identifier for which to format a URN, or {@code null}.
+     * @return the URN for the given identifier, or {@code null} if the given identifier was null
      *         or can not be formatted by this method.
      *
      * @see #lookupURN(IdentifiedObject, Citation)
@@ -676,8 +676,8 @@ public final class IdentifiedObjects ext
      * the {@link org.apache.sis.metadata.iso.DefaultIdentifier} implementation is formatted as a tree.
      * This static method can be used when a "name-like" representation is needed for any implementation.
      *
-     * @param  identifier The identifier, or {@code null}.
-     * @return A string representation of the given identifier, or {@code null}.
+     * @param  identifier  the identifier, or {@code null}.
+     * @return a string representation of the given identifier, or {@code null}.
      *
      * @see org.apache.sis.metadata.iso.ImmutableIdentifier#toString()
      * @see NamedIdentifier#toString()

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/MultiAuthoritiesFactory.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/MultiAuthoritiesFactory.java?rev=1755610&r1=1755609&r2=1755610&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/MultiAuthoritiesFactory.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/MultiAuthoritiesFactory.java [UTF-8] Tue Aug  9 14:48:04 2016
@@ -202,10 +202,10 @@ public class MultiAuthoritiesFactory ext
      * but does not cache the objects created by those factories.
      * This constructor assumes that the given factories already do their own caching.
      *
-     * @param crsFactories   The factories for creating {@link CoordinateReferenceSystem} objects, or null if none.
-     * @param csFactories    The factories for creating {@link CoordinateSystem} objects, or null if none.
-     * @param datumFactories The factories for creating {@link Datum} objects, or null if none.
-     * @param copFactories   The factories for creating {@link CoordinateOperation} objects, or null if none.
+     * @param crsFactories    the factories for creating {@link CoordinateReferenceSystem} objects, or null if none.
+     * @param csFactories     the factories for creating {@link CoordinateSystem} objects, or null if none.
+     * @param datumFactories  the factories for creating {@link Datum} objects, or null if none.
+     * @param copFactories    the factories for creating {@link CoordinateOperation} objects, or null if none.
      */
     @SuppressWarnings({"unchecked", "rawtypes", "empty-statement"})    // Generic array creation.
     public MultiAuthoritiesFactory(final Iterable<? extends CRSAuthorityFactory> crsFactories,
@@ -247,7 +247,7 @@ public class MultiAuthoritiesFactory ext
      * The default value is {@code false}, which means that an exception will be thrown
      * if there is no factory specifically for the requested version.
      *
-     * @return Whether this factory should relax some rules when processing a given authority code.
+     * @return whether this factory should relax some rules when processing a given authority code.
      */
     public boolean isLenient() {
         return isLenient;
@@ -256,7 +256,7 @@ public class MultiAuthoritiesFactory ext
     /**
      * Sets whether this factory should relax some rules when processing a given code.
      *
-     * @param lenient Whether this factory should relax some rules when processing a given authority code.
+     * @param lenient whether this factory should relax some rules when processing a given authority code.
      */
     public void setLenient(final boolean lenient) {
         isLenient = lenient;
@@ -292,8 +292,8 @@ public class MultiAuthoritiesFactory ext
      *       since it may be costly.</li>
      * </ul>
      *
-     * @param  type The spatial reference objects type.
-     * @return The set of authority codes for spatial reference objects of the given type.
+     * @param  type  the spatial reference objects type.
+     * @return the set of authority codes for spatial reference objects of the given type.
      * @throws FactoryException if access to an underlying factory failed.
      */
     @Override
@@ -468,7 +468,7 @@ public class MultiAuthoritiesFactory ext
      * the current implementation may be relatively costly since it implies instantiation of all factories.
      * </div>
      *
-     * @return The code spaces of all factories.
+     * @return the code spaces of all factories.
      */
     @Override
     @SuppressWarnings("ReturnOfCollectionOrArrayField")
@@ -512,9 +512,9 @@ public class MultiAuthoritiesFactory ext
      * Caches the given factory, but without replacing existing instance if any.
      * This method returns the factory that we should use, either the given instance of the cached one.
      *
-     * @param  identifier The type, authority and version of the factory to cache.
-     * @param  factory The factory to cache.
-     * @return The given {@code factory} if no previous instance was cached, or the existing instance otherwise.
+     * @param  identifier  the type, authority and version of the factory to cache.
+     * @param  factory     the factory to cache.
+     * @return the given {@code factory} if no previous instance was cached, or the existing instance otherwise.
      */
     private AuthorityFactory cache(final AuthorityFactoryIdentifier identifier, final AuthorityFactory factory) {
         final AuthorityFactory existing = JDK8.putIfAbsent(factories, identifier.intern(), factory);
@@ -539,13 +539,13 @@ public class MultiAuthoritiesFactory ext
     /**
      * Returns the factory identified by the given type, authority and version.
      *
-     * @param  <T>        The compile-time value of {@code type}.
-     * @param  type       The type of the desired factory as one of the {@link CRSAuthorityFactory}, {@link CSAuthorityFactory},
+     * @param  <T>        the compile-time value of {@code type}.
+     * @param  type       the type of the desired factory as one of the {@link CRSAuthorityFactory}, {@link CSAuthorityFactory},
      *                    {@link DatumAuthorityFactory} or {@link CoordinateOperationFactory} interfaces.
-     * @param  authority  The namespace or authority identifier of the desired factory.
+     * @param  authority  the namespace or authority identifier of the desired factory.
      *                    Examples: {@code "EPSG"}, {@code "CRS"} or {@code "AUTO2"}.
-     * @param  version    The version of the desired factory, or {@code null} for the default version.
-     * @return The factory for the given type, authority and version.
+     * @param  version    the version of the desired factory, or {@code null} for the default version.
+     * @return the factory for the given type, authority and version.
      * @throws NoSuchAuthorityFactoryException if no suitable factory has been found.
      */
     /*
@@ -565,8 +565,8 @@ public class MultiAuthoritiesFactory ext
      * Returns the factory identified by the given type, authority and version. If no such factory is found in
      * the cache, then this method iterates over the factories created by the providers given at construction time.
      *
-     * @param  request The type, authority and version of the desired factory.
-     * @return The factory for the given type, authority and version.
+     * @param  request  the type, authority and version of the desired factory.
+     * @return the factory for the given type, authority and version.
      * @throws NoSuchAuthorityFactoryException if no suitable factory has been found.
      */
     private AuthorityFactory getAuthorityFactory(final AuthorityFactoryIdentifier request)
@@ -724,10 +724,10 @@ public class MultiAuthoritiesFactory ext
     /**
      * Creates an object from a code using the given proxy.
      *
-     * @param  <T>   The type of the object to be returned.
-     * @param  proxy The proxy to use for creating the object.
-     * @param  code  The code of the object to create.
-     * @return The object from one of the authority factory specified at construction time.
+     * @param  <T>    the type of the object to be returned.
+     * @param  proxy  the proxy to use for creating the object.
+     * @param  code   the code of the object to create.
+     * @return the object from one of the authority factory specified at construction time.
      * @throws FactoryException If an error occurred while creating the object.
      */
     final <T> T create(AuthorityFactoryProxy<? extends T> proxy, String code) throws FactoryException {
@@ -817,7 +817,7 @@ public class MultiAuthoritiesFactory ext
      *   <li>{@code http://www.opengis.net/gml/srs/}<var>authority</var>{@code .xml#}<var>code</var></li>
      * </ul>
      *
-     * @return A description of the object, or {@code null} if the object
+     * @return a description of the object, or {@code null} if the object
      *         corresponding to the specified {@code code} has no description.
      * @throws FactoryException if an error occurred while fetching the description.
      */
@@ -840,7 +840,7 @@ public class MultiAuthoritiesFactory ext
      * The two first formats are ambiguous when used with this {@code createObject(String)} method
      * because different kinds of objects can have the same code.
      *
-     * @return The object for the given code.
+     * @return the object for the given code.
      * @throws FactoryException if the object creation failed.
      */
     @Override
@@ -859,7 +859,7 @@ public class MultiAuthoritiesFactory ext
      *   <li>{@code http://www.opengis.net/gml/srs/}<var>authority</var>{@code .xml#}<var>code</var></li>
      * </ul>
      *
-     * @return The coordinate reference system for the given code.
+     * @return the coordinate reference system for the given code.
      * @throws FactoryException if the object creation failed.
      */
     @Override
@@ -878,7 +878,7 @@ public class MultiAuthoritiesFactory ext
      *   <li>{@code http://www.opengis.net/gml/srs/}<var>authority</var>{@code .xml#}<var>code</var></li>
      * </ul>
      *
-     * @return The coordinate reference system for the given code.
+     * @return the coordinate reference system for the given code.
      * @throws FactoryException if the object creation failed.
      */
     @Override
@@ -897,7 +897,7 @@ public class MultiAuthoritiesFactory ext
      *   <li>{@code http://www.opengis.net/gml/srs/}<var>authority</var>{@code .xml#}<var>code</var></li>
      * </ul>
      *
-     * @return The coordinate reference system for the given code.
+     * @return the coordinate reference system for the given code.
      * @throws FactoryException if the object creation failed.
      */
     @Override
@@ -916,7 +916,7 @@ public class MultiAuthoritiesFactory ext
      *   <li>{@code http://www.opengis.net/gml/srs/}<var>authority</var>{@code .xml#}<var>code</var></li>
      * </ul>
      *
-     * @return The coordinate reference system for the given code.
+     * @return the coordinate reference system for the given code.
      * @throws FactoryException if the object creation failed.
      */
     @Override
@@ -935,7 +935,7 @@ public class MultiAuthoritiesFactory ext
      *   <li>{@code http://www.opengis.net/gml/srs/}<var>authority</var>{@code .xml#}<var>code</var></li>
      * </ul>
      *
-     * @return The coordinate reference system for the given code.
+     * @return the coordinate reference system for the given code.
      * @throws FactoryException if the object creation failed.
      */
     @Override
@@ -954,7 +954,7 @@ public class MultiAuthoritiesFactory ext
      *   <li>{@code http://www.opengis.net/gml/srs/}<var>authority</var>{@code .xml#}<var>code</var></li>
      * </ul>
      *
-     * @return The coordinate reference system for the given code.
+     * @return the coordinate reference system for the given code.
      * @throws FactoryException if the object creation failed.
      */
     @Override
@@ -973,7 +973,7 @@ public class MultiAuthoritiesFactory ext
      *   <li>{@code http://www.opengis.net/gml/srs/}<var>authority</var>{@code .xml#}<var>code</var></li>
      * </ul>
      *
-     * @return The coordinate reference system for the given code.
+     * @return the coordinate reference system for the given code.
      * @throws FactoryException if the object creation failed.
      */
     @Override
@@ -992,7 +992,7 @@ public class MultiAuthoritiesFactory ext
      *   <li>{@code http://www.opengis.net/gml/srs/}<var>authority</var>{@code .xml#}<var>code</var></li>
      * </ul>
      *
-     * @return The coordinate reference system for the given code.
+     * @return the coordinate reference system for the given code.
      * @throws FactoryException if the object creation failed.
      */
     @Override
@@ -1011,7 +1011,7 @@ public class MultiAuthoritiesFactory ext
      *   <li>{@code http://www.opengis.net/gml/srs/}<var>authority</var>{@code .xml#}<var>code</var></li>
      * </ul>
      *
-     * @return The coordinate reference system for the given code.
+     * @return the coordinate reference system for the given code.
      * @throws FactoryException if the object creation failed.
      */
     @Override
@@ -1030,7 +1030,7 @@ public class MultiAuthoritiesFactory ext
      *   <li>{@code http://www.opengis.net/gml/srs/}<var>authority</var>{@code .xml#}<var>code</var></li>
      * </ul>
      *
-     * @return The coordinate reference system for the given code.
+     * @return the coordinate reference system for the given code.
      * @throws FactoryException if the object creation failed.
      */
     @Override
@@ -1048,7 +1048,7 @@ public class MultiAuthoritiesFactory ext
      *   <li><code>http://www.opengis.net/def/<b>datum</b>/</code><var>authority</var>{@code /}<var>version</var>{@code /}<var>code</var></li>
      * </ul>
      *
-     * @return The datum for the given code.
+     * @return the datum for the given code.
      * @throws FactoryException if the object creation failed.
      */
     @Override
@@ -1066,7 +1066,7 @@ public class MultiAuthoritiesFactory ext
      *   <li><code>http://www.opengis.net/def/<b>datum</b>/</code><var>authority</var>{@code /}<var>version</var>{@code /}<var>code</var></li>
      * </ul>
      *
-     * @return The datum for the given code.
+     * @return the datum for the given code.
      * @throws FactoryException if the object creation failed.
      */
     @Override
@@ -1084,7 +1084,7 @@ public class MultiAuthoritiesFactory ext
      *   <li><code>http://www.opengis.net/def/<b>datum</b>/</code><var>authority</var>{@code /}<var>version</var>{@code /}<var>code</var></li>
      * </ul>
      *
-     * @return The datum for the given code.
+     * @return the datum for the given code.
      * @throws FactoryException if the object creation failed.
      */
     @Override
@@ -1102,7 +1102,7 @@ public class MultiAuthoritiesFactory ext
      *   <li><code>http://www.opengis.net/def/<b>datum</b>/</code><var>authority</var>{@code /}<var>version</var>{@code /}<var>code</var></li>
      * </ul>
      *
-     * @return The datum for the given code.
+     * @return the datum for the given code.
      * @throws FactoryException if the object creation failed.
      */
     @Override
@@ -1120,7 +1120,7 @@ public class MultiAuthoritiesFactory ext
      *   <li><code>http://www.opengis.net/def/<b>datum</b>/</code><var>authority</var>{@code /}<var>version</var>{@code /}<var>code</var></li>
      * </ul>
      *
-     * @return The datum for the given code.
+     * @return the datum for the given code.
      * @throws FactoryException if the object creation failed.
      */
     @Override
@@ -1138,7 +1138,7 @@ public class MultiAuthoritiesFactory ext
      *   <li><code>http://www.opengis.net/def/<b>datum</b>/</code><var>authority</var>{@code /}<var>version</var>{@code /}<var>code</var></li>
      * </ul>
      *
-     * @return The datum for the given code.
+     * @return the datum for the given code.
      * @throws FactoryException if the object creation failed.
      */
     @Override
@@ -1156,7 +1156,7 @@ public class MultiAuthoritiesFactory ext
      *   <li><code>http://www.opengis.net/def/<b>ellipsoid</b>/</code><var>authority</var>{@code /}<var>version</var>{@code /}<var>code</var></li>
      * </ul>
      *
-     * @return The ellipsoid for the given code.
+     * @return the ellipsoid for the given code.
      * @throws FactoryException if the object creation failed.
      */
     @Override
@@ -1174,7 +1174,7 @@ public class MultiAuthoritiesFactory ext
      *   <li><code>http://www.opengis.net/def/<b>meridian</b>/</code><var>authority</var>{@code /}<var>version</var>{@code /}<var>code</var></li>
      * </ul>
      *
-     * @return The prime meridian for the given code.
+     * @return the prime meridian for the given code.
      * @throws FactoryException if the object creation failed.
      */
     @Override
@@ -1190,7 +1190,7 @@ public class MultiAuthoritiesFactory ext
      *   <li><var>authority</var>{@code :}<var>version</var>{@code :}<var>code</var></li>
      * </ul>
      *
-     * @return The extent for the given code.
+     * @return the extent for the given code.
      * @throws FactoryException if the object creation failed.
      */
     @Override
@@ -1208,7 +1208,7 @@ public class MultiAuthoritiesFactory ext
      *   <li><code>http://www.opengis.net/def/<b>cs</b>/</code><var>authority</var>{@code /}<var>version</var>{@code /}<var>code</var></li>
      * </ul>
      *
-     * @return The coordinate system for the given code.
+     * @return the coordinate system for the given code.
      * @throws FactoryException if the object creation failed.
      */
     @Override
@@ -1226,7 +1226,7 @@ public class MultiAuthoritiesFactory ext
      *   <li><code>http://www.opengis.net/def/<b>cs</b>/</code><var>authority</var>{@code /}<var>version</var>{@code /}<var>code</var></li>
      * </ul>
      *
-     * @return The coordinate system for the given code.
+     * @return the coordinate system for the given code.
      * @throws FactoryException if the object creation failed.
      */
     @Override
@@ -1244,7 +1244,7 @@ public class MultiAuthoritiesFactory ext
      *   <li><code>http://www.opengis.net/def/<b>cs</b>/</code><var>authority</var>{@code /}<var>version</var>{@code /}<var>code</var></li>
      * </ul>
      *
-     * @return The coordinate system for the given code.
+     * @return the coordinate system for the given code.
      * @throws FactoryException if the object creation failed.
      */
     @Override
@@ -1262,7 +1262,7 @@ public class MultiAuthoritiesFactory ext
      *   <li><code>http://www.opengis.net/def/<b>cs</b>/</code><var>authority</var>{@code /}<var>version</var>{@code /}<var>code</var></li>
      * </ul>
      *
-     * @return The coordinate system for the given code.
+     * @return the coordinate system for the given code.
      * @throws FactoryException if the object creation failed.
      */
     @Override
@@ -1280,7 +1280,7 @@ public class MultiAuthoritiesFactory ext
      *   <li><code>http://www.opengis.net/def/<b>cs</b>/</code><var>authority</var>{@code /}<var>version</var>{@code /}<var>code</var></li>
      * </ul>
      *
-     * @return The coordinate system for the given code.
+     * @return the coordinate system for the given code.
      * @throws FactoryException if the object creation failed.
      */
     @Override
@@ -1298,7 +1298,7 @@ public class MultiAuthoritiesFactory ext
      *   <li><code>http://www.opengis.net/def/<b>cs</b>/</code><var>authority</var>{@code /}<var>version</var>{@code /}<var>code</var></li>
      * </ul>
      *
-     * @return The coordinate system for the given code.
+     * @return the coordinate system for the given code.
      * @throws FactoryException if the object creation failed.
      */
     @Override
@@ -1317,7 +1317,7 @@ public class MultiAuthoritiesFactory ext
      *   <li><code>http://www.opengis.net/def/<b>cs</b>/</code><var>authority</var>{@code /}<var>version</var>{@code /}<var>code</var></li>
      * </ul>
      *
-     * @return The coordinate system for the given code.
+     * @return the coordinate system for the given code.
      * @throws FactoryException if the object creation failed.
      */
     @Override
@@ -1336,7 +1336,7 @@ public class MultiAuthoritiesFactory ext
      *   <li><code>http://www.opengis.net/def/<b>cs</b>/</code><var>authority</var>{@code /}<var>version</var>{@code /}<var>code</var></li>
      * </ul>
      *
-     * @return The coordinate system for the given code.
+     * @return the coordinate system for the given code.
      * @throws FactoryException if the object creation failed.
      */
     @Override
@@ -1354,7 +1354,7 @@ public class MultiAuthoritiesFactory ext
      *   <li><code>http://www.opengis.net/def/<b>axis</b>/</code><var>authority</var>{@code /}<var>version</var>{@code /}<var>code</var></li>
      * </ul>
      *
-     * @return The axis for the given code.
+     * @return the axis for the given code.
      * @throws FactoryException if the object creation failed.
      */
     @Override
@@ -1372,7 +1372,7 @@ public class MultiAuthoritiesFactory ext
      *   <li><code>http://www.opengis.net/def/<b>uom</b>/</code><var>authority</var>{@code /}<var>version</var>{@code /}<var>code</var></li>
      * </ul>
      *
-     * @return The unit of measurement for the given code.
+     * @return the unit of measurement for the given code.
      * @throws FactoryException if the object creation failed.
      */
     @Override
@@ -1390,7 +1390,7 @@ public class MultiAuthoritiesFactory ext
      *   <li><code>http://www.opengis.net/def/<b>parameter</b>/</code><var>authority</var>{@code /}<var>version</var>{@code /}<var>code</var></li>
      * </ul>
      *
-     * @return The parameter descriptor for the given code.
+     * @return the parameter descriptor for the given code.
      * @throws FactoryException if the object creation failed.
      */
     @Override
@@ -1408,7 +1408,7 @@ public class MultiAuthoritiesFactory ext
      *   <li><code>http://www.opengis.net/def/<b>method</b>/</code><var>authority</var>{@code /}<var>version</var>{@code /}<var>code</var></li>
      * </ul>
      *
-     * @return The operation method for the given code.
+     * @return the operation method for the given code.
      * @throws FactoryException if the object creation failed.
      */
     @Override
@@ -1426,7 +1426,7 @@ public class MultiAuthoritiesFactory ext
      *   <li><code>http://www.opengis.net/def/<b>coordinateOperation</b>/</code><var>authority</var>{@code /}<var>version</var>{@code /}<var>code</var></li>
      * </ul>
      *
-     * @return The operation for the given code.
+     * @return the operation for the given code.
      * @throws FactoryException if the object creation failed.
      */
     @Override
@@ -1489,7 +1489,7 @@ public class MultiAuthoritiesFactory ext
      * Creates a finder which can be used for looking up unidentified objects.
      * The default implementation delegates the lookups to the underlying factories.
      *
-     * @return A finder to use for looking up unidentified objects.
+     * @return a finder to use for looking up unidentified objects.
      * @throws FactoryException if the finder can not be created.
      */
     @Override

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/ProjectionException.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/ProjectionException.java?rev=1755610&r1=1755609&r2=1755610&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/ProjectionException.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/ProjectionException.java [UTF-8] Tue Aug  9 14:48:04 2016
@@ -23,6 +23,22 @@ import org.apache.sis.util.resources.Err
 /**
  * Thrown by {@link NormalizedProjection} when a map projection failed.
  *
+ * <div class="section">When this exception is thrown</div>
+ * Apache SIS implementations of map projections return a {@linkplain Double#isFinite(double) finite} number
+ * under normal conditions, but may also return an {@linkplain Double#isInfinite(double) infinite} number or
+ * {@linkplain Double#isNaN(double) NaN} value, or throw this exception.
+ * The behavior depends on the reason why the projection can not return a finite number:
+ *
+ * <ul>
+ *   <li>If the expected mathematical value is infinite (for example the Mercator projection at ±90° of latitude),
+ *       then the map projection should return a {@link Double#POSITIVE_INFINITY} or {@link Double#NEGATIVE_INFINITY},
+ *       depending on the sign of the correct mathematical answer.</li>
+ *   <li>If no real number is expected to exist for the input coordinate (for example the root of a negative value),
+ *       then the map projection should return {@link Double#NaN}.</li>
+ *   <li>If a real number is expected to exist but the map projection fails to compute it (for example because an
+ *       iterative algorithm does not converge), then the projection should throw {@code ProjectionException}.</li>
+ * </ul>
+ *
  * @author  André Gosselin (MPO)
  * @author  Martin Desruisseaux (MPO, IRD, Geomatys)
  * @since   0.6
@@ -44,7 +60,7 @@ public class ProjectionException extends
     /**
      * Constructs a new exception with the specified detail message.
      *
-     * @param message The details message, or {@code null} if none.
+     * @param  message  the details message, or {@code null} if none.
      */
     public ProjectionException(final String message) {
         super(message);
@@ -54,7 +70,7 @@ public class ProjectionException extends
      * Constructs a new exception with the specified cause.
      * The details message is copied from the cause.
      *
-     * @param cause The cause, or {@code null} if none.
+     * @param  cause  the cause, or {@code null} if none.
      */
     public ProjectionException(final Throwable cause) {
         super(cause.getLocalizedMessage(), cause);
@@ -63,8 +79,8 @@ public class ProjectionException extends
     /**
      * Constructs a new exception with the specified detail message and cause.
      *
-     * @param message The details message, or {@code null} if none.
-     * @param cause   The cause, or {@code null} if none.
+     * @param  message  the details message, or {@code null} if none.
+     * @param  cause    the cause, or {@code null} if none.
      */
     public ProjectionException(final String message, final Throwable cause) {
         super(message, cause);
@@ -73,7 +89,7 @@ public class ProjectionException extends
     /**
      * Constructs a new exception with the specified detail message.
      *
-     * @param code One of the constants suitable for {@link Errors#format(short)}.
+     * @param  code  one of the constants suitable for {@link Errors#format(short)}.
      */
     ProjectionException(final short code) {
         this(Errors.format(code));

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/LinearInterpolator1D.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/LinearInterpolator1D.java?rev=1755610&r1=1755609&r2=1755610&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/LinearInterpolator1D.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/LinearInterpolator1D.java [UTF-8] Tue Aug  9 14:48:04 2016
@@ -100,17 +100,21 @@ final class LinearInterpolator1D extends
         final int n = values.length - 1;
         final double offset = values[0];
         double slope = (values[n] - offset) / n;
+        final double as = Math.abs(slope);
         /*
          * If the increment between values is constant (with a small tolerance factor),
          * return a one-dimensional affine transform instead than an interpolator.
          * We need to perform this check before the sign reversal applied after this loop.
          */
-        final double tolerance = Math.abs(slope) * Numerics.COMPARISON_THRESHOLD;
-        for (int i=0; Numerics.epsilonEqual(values[++i]-offset, slope*i, tolerance);) {
-            if (i >= n) {
+        double value;
+        int i = 0;
+        do {
+            if (++i >= n) {
                 return LinearTransform1D.create(slope, offset);
             }
-        }
+            value = values[i];
+        } while (Numerics.epsilonEqual(value, offset + slope*i,
+                        Math.max(Math.abs(value), as) * Numerics.COMPARISON_THRESHOLD));
         /*
          * If the values are in decreasing order, reverse their sign so we get increasing order.
          * We will multiply the results by -1 after the transformation.
@@ -118,7 +122,7 @@ final class LinearInterpolator1D extends
         final boolean isReverted = (slope < 0);
         if (isReverted) {
             slope = -slope;
-            for (int i=0; i<=n; i++) {
+            for (i=0; i <= n; i++) {
                 values[i] = -values[i];
             }
         }
@@ -390,7 +394,7 @@ final class LinearInterpolator1D extends
      */
     @Override
     protected int computeHashCode() {
-        return super.hashCode() ^ Arrays.hashCode(values);
+        return super.computeHashCode() ^ Arrays.hashCode(values);
     }
 
     /**

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/OperationMethodSet.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/OperationMethodSet.java?rev=1755610&r1=1755609&r2=1755610&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/OperationMethodSet.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/OperationMethodSet.java [UTF-8] Tue Aug  9 14:48:04 2016
@@ -73,8 +73,8 @@ final class OperationMethodSet extends S
      * Constructs a set wrapping the given iterable.
      * The caller musts holds the lock on {@code methods} when invoking this constructor.
      *
-     * @param type The type of coordinate operation for which to retain methods.
-     * @param methods The {@link DefaultMathTransformFactory#methods} used for fetching the initial methods.
+     * @param  type     the type of coordinate operation for which to retain methods.
+     * @param  methods  the {@link DefaultMathTransformFactory#methods} used for fetching the initial methods.
      */
     OperationMethodSet(final Class<? extends SingleOperation> type,
             final Iterable<? extends OperationMethod> methods)



Mime
View raw message