Author: desruisseaux
Date: Thu Jun 5 22:14:53 2014
New Revision: 1600780
URL: http://svn.apache.org/r1600780
Log:
Merge from the JDK6 branch.
Added:
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/DirectPositionView.java
- copied, changed from r1600777,
sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/DirectPositionView.java
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/Semaphores.java
- copied unchanged from r1600777,
sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/Semaphores.java
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/j2d/
- copied from r1600777,
sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/j2d/
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/Parameterized.java
- copied unchanged from r1600777,
sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/parameter/Parameterized.java
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/provider/
- copied from r1600777,
sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/provider/
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/AbstractMathTransform.java
- copied unchanged from r1600777,
sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/AbstractMathTransform.java
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/AbstractMathTransform1D.java
- copied unchanged from r1600777,
sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/AbstractMathTransform1D.java
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/AbstractMathTransform2D.java
- copied unchanged from r1600777,
sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/AbstractMathTransform2D.java
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ConcatenatedTransform.java
- copied unchanged from r1600777,
sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ConcatenatedTransform.java
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ConcatenatedTransform1D.java
- copied unchanged from r1600777,
sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ConcatenatedTransform1D.java
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ConcatenatedTransform2D.java
- copied unchanged from r1600777,
sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ConcatenatedTransform2D.java
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ConcatenatedTransformDirect.java
- copied unchanged from r1600777,
sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ConcatenatedTransformDirect.java
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ConcatenatedTransformDirect1D.java
- copied unchanged from r1600777,
sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ConcatenatedTransformDirect1D.java
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ConcatenatedTransformDirect2D.java
- copied unchanged from r1600777,
sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ConcatenatedTransformDirect2D.java
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ConstantTransform1D.java
- copied unchanged from r1600777,
sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ConstantTransform1D.java
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/CopyTransform.java
- copied unchanged from r1600777,
sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/CopyTransform.java
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/IdentityTransform.java
- copied unchanged from r1600777,
sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/IdentityTransform.java
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/IdentityTransform1D.java
- copied unchanged from r1600777,
sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/IdentityTransform1D.java
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/IterationStrategy.java
- copied unchanged from r1600777,
sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/IterationStrategy.java
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/LinearTransform1D.java
- copied unchanged from r1600777,
sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/LinearTransform1D.java
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/MathTransforms.java
- copied unchanged from r1600777,
sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/MathTransforms.java
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/PassThroughTransform.java
- copied unchanged from r1600777,
sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/PassThroughTransform.java
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/PassThroughTransform2D.java
- copied unchanged from r1600777,
sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/PassThroughTransform2D.java
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ProjectiveTransform.java
- copied unchanged from r1600777,
sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ProjectiveTransform.java
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ProjectiveTransform2D.java
- copied unchanged from r1600777,
sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ProjectiveTransform2D.java
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/formulas.html
- copied unchanged from r1600777,
sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/formulas.html
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/package-info.java
- copied unchanged from r1600777,
sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/package-info.java
sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/
- copied from r1600777,
sis/branches/JDK6/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/
Modified:
sis/trunk/ (props changed)
sis/trunk/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractAssociation.java
sis/trunk/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractIdentifiedType.java
sis/trunk/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultAssociationRole.java
sis/trunk/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultFeatureType.java
sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/Formatter.java
sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ISOMetadata.java
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/Formulas.java
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/package-info.java
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrices.java
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/LinearTransform.java
sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java
sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java
sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties
sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties
sis/trunk/pom.xml
Propchange: sis/trunk/
------------------------------------------------------------------------------
Merged /sis/branches/JDK8:r1599169-1600774
Merged /sis/branches/JDK7:r1599171-1600775
Merged /sis/branches/JDK6:r1599193-1600777
Modified:
sis/trunk/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractAssociation.java
URL:
http://svn.apache.org/viewvc/sis/trunk/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractAssociation.java?rev=1600780&r1=1600779&r2=1600780&view=diff
==============================================================================
---
sis/trunk/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractAssociation.java
[UTF-8] (original)
+++
sis/trunk/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractAssociation.java
[UTF-8] Thu Jun 5 22:14:53 2014
@@ -27,7 +27,7 @@ import org.apache.sis.util.resources.Err
/**
- * Indicates the role played by the association between two features.
+ * An instance of an {@linkplain DefaultAssociationRole feature association
role} containing the associated feature.
*
* {@section Limitations}
* <ul>
Modified:
sis/trunk/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractIdentifiedType.java
URL:
http://svn.apache.org/viewvc/sis/trunk/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractIdentifiedType.java?rev=1600780&r1=1600779&r2=1600780&view=diff
==============================================================================
---
sis/trunk/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractIdentifiedType.java
[UTF-8] (original)
+++
sis/trunk/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractIdentifiedType.java
[UTF-8] Thu Jun 5 22:14:53 2014
@@ -19,6 +19,7 @@ package org.apache.sis.feature;
import java.util.Map;
import java.util.Locale;
import java.io.Serializable;
+import org.opengis.util.NameFactory;
import org.opengis.util.GenericName;
import org.opengis.util.InternationalString;
import org.apache.sis.internal.system.DefaultFactories;
@@ -168,14 +169,16 @@ public class AbstractIdentifiedType impl
* @param identification The name and other information to be given to
this identified type.
* @throws IllegalArgumentException if a property has an invalid value.
*/
- protected AbstractIdentifiedType(final Map<String,?> identification)
throws IllegalArgumentException {
+ protected AbstractIdentifiedType(final Map<String,?> identification)
+ throws IllegalArgumentException
+ {
ensureNonNull("identification", identification);
Object value = identification.get(NAME_KEY);
if (value == null) {
throw new
IllegalArgumentException(Errors.getResources(identification)
.getString(Errors.Keys.MissingValueForProperty_1,
NAME_KEY));
} else if (value instanceof String) {
- name = DefaultFactories.NAMES.createLocalName(null, (String)
value);
+ name = createName(DefaultFactories.NAMES, (String) value);
} else if (value instanceof GenericName) {
name = (GenericName) value;
} else {
@@ -188,6 +191,14 @@ public class AbstractIdentifiedType impl
}
/**
+ * Creates a name from the given string. This method is invoked at
construction time,
+ * so it should not use any field in this {@code AbtractIdentifiedObject}
instance.
+ */
+ GenericName createName(final NameFactory factory, final String value) {
+ return factory.createLocalName(null, value);
+ }
+
+ /**
* Returns the name of this type.
* The namespace can be either explicit
* ({@linkplain org.apache.sis.util.iso.DefaultScopedName scoped name}) or
implicit
Modified:
sis/trunk/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultAssociationRole.java
URL:
http://svn.apache.org/viewvc/sis/trunk/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultAssociationRole.java?rev=1600780&r1=1600779&r2=1600780&view=diff
==============================================================================
---
sis/trunk/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultAssociationRole.java
[UTF-8] (original)
+++
sis/trunk/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultAssociationRole.java
[UTF-8] Thu Jun 5 22:14:53 2014
@@ -71,8 +71,8 @@ public class DefaultAssociationRole exte
private volatile transient String titleProperty;
/**
- * Constructs an association role from the given properties. The
properties map is given unchanged
- * to the {@linkplain AbstractIdentifiedType#AbstractIdentifiedType(Map)
super-class constructor}.
+ * Constructs an association role from the given properties. The
properties map is given unchanged to
+ * the {@linkplain AbstractIdentifiedType#AbstractIdentifiedType(Map)
super-class constructor}.
* The following table is a reminder of main (not all) recognized map
entries:
*
* <table class="sis">
Modified:
sis/trunk/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultFeatureType.java
URL:
http://svn.apache.org/viewvc/sis/trunk/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultFeatureType.java?rev=1600780&r1=1600779&r2=1600780&view=diff
==============================================================================
---
sis/trunk/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultFeatureType.java
[UTF-8] (original)
+++
sis/trunk/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultFeatureType.java
[UTF-8] Thu Jun 5 22:14:53 2014
@@ -27,6 +27,7 @@ import java.util.Collection;
import java.util.Collections;
import java.io.IOException;
import java.io.ObjectInputStream;
+import org.opengis.util.NameFactory;
import org.opengis.util.GenericName;
import org.opengis.util.InternationalString;
import org.apache.sis.util.ArgumentChecks;
@@ -224,6 +225,15 @@ public class DefaultFeatureType extends
}
/**
+ * Creates a name from the given string. This method is invoked at
construction time,
+ * so it should not use any field in this {@code AbtractIdentifiedObject}
instance.
+ */
+ @Override
+ GenericName createName(final NameFactory factory, final String value) {
+ return factory.createTypeName(null, value);
+ }
+
+ /**
* Invoked on deserialization for restoring the {@link #byName} and other
transient fields.
*
* @param in The input stream from which to deserialize a feature type.
Modified:
sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/Formatter.java
URL:
http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/Formatter.java?rev=1600780&r1=1600779&r2=1600780&view=diff
==============================================================================
---
sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/Formatter.java
[UTF-8] (original)
+++
sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/Formatter.java
[UTF-8] Thu Jun 5 22:14:53 2014
@@ -84,7 +84,7 @@ import org.apache.sis.metadata.iso.exten
* </ul>
*
* @author Martin Desruisseaux (IRD, Geomatys)
- * @since 0.4 (derived from geotk-2.0)
+ * @since 0.5 (derived from geotk-2.0)
* @version 0.4
* @module
*/
@@ -1174,6 +1174,32 @@ public class Formatter implements Locali
}
/**
+ * Delegates the formatting to another {@link FormattableObject}
implementation.
+ * Invoking this method is equivalent to first verifying the {@code other}
class,
+ * then delegating as below:
+ *
+ * {@preformat
+ * return other.formatTo(this);
+ * }
+ *
+ * This method is useful for {@code FormattableObject} which are wrapper
around another object.
+ * It allows to delegate the WKT formatting to the wrapped object.
+ *
+ * @param other The object to format with this formatter.
+ * @return The value returned by {@link
FormattableObject#formatTo(Formatter)}.
+ *
+ * @since 0.5
+ */
+ public String delegateTo(final Object other) throws
UnformattableObjectException {
+ ArgumentChecks.ensureNonNull("other", other);
+ if (other instanceof FormattableObject) {
+ return ((FormattableObject) other).formatTo(this);
+ }
+ throw new UnformattableObjectException(Errors.format(
+ Errors.Keys.IllegalClass_2, FormattableObject.class,
other.getClass()));
+ }
+
+ /**
* Returns the enclosing WKT element, or {@code null} if element being
formatted is the root.
* This method can be invoked by child elements having some aspects that
depend on the enclosing element.
*
Modified:
sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ISOMetadata.java
URL:
http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ISOMetadata.java?rev=1600780&r1=1600779&r2=1600780&view=diff
==============================================================================
---
sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ISOMetadata.java
[UTF-8] (original)
+++
sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ISOMetadata.java
[UTF-8] Thu Jun 5 22:14:53 2014
@@ -31,6 +31,7 @@ import org.apache.sis.xml.IdentifiedObje
import org.apache.sis.metadata.MetadataStandard;
import org.apache.sis.metadata.ModifiableMetadata;
import org.apache.sis.internal.jaxb.IdentifierMapWithSpecialCases;
+import org.apache.sis.util.collection.Containers;
import org.apache.sis.util.logging.Logging;
import org.apache.sis.util.CharSequences;
@@ -82,6 +83,21 @@ public class ISOMetadata extends Modifia
*/
protected ISOMetadata(final Object object) {
if (object instanceof IdentifiedObject) {
+ if (object instanceof ISOMetadata &&
Containers.isNullOrEmpty(((ISOMetadata) object).identifiers)) {
+ /*
+ * If the other object is an ISOMetadata instance, take a
look at its 'identifiers' collection
+ * before to invoke object.getIdentifiers() in order to avoid
unnecessary initialization of its
+ * backing collection. We do this optimization because the
vast majority of metadata objects do
+ * not have 'identifiers' collection.
+ *
+ * Actually this optimization is a little bit dangerous, since
users could override getIdentifiers()
+ * without invoking super.getIdentifiers(), in which case
their identifiers will not be copied.
+ * For safety, we will do this optimization only if the
implementation is an Apache SIS one.
+ */
+ if (object.getClass().getName().startsWith("org.apache.sis."))
{
+ return;
+ }
+ }
identifiers = copyCollection(((IdentifiedObject)
object).getIdentifiers(), Identifier.class);
}
}
Copied:
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/DirectPositionView.java
(from r1600777,
sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/DirectPositionView.java)
URL:
http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/DirectPositionView.java?p2=sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/DirectPositionView.java&p1=sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/DirectPositionView.java&r1=1600777&r2=1600780&rev=1600780&view=diff
==============================================================================
---
sis/branches/JDK6/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/DirectPositionView.java
[UTF-8] (original)
+++
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/DirectPositionView.java
[UTF-8] Thu Jun 5 22:14:53 2014
@@ -18,9 +18,11 @@ package org.apache.sis.internal.referenc
import java.util.Arrays;
import org.opengis.geometry.DirectPosition;
-import org.opengis.geometry.UnmodifiableGeometryException;
import org.opengis.referencing.crs.CoordinateReferenceSystem;
+// Branch-dependent imports
+import org.apache.sis.geometry.UnmodifiableGeometryException;
+
/**
* A read-only direct position wrapping an array without performing any copy.
Modified:
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/Formulas.java
URL:
http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/Formulas.java?rev=1600780&r1=1600779&r2=1600780&view=diff
==============================================================================
---
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/Formulas.java
[UTF-8] (original)
+++
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/Formulas.java
[UTF-8] Thu Jun 5 22:14:53 2014
@@ -95,8 +95,12 @@ public final class Formulas extends Stat
* @see
org.apache.sis.referencing.datum.DefaultEllipsoid#getAuthalicRadius()
*/
public static double getAuthalicRadius(final double a, final double b) {
- final double f = 1 - b/a;
- final double e = sqrt(2*f - f*f);
- return sqrt(0.5 * (a*a + b*b*atanh(e)/e));
+ if (a != b) {
+ final double f = 1 - b/a;
+ final double e = sqrt(2*f - f*f);
+ return sqrt(0.5 * (a*a + b*b*atanh(e)/e));
+ } else {
+ return a;
+ }
}
}
Modified:
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/package-info.java
URL:
http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/package-info.java?rev=1600780&r1=1600779&r2=1600780&view=diff
==============================================================================
---
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/package-info.java
[UTF-8] (original)
+++
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/package-info.java
[UTF-8] Thu Jun 5 22:14:53 2014
@@ -18,7 +18,7 @@
/**
* A set of helper classes for the SIS implementation.
*
- * <STRONG>Do not use!</STRONG>
+ * <strong>Do not use!</strong>
*
* This package is for internal use by SIS only. Classes in this package
* may change in incompatible ways in any future version without notice.
Modified:
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrices.java
URL:
http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrices.java?rev=1600780&r1=1600779&r2=1600780&view=diff
==============================================================================
---
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrices.java
[UTF-8] (original)
+++
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrices.java
[UTF-8] Thu Jun 5 22:14:53 2014
@@ -534,7 +534,7 @@ public final class Matrices extends Stat
* @throws IllegalArgumentException if a value of {@code
selectedDimensions} is lower than 0
* or not smaller than {@code sourceDimensions}.
*
- * @see
org.apache.sis.referencing.operation.MathTransforms#dimensionFilter(int, int[])
+ * @see
org.apache.sis.referencing.operation.transform.MathTransforms#dimensionFilter(int,
int[])
*/
public static MatrixSIS createDimensionSelect(final int sourceDimensions,
final int[] selectedDimensions) {
final int numTargetDim = selectedDimensions.length;
Modified:
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/LinearTransform.java
URL:
http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/LinearTransform.java?rev=1600780&r1=1600779&r2=1600780&view=diff
==============================================================================
---
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/LinearTransform.java
[UTF-8] (original)
+++
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/LinearTransform.java
[UTF-8] Thu Jun 5 22:14:53 2014
@@ -21,11 +21,14 @@ import org.opengis.referencing.operation
/**
- * A {@link MathTransform} which convert coordinates using only linear
equations.
- * Such transform can be represented by a {@linkplain #getMatrix() matrix}.
- * Those transforms are often affine, but not necessarily.
+ * A usually affine, or otherwise a projective transform, which convert
coordinates using only linear equations.
+ * A projective transform is capable of mapping an arbitrary quadrilateral
into another arbitrary quadrilateral,
+ * while preserving the straightness of lines. In the special case where the
transform is affine, the parallelism
+ * of lines in the source is preserved in the output.
+ *
+ * <p>Such a coordinate transformation can be represented by a matrix of
arbitrary size, which is given by the
+ * {@link #getMatrix()} method. The relationship between matrix size and
transform dimensions is as below:</p>
*
- * <p>Relationships:</p>
* <ul>
* <li>The {@linkplain Matrix#getNumCol() number of columns} in the matrix
is equal to
* the number of {@linkplain #getSourceDimensions() source dimensions}
plus 1</li>
@@ -33,26 +36,42 @@ import org.opengis.referencing.operation
* the number of {@linkplain #getTargetDimensions() target dimensions}
plus 1.</li>
* </ul>
*
+ * {@section Affine transform}
+ * In most cases the transform in affine. For such transforms, the last matrix
row contains only zero values
+ * except in the last column, which contains 1. For example a conversion from
projected coordinates (metres)
+ * to display coordinates (pixel) can be done as below:
+ *
+ * <center><p>
+ * <img src="../matrix/doc-files/AffineTransform.png" alt="Matrix
representation of an affine transform">
+ * </p></center>
+ *
+ * {@section Projective transform}
+ * If the last matrix row does not met the above constraints, then the
transform is not affine.
+ * A <cite>projective</cite> transform can be used as a generalization of
affine transforms.
+ * In such case the computation performed by SIS is similar to {@code
PerspectiveTransform}
+ * in <cite>Java Advanced Imaging</cite>.
+ *
+ * <p>For example a square matrix of size 4×4 is used for transforming
three-dimensional coordinates.
+ * The transformed points {@code (x',y',z')} are computed as below:</p>
+ *
+ * <blockquote>{@include formulas.html#ProjectiveTransform}</blockquote>
+ *
* @author Martin Desruisseaux (IRD, Geomatys)
* @since 0.4 (derived from geotk-2.0)
* @version 0.4
* @module
*
- * @see org.apache.sis.referencing.operation.MathTransforms
+ * @see <a
href="http://mathworld.wolfram.com/AffineTransformation.html">Affine
transformation on MathWorld</a>
*/
public interface LinearTransform extends MathTransform {
/**
* Returns the coefficients of this linear transform as a matrix.
* Converting a coordinate with this {@code MathTransform} is equivalent
to multiplying the
* returned matrix by a vector containing the ordinate values with an
additional 1 in the last row.
- * For example if this transform converts projected coordinates (metres)
to display coordinates (pixel),
- * then the same conversions can be done by the returned matrix as below:
- *
- * <center><p>
- * <img src="../matrix/doc-files/AffineTransform.png" alt="Matrix
representation of an affine transform">
- * </p></center>
*
* @return The coefficients of this linear transform as a matrix.
+ *
+ * @see MathTransforms#getMatrix(MathTransform)
*/
Matrix getMatrix();
}
Modified:
sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java
URL:
http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java?rev=1600780&r1=1600779&r2=1600780&view=diff
==============================================================================
---
sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java
[UTF-8] (original)
+++
sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java
[UTF-8] Thu Jun 5 22:14:53 2014
@@ -40,6 +40,8 @@ import org.junit.BeforeClass;
org.apache.sis.referencing.operation.matrix.NonSquareMatrixTest.class, //
Expected to be last MatrixTestCase - see javadoc.
org.apache.sis.referencing.operation.matrix.MatricesTest.class,
org.apache.sis.referencing.operation.matrix.AffineTransforms2DTest.class,
+ org.apache.sis.referencing.operation.transform.IterationStrategyTest.class,
+
org.apache.sis.referencing.operation.transform.AbstractMathTransformTest.class,
org.apache.sis.internal.referencing.FormulasTest.class,
org.apache.sis.internal.referencing.VerticalDatumTypesTest.class,
@@ -60,6 +62,7 @@ import org.junit.BeforeClass;
org.apache.sis.parameter.ParameterFormatTest.class,
org.apache.sis.parameter.TensorParametersTest.class,
org.apache.sis.parameter.TensorValuesTest.class,
+
org.apache.sis.referencing.datum.BursaWolfParametersTest.class,
org.apache.sis.referencing.datum.TimeDependentBWPTest.class,
org.apache.sis.referencing.datum.DefaultEllipsoidTest.class,
Modified:
sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java
URL:
http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java?rev=1600780&r1=1600779&r2=1600780&view=diff
==============================================================================
---
sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java
[UTF-8] (original)
+++
sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java
[UTF-8] Thu Jun 5 22:14:53 2014
@@ -85,6 +85,11 @@ public final class Errors extends Indexe
public static final short CanNotComputeDerivative = 1;
/**
+ * Can not concatenate transforms “{0}” and “{1}”.
+ */
+ public static final short CanNotConcatenateTransforms_2 = 160;
+
+ /**
* Can not connect to “{0}”.
*/
public static final short CanNotConnectTo_1 = 2;
Modified:
sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties
URL:
http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties?rev=1600780&r1=1600779&r2=1600780&view=diff
==============================================================================
---
sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties
[ISO-8859-1] (original)
+++
sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties
[ISO-8859-1] Thu Jun 5 22:14:53 2014
@@ -27,6 +27,7 @@
AbstractType_1 = Type \u2018{0}\u2019 is abstract.
AmbiguousName_3 = Name \u201c{2}\u201d is ambiguous because
it can be understood as either \u201c{0}\u201d or \u201c{1}\u201d.
CanNotAddToExclusiveSet_2 = No element can be added to this set
because properties \u2018{0}\u2019 and \u2018{1}\u2019 are mutually exclusive.
+CanNotConcatenateTransforms_2 = Can not concatenate transforms
\u201c{0}\u201d and \u201c{1}\u201d.
CanNotConnectTo_1 = Can not connect to \u201c{0}\u201d.
CanNotConvertFromType_2 = Can not convert from type \u2018{0}\u2019
to type \u2018{1}\u2019.
CanNotConvertValue_2 = Can not convert value \u201c{0}\u201d to
type \u2018{1}\u2019.
Modified:
sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties
URL:
http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties?rev=1600780&r1=1600779&r2=1600780&view=diff
==============================================================================
---
sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties
[ISO-8859-1] (original)
+++
sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties
[ISO-8859-1] Thu Jun 5 22:14:53 2014
@@ -17,6 +17,7 @@
AbstractType_1 = Le type \u2018{0}\u2019 est abstrait.
AmbiguousName_3 = Le nom \u00ab\u202f{2}\u202f\u00bb est
ambigu\u00eb car il peut \u00eatre interpr\u00e9t\u00e9 comme
\u00ab\u202f{0}\u202f\u00bb ou \u00ab\u202f{1}\u202f\u00bb.
CanNotAddToExclusiveSet_2 = Aucun \u00e9l\u00e9ment ne peut \u00eatre
ajout\u00e9 \u00e0 cet ensemble car les propri\u00e9t\u00e9s \u2018{0}\u2019 et
\u2018{1}\u2019 sont mutuellement exclusives.
+CanNotConcatenateTransforms_2 = Les transformations
\u00ab\u202f{0}\u202f\u00bb et \u00ab\u202f{1}\u202f\u00bb ne peuvent pas
\u00eatre combin\u00e9es.
CanNotConnectTo_1 = Ne peut pas se connecter \u00e0
\u00ab\u202f{0}\u202f\u00bb.
CanNotConvertFromType_2 = Ne peut pas convertir du type
\u2018{0}\u2019 vers le type \u2018{1}\u2019.
CanNotConvertValue_2 = La valeur \u00ab\u202f{0}\u202f\u00bb ne
peut pas \u00eatre convertie vers le type \u2018{1}\u2019.
Modified: sis/trunk/pom.xml
URL:
http://svn.apache.org/viewvc/sis/trunk/pom.xml?rev=1600780&r1=1600779&r2=1600780&view=diff
==============================================================================
--- sis/trunk/pom.xml (original)
+++ sis/trunk/pom.xml Thu Jun 5 22:14:53 2014
@@ -435,6 +435,7 @@ Apache SIS is a free software, Java lang
<source>${maven.compile.source}</source>
<target>${maven.compile.target}</target>
<encoding>${project.build.sourceEncoding}</encoding>
+ <useIncrementalCompilation>false</useIncrementalCompilation> <!--
https://jira.codehaus.org/browse/MCOMPILER-209 -->
</configuration>
</plugin>
@@ -590,8 +591,7 @@ Apache SIS is a free software, Java lang
-->
<additionalparam>
- -link http://www.geoapi.org/snapshot/javadoc/
- -link http://www.geoapi.org/snapshot/pending/
+ -link http://www.geoapi.org/3.0/javadoc/
</additionalparam>
<!-- Separates packages on the overview page into the groups
specified. -->
@@ -631,7 +631,7 @@ Apache SIS is a free software, Java lang
</groups>
<!-- Internal packages to hide from javadoc. -->
-
<excludePackageNames>org.apache.sis.internal:org.apache.sis.util.resources:com</excludePackageNames>
+
<excludePackageNames>org.apache.sis.internal:org.apache.sis.util.resources:org.apache.sis.referencing.operation.provider:com</excludePackageNames>
<!-- Custom taglets, some of them implemented in Java. -->
<tags>