Author: desruisseaux
Date: Sun Dec 16 08:24:44 2012
New Revision: 1422481
URL: http://svn.apache.org/viewvc?rev=1422481&view=rev
Log:
Ported the ArrayEnvelope class.
Added:
sis/branches/JDK7/sis-referencing/src/main/java/org/apache/sis/geometry/ArrayEnvelope.java
(with props)
sis/branches/JDK7/sis-referencing/src/main/java/org/apache/sis/referencing/
sis/branches/JDK7/sis-referencing/src/main/java/org/apache/sis/referencing/CRS.java
(with props)
Modified:
sis/branches/JDK7/sis-referencing/src/main/java/org/apache/sis/geometry/AbstractEnvelope.java
sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java
sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties
sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties
Modified:
sis/branches/JDK7/sis-referencing/src/main/java/org/apache/sis/geometry/AbstractEnvelope.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK7/sis-referencing/src/main/java/org/apache/sis/geometry/AbstractEnvelope.java?rev=1422481&r1=1422480&r2=1422481&view=diff
==============================================================================
---
sis/branches/JDK7/sis-referencing/src/main/java/org/apache/sis/geometry/AbstractEnvelope.java
(original)
+++
sis/branches/JDK7/sis-referencing/src/main/java/org/apache/sis/geometry/AbstractEnvelope.java
Sun Dec 16 08:24:44 2012
@@ -666,9 +666,8 @@ public abstract class AbstractEnvelope i
return false;
}
// The check for ArrayEnvelope.class is for avoiding never-ending
callbacks.
-// TODO
-// assert envelope.getClass() == ArrayEnvelope.class ||
-// intersects(new ArrayEnvelope(envelope), edgesInclusive) :
envelope;
+ assert envelope.getClass() == ArrayEnvelope.class ||
+ intersects(new ArrayEnvelope(envelope), edgesInclusive) :
envelope;
return true;
}
@@ -737,9 +736,8 @@ public abstract class AbstractEnvelope i
}
}
// The check for ArrayEnvelope.class is for avoiding never-ending
callbacks.
-// TODO
-// assert envelope.getClass() == ArrayEnvelope.class ||
hasNaN(envelope) ||
-// !contains(new ArrayEnvelope(envelope), edgesInclusive) :
envelope;
+ assert envelope.getClass() == ArrayEnvelope.class ||
hasNaN(envelope) ||
+ !contains(new ArrayEnvelope(envelope), edgesInclusive) :
envelope;
return false;
}
return true;
Added:
sis/branches/JDK7/sis-referencing/src/main/java/org/apache/sis/geometry/ArrayEnvelope.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK7/sis-referencing/src/main/java/org/apache/sis/geometry/ArrayEnvelope.java?rev=1422481&view=auto
==============================================================================
---
sis/branches/JDK7/sis-referencing/src/main/java/org/apache/sis/geometry/ArrayEnvelope.java
(added)
+++
sis/branches/JDK7/sis-referencing/src/main/java/org/apache/sis/geometry/ArrayEnvelope.java
Sun Dec 16 08:24:44 2012
@@ -0,0 +1,504 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.geometry;
+
+import java.util.Arrays;
+import java.util.Objects;
+import java.io.Serializable;
+import org.opengis.geometry.Envelope;
+import org.opengis.geometry.DirectPosition;
+import org.opengis.geometry.MismatchedDimensionException;
+import org.opengis.metadata.extent.GeographicBoundingBox;
+import org.opengis.referencing.cs.CoordinateSystemAxis;
+import org.opengis.referencing.crs.CoordinateReferenceSystem;
+import org.opengis.util.FactoryException;
+import org.apache.sis.util.resources.Errors;
+import org.apache.sis.util.CharSequences;
+import org.apache.sis.referencing.CRS;
+
+import static org.apache.sis.util.Arrays.resize;
+import static org.apache.sis.util.ArgumentChecks.*;
+import static org.apache.sis.math.MathFunctions.isNegative;
+import static org.apache.sis.internal.referencing.Utilities.isPoleToPole;
+
+
+/**
+ * Base class of envelopes backed by an array.
+ * See {@link GeneralEnvelope} javadoc for more information.
+ *
+ * @author Martin Desruisseaux (IRD, Geomatys)
+ * @since 0.3 (derived from geotk-2.4)
+ * @version 0.3
+ * @module
+ */
+class ArrayEnvelope extends AbstractEnvelope implements Serializable {
+ /**
+ * Serial number for inter-operability with different versions.
+ */
+ private static final long serialVersionUID = 7284917239693486738L;
+
+ /**
+ * Ordinate values of lower and upper corners. The length of this array is
twice the
+ * number of dimensions. The first half contains the lower corner, while
the second
+ * half contains the upper corner.
+ */
+ final double[] ordinates;
+
+ /**
+ * The coordinate reference system, or {@code null}.
+ */
+ CoordinateReferenceSystem crs;
+
+ /**
+ * Constructs an empty envelope of the specified dimension. All ordinates
+ * are initialized to 0 and the coordinate reference system is undefined.
+ *
+ * @param dimension The envelope dimension.
+ */
+ public ArrayEnvelope(final int dimension) {
+ ordinates = new double[dimension * 2];
+ }
+
+ /**
+ * Constructs one-dimensional envelope defined by a range of values.
+ *
+ * @param lower The lower value.
+ * @param upper The upper value.
+ */
+ public ArrayEnvelope(final double lower, final double upper) {
+ ordinates = new double[] {lower, upper};
+ }
+
+ /**
+ * Builds a two-dimensional envelope with the specified bounds.
+ * The argument order follows the convention used by the <cite>Well Known
Text</cite>
+ * format for the {@code BBOX} element: all ordinates for the lower corner
first,
+ * followed by all ordinates for the upper corner.
+ *
+ * @param xmin The lower value for the first ordinate.
+ * @param ymin The lower value for the second ordinate.
+ * @param xmax The upper value for the first ordinate.
+ * @param ymax The upper value for the second ordinate.
+ */
+ public ArrayEnvelope(final double xmin, final double ymin,
+ final double xmax, final double ymax)
+ {
+ ordinates = new double[] {
+ xmin, ymin, xmax, ymax
+ };
+ }
+
+ /**
+ * Builds a three-dimensional envelope with the specified bounds.
+ * The argument order follows the convention used by the <cite>Well Known
Text</cite>
+ * format for the {@code BBOX} element: all ordinates for the lower corner
first,
+ * followed by all ordinates for the upper corner.
+ *
+ * @param xmin The lower value for the first ordinate.
+ * @param ymin The lower value for the second ordinate.
+ * @param zmin The lower value for the third ordinate.
+ * @param xmax The upper value for the first ordinate.
+ * @param ymax The upper value for the second ordinate.
+ * @param zmax The upper value for the third ordinate.
+ */
+ public ArrayEnvelope(final double xmin, final double ymin, final double
zmin,
+ final double xmax, final double ymax, final double
zmax)
+ {
+ ordinates = new double[] {
+ xmin, ymin, zmin, xmax, ymax, zmax
+ };
+ }
+
+ /**
+ * Constructs a envelope defined by two positions.
+ *
+ * @param lowerCorner Lower ordinate values.
+ * @param upperCorner Upper ordinate values.
+ * @throws MismatchedDimensionException if the two positions do not have
the same dimension.
+ */
+ public ArrayEnvelope(final double[] lowerCorner, final double[]
upperCorner) {
+ ensureNonNull("lowerCorner", lowerCorner);
+ ensureNonNull("upperCorner", upperCorner);
+ ensureSameDimension(lowerCorner.length, upperCorner.length);
+ ordinates = Arrays.copyOf(lowerCorner, lowerCorner.length +
upperCorner.length);
+ System.arraycopy(upperCorner, 0, ordinates, lowerCorner.length,
upperCorner.length);
+ }
+
+ /**
+ * Constructs a new envelope with the same data than the specified
envelope.
+ *
+ * @param envelope The envelope to copy.
+ */
+ public ArrayEnvelope(final Envelope envelope) {
+ ensureNonNull("envelope", envelope);
+ if (envelope instanceof ArrayEnvelope) {
+ final ArrayEnvelope e = (ArrayEnvelope) envelope;
+ ordinates = e.ordinates.clone();
+ crs = e.crs;
+ } else {
+ crs = envelope.getCoordinateReferenceSystem();
+ final int dimension = envelope.getDimension();
+ ordinates = new double[dimension * 2];
+ for (int i=0; i<dimension; i++) {
+ ordinates[i] = envelope.getMinimum(i);
+ ordinates[i+dimension] = envelope.getMaximum(i);
+ }
+ }
+ }
+
+ /**
+ * Constructs a new envelope with the same data than the specified
geographic bounding box.
+ * The coordinate reference system is set to {@code "CRS:84"}.
+ *
+ * @param box The bounding box to copy.
+ */
+ public ArrayEnvelope(final GeographicBoundingBox box) {
+ ensureNonNull("box", box);
+ ordinates = new double[] {
+ box.getWestBoundLongitude(),
+ box.getSouthBoundLatitude(),
+ box.getEastBoundLongitude(),
+ box.getNorthBoundLatitude()
+ };
+ if (Boolean.FALSE.equals(box.getInclusion())) {
+ swap(0);
+ if (!isPoleToPole(ordinates[1], ordinates[3])) {
+ swap(1);
+ }
+ }
+ try {
+ crs = CRS.forCode("CRS:84");
+ } catch (FactoryException e) {
+ // Should never happen since we asked for a CRS which should
always be present.
+ throw new AssertionError(e);
+ }
+ }
+
+ /**
+ * Constructs a new envelope initialized to the values parsed from the
given string in
+ * <cite>Well Known Text</cite> (WKT) format. The given string is
typically a {@code BOX}
+ * element like below:
+ *
+ * {@preformat wkt
+ * BOX(-180 -90, 180 90)
+ * }
+ *
+ * However this constructor is lenient to other geometry types like {@code
POLYGON}.
+ * See the javadoc of the {@link GeneralEnvelope#GeneralEnvelope(String)
GeneralEnvelope}
+ * constructor for more information.
+ *
+ * @param wkt The {@code BOX}, {@code POLYGON} or other kind of element
to parse.
+ * @throws IllegalArgumentException If the given string can not be parsed.
+ */
+ public ArrayEnvelope(final CharSequence wkt) throws
IllegalArgumentException {
+ ensureNonNull("wkt", wkt);
+ int levelParenth = 0; // Number of opening parenthesis: (
+ int levelBracket = 0; // Number of opening brackets: [
+ int dimLimit = 4; // The length of minimum and maximum arrays.
+ int maxDimension = 0; // The number of valid entries in the minimum
and maximum arrays.
+ final int length = CharSequences.skipTrailingWhitespaces(wkt, 0,
wkt.length());
+ double[] minimum = new double[dimLimit];
+ double[] maximum = new double[dimLimit];
+ int dimension = 0;
+ int c;
+scan: for (int i=CharSequences.skipLeadingWhitespaces(wkt, 0, length);
i<length; c+=Character.charCount(c)) {
+ c = Character.codePointAt(wkt, i);
+ if (Character.isUnicodeIdentifierStart(c)) {
+ do {
+ i += Character.charCount(c);
+ if (i >= length) break scan;
+ c = Character.codePointAt(wkt, i);
+ }
+ while (Character.isUnicodeIdentifierPart(c));
+ }
+ if (Character.isSpaceChar(c)) {
+ continue;
+ }
+ switch (c) {
+ case ',': dimension=0;
continue;
+ case '(': ++levelParenth; dimension=0;
continue;
+ case '[': ++levelBracket; dimension=0;
continue;
+ case ')': if (--levelParenth<0) fail(wkt,'('); dimension=0;
continue;
+ case ']': if (--levelBracket<0) fail(wkt,'['); dimension=0;
continue;
+ }
+ /*
+ * At this point we have skipped the leading keyword (BOX,
POLYGON, etc.),
+ * the spaces and the parenthesis if any. We should be at the
beginning of
+ * a number. Search the first separator character (which determine
the end
+ * of the number) and parse the number.
+ */
+ final int start = i;
+ boolean flush = false;
+scanNumber: while ((i += Character.charCount(c)) < length) {
+ c = wkt.charAt(i);
+ if (Character.isSpaceChar(c)) {
+ break;
+ }
+ switch (c) {
+ case ',': flush=true;
break scanNumber;
+ case ')': if (--levelParenth<0) fail(wkt,'('); flush=true;
break scanNumber;
+ case ']': if (--levelBracket<0) fail(wkt,'['); flush=true;
break scanNumber;
+ }
+ }
+ /*
+ * Parsing the number may throw a NumberFormatException. But the
later is an
+ * IllegalArgumentException subclass, so we are compliant with the
contract.
+ */
+ final double value = Double.parseDouble(wkt.subSequence(start,
i).toString());
+ /*
+ * Adjust the minimum and maximum value using the number that we
parsed,
+ * increasing the arrays size if necessary. Remember the maximum
number
+ * of dimensions we have found so far.
+ */
+ if (dimension == maxDimension) {
+ if (dimension == dimLimit) {
+ dimLimit *= 2;
+ minimum = Arrays.copyOf(minimum, dimLimit);
+ maximum = Arrays.copyOf(maximum, dimLimit);
+ }
+ minimum[dimension] = maximum[dimension] = value;
+ maxDimension = ++dimension;
+ } else {
+ if (value < minimum[dimension]) minimum[dimension] = value;
+ if (value > maximum[dimension]) maximum[dimension] = value;
+ dimension++;
+ }
+ if (flush) {
+ dimension = 0;
+ }
+ }
+ if (levelParenth != 0) fail(wkt, ')');
+ if (levelBracket != 0) fail(wkt, ']');
+ ordinates = resize(minimum, maxDimension << 1);
+ System.arraycopy(maximum, 0, ordinates, maxDimension, maxDimension);
+ }
+
+ /**
+ * Throws an exception for unmatched parenthesis during WKT parsing.
+ */
+ private static void fail(final CharSequence wkt, char missing) {
+ throw new IllegalArgumentException(Errors.format(
+ Errors.Keys.NonEquilibratedParenthesis_2, wkt, missing));
+ }
+
+ /**
+ * Makes sure the specified dimensions are identical.
+ */
+ static void ensureSameDimension(final int dim1, final int dim2) throws
MismatchedDimensionException {
+ if (dim1 != dim2) {
+ throw new MismatchedDimensionException(Errors.format(
+ Errors.Keys.MismatchedDimension_2, dim1, dim2));
+ }
+ }
+
+ /**
+ * Swaps two ordinate values.
+ */
+ private void swap(final int i) {
+ final int m = i + (ordinates.length >>> 1);
+ final double t = ordinates[i];
+ ordinates[i] = ordinates[m];
+ ordinates[m] = t;
+ }
+
+ /**
+ * Returns the length of coordinate sequence (the number of entries) in
this envelope.
+ * This information is available even when the {@linkplain
#getCoordinateReferenceSystem()
+ * coordinate reference system} is unknown.
+ *
+ * @return The dimensionality of this envelope.
+ */
+ @Override
+ public int getDimension() {
+ return ordinates.length >>> 1;
+ }
+
+ /**
+ * Returns the envelope coordinate reference system, or {@code null} if
unknown.
+ * If non-null, it shall be the same as {@linkplain #getLowerCorner()
lower corner}
+ * and {@linkplain #getUpperCorner() upper corner} CRS.
+ *
+ * @return The envelope CRS, or {@code null} if unknown.
+ */
+ @Override
+ public CoordinateReferenceSystem getCoordinateReferenceSystem() {
+ assert crs == null || crs.getCoordinateSystem().getDimension() ==
getDimension();
+ return crs;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public DirectPosition getLowerCorner() {
+ final int dim = ordinates.length >>> 1;
+ final GeneralDirectPosition position = new GeneralDirectPosition(dim);
+ System.arraycopy(ordinates, 0, position.ordinates, 0, dim);
+ position.setCoordinateReferenceSystem(crs);
+ return position;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public DirectPosition getUpperCorner() {
+ final int dim = ordinates.length >>> 1;
+ final GeneralDirectPosition position = new GeneralDirectPosition(dim);
+ System.arraycopy(ordinates, dim, position.ordinates, 0, dim);
+ position.setCoordinateReferenceSystem(crs);
+ return position;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public double getLower(final int dimension) throws
IndexOutOfBoundsException {
+ ensureValidIndex(ordinates.length >>> 1, dimension);
+ return ordinates[dimension];
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public double getUpper(final int dimension) throws
IndexOutOfBoundsException {
+ final int dim = ordinates.length >>> 1;
+ ensureValidIndex(dim, dimension);
+ return ordinates[dimension + dim];
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public double getMinimum(final int dimension) throws
IndexOutOfBoundsException {
+ final int dim = ordinates.length >>> 1;
+ ensureValidIndex(dim, dimension);
+ double lower = ordinates[dimension];
+ if (isNegative(ordinates[dimension + dim] - lower)) { // Special
handling for -0.0
+ final CoordinateSystemAxis axis = getAxis(crs, dimension);
+ lower = (axis != null) ? axis.getMinimumValue() :
Double.NEGATIVE_INFINITY;
+ }
+ return lower;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public double getMaximum(final int dimension) throws
IndexOutOfBoundsException {
+ final int dim = ordinates.length >>> 1;
+ ensureValidIndex(dim, dimension);
+ double upper = ordinates[dimension + dim];
+ if (isNegative(upper - ordinates[dimension])) { // Special handling
for -0.0
+ final CoordinateSystemAxis axis = getAxis(crs, dimension);
+ upper = (axis != null) ? axis.getMaximumValue() :
Double.POSITIVE_INFINITY;
+ }
+ return upper;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public double getMedian(final int dimension) throws
IndexOutOfBoundsException {
+ ensureValidIndex(ordinates.length >>> 1, dimension);
+ final double minimum = ordinates[dimension];
+ final double maximum = ordinates[dimension + (ordinates.length >>> 1)];
+ double median = 0.5 * (minimum + maximum);
+ if (isNegative(maximum - minimum)) { // Special handling for -0.0
+ median = fixMedian(getAxis(crs, dimension), median);
+ }
+ return median;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public double getSpan(final int dimension) throws
IndexOutOfBoundsException {
+ ensureValidIndex(ordinates.length >>> 1, dimension);
+ double span = ordinates[dimension + (ordinates.length >>> 1)] -
ordinates[dimension];
+ if (isNegative(span)) { // Special handling for -0.0
+ span = fixSpan(getAxis(crs, dimension), span);
+ }
+ return span;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean isEmpty() {
+ final int dimension = ordinates.length >>> 1;
+ if (dimension == 0) {
+ return true;
+ }
+ for (int i=0; i<dimension; i++) {
+ final double span = ordinates[i+dimension] - ordinates[i];
+ if (!(span > 0)) { // Use '!' in order to catch NaN
+ if (!(isNegative(span) && isWrapAround(crs, i))) {
+ return true;
+ }
+ }
+ }
+ assert !isNull() : this;
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean isNull() {
+ for (int i=0; i<ordinates.length; i++) {
+ if (!Double.isNaN(ordinates[i])) {
+ return false;
+ }
+ }
+ assert isEmpty() : this;
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public int hashCode() {
+ int code = Arrays.hashCode(ordinates);
+ if (crs != null) {
+ code += crs.hashCode();
+ }
+ assert code == super.hashCode();
+ return code;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean equals(final Object object) {
+ if (object != null && object.getClass() == getClass()) {
+ final ArrayEnvelope that = (ArrayEnvelope) object;
+ return Arrays.equals(this.ordinates, that.ordinates) &&
+ Objects.equals(this.crs, that.crs);
+ }
+ return false;
+ }
+}
Propchange:
sis/branches/JDK7/sis-referencing/src/main/java/org/apache/sis/geometry/ArrayEnvelope.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
sis/branches/JDK7/sis-referencing/src/main/java/org/apache/sis/geometry/ArrayEnvelope.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added:
sis/branches/JDK7/sis-referencing/src/main/java/org/apache/sis/referencing/CRS.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK7/sis-referencing/src/main/java/org/apache/sis/referencing/CRS.java?rev=1422481&view=auto
==============================================================================
---
sis/branches/JDK7/sis-referencing/src/main/java/org/apache/sis/referencing/CRS.java
(added)
+++
sis/branches/JDK7/sis-referencing/src/main/java/org/apache/sis/referencing/CRS.java
Sun Dec 16 08:24:44 2012
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.referencing;
+
+import org.opengis.util.FactoryException;
+import org.opengis.referencing.NoSuchAuthorityCodeException;
+import org.opengis.referencing.crs.CoordinateReferenceSystem;
+import org.apache.sis.util.Static;
+
+import static org.apache.sis.util.ArgumentChecks.ensureNonNull;
+
+
+/**
+ * Static methods working on {@linkplain CoordinateReferenceSystem Coordinate
Reference Systems}.
+ *
+ * @author Martin Desruisseaux (IRD, Geomatys)
+ * @since 0.3 (derived from geotk-2.1)
+ * @version 0.3
+ * @module
+ */
+public final class CRS extends Static {
+ /**
+ * Do not allow instantiation of this class.
+ */
+ private CRS() {
+ }
+
+ /**
+ * Returns a Coordinate Reference System from the given authority code.
+ *
+ * @todo This method is not yet implemented. It will be provided after the
EPSG-backed
+ * authority factory has been ported to Apache SIS.
+ *
+ * @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.
+ */
+ public static CoordinateReferenceSystem forCode(final String code)
+ throws NoSuchAuthorityCodeException, FactoryException
+ {
+ ensureNonNull("code", code);
+ throw new UnsupportedOperationException("Not yet implemented.");
+ }
+}
Propchange:
sis/branches/JDK7/sis-referencing/src/main/java/org/apache/sis/referencing/CRS.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
sis/branches/JDK7/sis-referencing/src/main/java/org/apache/sis/referencing/CRS.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified:
sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java?rev=1422481&r1=1422480&r2=1422481&view=diff
==============================================================================
---
sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java
(original)
+++
sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java
Sun Dec 16 08:24:44 2012
@@ -201,6 +201,11 @@ public final class Errors extends Indexe
public static final int MismatchedCRS = 57;
/**
+ * Mismatched object dimension: {0}D and {1}D.
+ */
+ public static final int MismatchedDimension_2 = 60;
+
+ /**
* Argument â{0}â has {1} dimension{1,choice,1#|2#s}, while {2}
was expected.
*/
public static final int MismatchedDimension_3 = 58;
Modified:
sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties
URL:
http://svn.apache.org/viewvc/sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties?rev=1422481&r1=1422480&r2=1422481&view=diff
==============================================================================
---
sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties
(original)
+++
sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties
Sun Dec 16 08:24:44 2012
@@ -43,6 +43,7 @@ InsufficientArgumentSize_3 = Argume
KeyCollision_1 = A different value is already associated to
the \u201c{0}\u201d key.
MandatoryAttribute_2 = Attribute \u201c{0}\u201d is mandatory for
an object of type \u2018{1}\u2019.
MismatchedCRS = The coordinate reference system must be the
same for all objects.
+MismatchedDimension_2 = Mismatched object dimension: {0}D and {1}D.
MismatchedDimension_3 = Argument \u2018{0}\u2019 has {1}
dimension{1,choice,1#|2#s}, while {2} was expected.
NegativeArgument_2 = Argument \u2018{0}\u2019 shall not be
negative. The given value was {1}.
NodeChildOfItself_1 = Node \u201c{0}\u201d can not be a child of
itself.
Modified:
sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties
URL:
http://svn.apache.org/viewvc/sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties?rev=1422481&r1=1422480&r2=1422481&view=diff
==============================================================================
---
sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties
(original)
+++
sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties
Sun Dec 16 08:24:44 2012
@@ -43,6 +43,7 @@ InsufficientArgumentSize_3 = L\u201
KeyCollision_1 = Une valeur diff\u00e9rente est
d\u00e9j\u00e0 associ\u00e9e \u00e0 la cl\u00e9 \u201c{0}\u201d.
MandatoryAttribute_2 = L\u2019attribut \u201c{0}\u201d est
obligatoire pour un objet de type \u2018{1}\u2019.
MismatchedCRS = Le syst\u00e8me de r\u00e9f\u00e9rence des
coordonn\u00e9es doit \u00eatre le m\u00eame pour tous les objets.
+MismatchedDimension_2 = Les dimensions des objets ({0}D et {1}D) ne
concordent pas.
MismatchedDimension_3 = L\u2019argument \u2018{0}\u2019 a {1}
dimension{1,choice,1#|2#s}, alors qu\u2019on en attendait {2}.
NegativeArgument_2 = L\u2019argument \u2018{0}\u2019 ne doit pas
\u00eatre n\u00e9gatif. La valeur donn\u00e9e \u00e9tait {1}.
NodeChildOfItself_1 = Le n\u0153ud \u201c{0}\u201d ne peut pas
\u00eatre un enfant de lui-m\u00eame.