You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sis.apache.org by de...@apache.org on 2014/02/02 23:51:14 UTC
svn commit: r1563744 - in /sis/branches/JDK7/core:
sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/
sis-referencing/src/main/java/org/apache/sis/internal/referencing/
sis-referencing/src/main/java/org/apache/sis/io/wkt/ sis-referencing/sr...
Author: desruisseaux
Date: Sun Feb 2 22:51:14 2014
New Revision: 1563744
URL: http://svn.apache.org/r1563744
Log:
WKT2 formatting support for SCOPE, AREA, BBOX and REMARKS.
Modified:
sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/Extents.java
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/ReferencingUtilities.java
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/io/wkt/Convention.java
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/io/wkt/Formatter.java
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/io/wkt/WKTFormat.java
sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/crs/HardCodedCRSTest.java
sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/DefaultPrimeMeridianTest.java
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=1563744&r1=1563743&r2=1563744&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] Sun Feb 2 22:51:14 2014
@@ -17,13 +17,19 @@
package org.apache.sis.metadata.iso.extent;
import java.util.Date;
+import javax.measure.unit.Unit;
import org.opengis.temporal.TemporalPrimitive;
import org.opengis.metadata.extent.Extent;
+import org.opengis.metadata.extent.VerticalExtent;
import org.opengis.metadata.extent.TemporalExtent;
import org.opengis.metadata.extent.BoundingPolygon;
import org.opengis.metadata.extent.GeographicExtent;
import org.opengis.metadata.extent.GeographicBoundingBox;
+import org.opengis.referencing.cs.CoordinateSystemAxis;
+import org.opengis.referencing.cs.AxisDirection;
+import org.opengis.referencing.crs.VerticalCRS;
import org.apache.sis.measure.Longitude;
+import org.apache.sis.measure.MeasurementRange;
import org.apache.sis.util.resources.Vocabulary;
import org.apache.sis.util.ArgumentChecks;
import org.apache.sis.util.Static;
@@ -80,8 +86,7 @@ public final class Extents extends Stati
* {@linkplain DefaultGeographicBoundingBox#add added} together.
*
* @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 the given extent was {@code null}.
+ * @return A geographic bounding box extracted from the given extent, or {@code null} in none.
*/
public static GeographicBoundingBox getGeographicBoundingBox(final Extent extent) {
GeographicBoundingBox candidate = null;
@@ -125,6 +130,82 @@ public final class Extents extends Stati
}
/**
+ * Returns the union of all vertical ranges found in the given extent, or {@code null} if none.
+ * Depths have negative height values: if the {@linkplain CoordinateSystemAxis#getDirection() axis direction}
+ * is toward down, then this method reverses the sign of minimum and maximum values.
+ *
+ * {@section Multi-occurrences}
+ * If the given {@code Extent} object contains more than one vertical extent, then this method
+ * performs the following choices:
+ *
+ * <ul>
+ * <li>If no range specify a unit of measurement, return the first range and ignore all others.</li>
+ * <li>Otherwise take the first range having a unit of measurement. Then:<ul>
+ * <li>All other ranges having an incompatible unit of measurement will be ignored.</li>
+ * <li>All other ranges having a compatible unit of measurement will be converted to
+ * the unit of the first retained range, and their union will be computed.</li>
+ * </ul></li>
+ * </ul>
+ *
+ * {@example Heights or depths are often measured using some pressure units, for example hectopascals (hPa).
+ * An <code>Extent</code> could contain two vertical elements: one with the height measurements
+ * in hPa, and the other element with heights transformed to metres using an empirical formula.
+ * In such case this method will select the first vertical element on the assumption that it is
+ * the "main" one that the metadata producer intended to show. Then this method will search for
+ * other vertical elements using pressure unit. In our example there is none. But if any were
+ * found, this method would compute their union.}
+ *
+ * @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
+ */
+ public static MeasurementRange<Double> getVerticalRange(final Extent extent) {
+ MeasurementRange<Double> range = null;
+ if (extent != null) {
+ for (final VerticalExtent element : extent.getVerticalElements()) {
+ double min = element.getMinimumValue();
+ double max = element.getMaximumValue();
+ final VerticalCRS crs = element.getVerticalCRS();
+ Unit<?> unit = null;
+ if (crs != null) {
+ final CoordinateSystemAxis axis = crs.getCoordinateSystem().getAxis(0);
+ unit = axis.getUnit();
+ if (AxisDirection.DOWN.equals(axis.getDirection())) {
+ final double tmp = min;
+ min = -max;
+ max = -tmp;
+ }
+ }
+ if (range != null) {
+ /*
+ * If the new range does not specify any unit, then we do not know how to convert
+ * the values before to perform the union operation. Conservatively do nothing.
+ */
+ if (unit == null) {
+ continue;
+ }
+ /*
+ * If previous range did not specify any unit, then unconditionally replace it by
+ * the new range since it provides more information. If both ranges specify units,
+ * then we will compute the union if we can, or ignore the new range otherwise.
+ */
+ final Unit<?> previous = range.unit();
+ if (previous != null) {
+ if (previous.isCompatible(unit)) {
+ range = (MeasurementRange<Double>) range.union(
+ MeasurementRange.create(min, true, max, true, unit));
+ }
+ continue;
+ }
+ }
+ range = MeasurementRange.create(min, true, max, true, unit);
+ }
+ }
+ return range;
+ }
+
+ /**
* Returns an instant in the {@linkplain Extent#getTemporalElements() temporal elements} of the given extent,
* or {@code null} if none. First, this method computes the union of all temporal elements. Then this method
* computes the linear interpolation between the start and end time as in the following pseudo-code:
Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/ReferencingUtilities.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/ReferencingUtilities.java?rev=1563744&r1=1563743&r2=1563744&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/ReferencingUtilities.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/ReferencingUtilities.java [UTF-8] Sun Feb 2 22:51:14 2014
@@ -122,21 +122,29 @@ public final class ReferencingUtilities
/**
* Returns the unit used for all axes in the given coordinate system.
* If not all axes use the same unit, then this method returns {@code null}.
- * This convenience method is used for Well Know Text version 1 (WKT 1) formatting.
+ *
+ * <p>This method is used either when the coordinate system is expected to contain exactly one axis,
+ * or for operations that support only one units for all axes, for example Well Know Text version 1
+ * (WKT 1) formatting.</p>
*
* @param cs The coordinate system for which to get the unit, or {@code null}.
* @return The unit for all axis in the given coordinate system, or {@code null}.
+ *
+ * @since 0.4
*/
public static Unit<?> getUnit(final CoordinateSystem cs) {
Unit<?> unit = null;
if (cs != null) {
for (int i=cs.getDimension(); --i>=0;) {
- final Unit<?> candidate = cs.getAxis(i).getUnit();
- if (candidate != null) {
- if (unit == null) {
- unit = candidate;
- } else if (!unit.equals(candidate)) {
- return null;
+ final CoordinateSystemAxis axis = cs.getAxis(i);
+ if (axis != null) { // Paranoiac check.
+ final Unit<?> candidate = axis.getUnit();
+ if (candidate != null) {
+ if (unit == null) {
+ unit = candidate;
+ } else if (!unit.equals(candidate)) {
+ return null;
+ }
}
}
}
Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/io/wkt/Convention.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/io/wkt/Convention.java?rev=1563744&r1=1563743&r2=1563744&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/io/wkt/Convention.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/io/wkt/Convention.java [UTF-8] Sun Feb 2 22:51:14 2014
@@ -131,7 +131,7 @@ public enum Convention {
/**
* {@code true} for using WKT 1 syntax, or {@code false} for using WKT 2 syntax.
*/
- final boolean isWKT1;
+ private final boolean isWKT1;
/**
* {@code true} for a frequently-used convention about units instead than the standard one.
Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/io/wkt/Formatter.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/io/wkt/Formatter.java?rev=1563744&r1=1563743&r2=1563744&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/io/wkt/Formatter.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/io/wkt/Formatter.java [UTF-8] Sun Feb 2 22:51:14 2014
@@ -16,10 +16,12 @@
*/
package org.apache.sis.io.wkt;
+import java.util.Locale;
import java.util.Collection;
import java.text.NumberFormat;
import java.text.FieldPosition;
import java.lang.reflect.Array;
+import java.math.RoundingMode;
import javax.measure.unit.SI;
import javax.measure.unit.NonSI;
import javax.measure.unit.Unit;
@@ -27,15 +29,21 @@ import javax.measure.unit.UnitFormat;
import javax.measure.quantity.Angle;
import javax.measure.quantity.Length;
+import org.opengis.util.InternationalString;
import org.opengis.metadata.Identifier;
import org.opengis.metadata.citation.Citation;
+import org.opengis.metadata.extent.Extent;
+import org.opengis.metadata.extent.GeographicBoundingBox;
import org.opengis.parameter.GeneralParameterValue;
import org.opengis.parameter.ParameterDescriptor;
import org.opengis.parameter.ParameterValue;
import org.opengis.parameter.ParameterValueGroup;
import org.opengis.referencing.IdentifiedObject;
import org.opengis.referencing.ReferenceIdentifier;
+import org.opengis.referencing.ReferenceSystem;
+import org.opengis.referencing.datum.Datum;
import org.opengis.referencing.cs.CoordinateSystemAxis;
+import org.opengis.referencing.operation.CoordinateOperation;
import org.opengis.referencing.operation.MathTransform;
import org.opengis.referencing.operation.Matrix;
import org.opengis.util.CodeList;
@@ -48,6 +56,7 @@ import org.apache.sis.util.CharSequences
import org.apache.sis.util.ArgumentChecks;
import org.apache.sis.util.resources.Errors;
import org.apache.sis.internal.util.Citations;
+import org.apache.sis.metadata.iso.extent.Extents;
import org.apache.sis.referencing.IdentifiedObjects;
import org.apache.sis.referencing.AbstractIdentifiedObject;
import org.apache.sis.referencing.operation.transform.LinearTransform;
@@ -95,6 +104,12 @@ public class Formatter {
static final String BACKGROUND_DEFAULT = "\u001B[49m";
/**
+ * The locale for the localization of international strings.
+ * This is not the same than {@link Symbols#getLocale()}.
+ */
+ private final Locale locale;
+
+ /**
* The symbols to use for this formatter.
*
* @see WKTFormat#getSymbols()
@@ -237,6 +252,7 @@ public class Formatter {
ArgumentChecks.ensureNonNull("convention", convention);
ArgumentChecks.ensureNonNull("symbols", symbols);
ArgumentChecks.ensureBetween("indentation", WKTFormat.SINGLE_LINE, Byte.MAX_VALUE, indentation);
+ this.locale = Locale.getDefault(Locale.Category.DISPLAY);
this.convention = convention;
this.authority = convention.getNameAuthority();
this.symbols = symbols.immutable();
@@ -250,7 +266,8 @@ public class Formatter {
* Constructor for private use by {@link WKTFormat#getFormatter()} only. This allows to use the number
* format created by {@link WKTFormat#createFormat(Class)}, which may be overridden by the user.
*/
- Formatter(final Symbols symbols, final NumberFormat numberFormat, final UnitFormat unitFormat) {
+ Formatter(final Locale locale, final Symbols symbols, final NumberFormat numberFormat, final UnitFormat unitFormat) {
+ this.locale = locale;
this.convention = Convention.DEFAULT;
this.authority = Convention.DEFAULT.getNameAuthority();
this.symbols = symbols;
@@ -410,9 +427,17 @@ public class Formatter {
/**
* Appends the given {@code FormattableObject}.
- * This method will automatically append the keyword (e.g. {@code "GEOCS"}), the name and the authority code,
- * and will invoke <code>formattable.{@linkplain FormattableObject#formatTo(Formatter) formatTo}(this)</code>
- * for completing the inner part of the WKT.
+ * This method performs the following steps:
+ *
+ * <ul>
+ * <li>Invoke <code>formattable.{@linkplain FormattableObject#formatTo(Formatter) formatTo}(this)</code>.</li>
+ * <li>Prepend the keyword returned by the above method call (e.g. {@code "GEOCS"}).</li>
+ * <li>Append the {@code SCOPE[…]} element, if any (WKT 2 only).</li>
+ * <li>Append the {@code AREA[…]} element, if any (WKT 2 only).</li>
+ * <li>Append the {@code BBOX[…]} element, if any (WKT 2 only).</li>
+ * <li>Append the {@code ID[…]} (WKT 2) or {@code AUTHORITY[…]}} (WKT 1) element, if any.</li>
+ * <li>Append the {@code REMARKS[…]} element, if any (WKT 2 only).</li>
+ * </ul>
*
* @param object The formattable object to append to the WKT, or {@code null} if none.
*/
@@ -467,6 +492,14 @@ public class Formatter {
}
buffer.insert(base, keyword);
/*
+ * Format the SCOPE["…"] and AREA["…"] elements (WKT 2 only). Those information
+ * are available only for Datum, CoordinateOperation and ReferenceSystem objects.
+ */
+ final boolean isWKT1 = convention.isWKT1();
+ if (!isWKT1) {
+ appendScopeAndArea(object);
+ }
+ /*
* Formats the AUTHORITY[<name>,<code>] entity, if there is one. The entity
* will be on the same line than the enclosing one if no line separator were
* added (e.g. SPHEROID["Clarke 1866", ..., AUTHORITY["EPSG","7008"]]), or on
@@ -502,13 +535,48 @@ public class Formatter {
buffer.appendCodePoint(close);
}
}
+ /*
+ * Format remarks if any, and close the element.
+ */
+ if (info != null) {
+ append("REMARKS", info.getRemarks());
+ }
buffer.appendCodePoint(close);
requestNewLine = true;
indent(-1);
}
/**
- * Appends the given {@code IdentifiedObject} object.
+ * Appends the scope and domain of validity of the given object. Those information are available
+ * only for {@link ReferenceSystem}, {@link Datum} and {@link CoordinateOperation} objects.
+ */
+ private void appendScopeAndArea(final Object object) {
+ final InternationalString scope;
+ final Extent area;
+ if (object instanceof ReferenceSystem) {
+ scope = ((ReferenceSystem) object).getScope();
+ area = ((ReferenceSystem) object).getDomainOfValidity();
+ } else if (object instanceof Datum) {
+ scope = ((Datum) object).getScope();
+ area = ((Datum) object).getDomainOfValidity();
+ } else if (object instanceof CoordinateOperation) {
+ scope = ((CoordinateOperation) object).getScope();
+ area = ((CoordinateOperation) object).getDomainOfValidity();
+ } else {
+ return;
+ }
+ append("SCOPE", scope);
+ if (area != null) {
+ append("AREA", area.getDescription());
+ append(Extents.getGeographicBoundingBox(area), 2);
+ }
+ }
+
+ /**
+ * Appends the given {@code IdentifiedObject}.
+ *
+ * <p>The default implementation delegates to {@link #append(FormattableObject)},
+ * after wrapping the given object in an adapter if necessary.</p>
*
* @param object The identified object to append to the WKT, or {@code null} if none.
*/
@@ -520,6 +588,36 @@ public class Formatter {
}
/**
+ * Appends the given geographic bounding box in a {@code BBOX[…]} element.
+ * Longitude and latitude values will be formatted in decimal degrees.
+ * Longitudes are relative to the Greenwich meridian, with values increasing toward East.
+ * Latitudes values are increasing toward North.
+ *
+ * {@section Numerical precision}
+ * The ISO 19162 standards recommends to format those values with only 2 decimal digits.
+ * This is because {@code GeographicBoundingBox} does not specify the datum, so this box
+ * is an approximative information only.
+ *
+ * @param bbox The geographic bounding box to append to the WKT, or {@code null}.
+ * @param fractionDigits The number of fraction digits to use. The recommended value is 2.
+ */
+ public void append(final GeographicBoundingBox bbox, final int fractionDigits) {
+ if (bbox != null) {
+ appendSeparator(requestNewLine);
+ buffer.append("BBOX").appendCodePoint(symbols.getOpeningBracket(0));
+ numberFormat.setMinimumFractionDigits(fractionDigits);
+ numberFormat.setMaximumFractionDigits(fractionDigits);
+ numberFormat.setRoundingMode(RoundingMode.FLOOR);
+ appendPreset(bbox.getSouthBoundLatitude());
+ appendPreset(bbox.getWestBoundLongitude());
+ numberFormat.setRoundingMode(RoundingMode.CEILING);
+ appendPreset(bbox.getNorthBoundLatitude());
+ appendPreset(bbox.getEastBoundLongitude());
+ buffer.appendCodePoint(symbols.getClosingBracket(0));
+ }
+ }
+
+ /**
* Appends the given math transform.
*
* @param transform The transform object to append to the WKT, or {@code null} if none.
@@ -717,6 +815,33 @@ public class Formatter {
}
/**
+ * Appends an international text in an element having the given keyword. Since this method
+ * is typically invoked for long descriptions, the element will be written on its own line.
+ *
+ * {@example
+ * <ul>
+ * <li><code>SCOPE["Large scale topographic mapping and cadastre."]</code></li>
+ * <li><code>AREA["Netherlands offshore."]</code></li>
+ * </ul>
+ * }
+ *
+ * @param keyword The keyword. Example: {@code "SCOPE"}, {@code "AREA"} or {@code "REMARKS"}.
+ * @param text The text, or {@code null} if none.
+ */
+ private void append(final String keyword, final InternationalString text) {
+ if (text != null) {
+ final String localized = CharSequences.trimWhitespaces(text.toString(locale));
+ if (localized != null && !localized.isEmpty()) {
+ appendSeparator(true);
+ buffer.append(keyword).appendCodePoint(symbols.getOpeningBracket(0));
+ quote(localized);
+ buffer.appendCodePoint(symbols.getClosingBracket(0));
+ requestNewLine = true;
+ }
+ }
+ }
+
+ /**
* Appends the given string as a quoted text. If the given string contains the closing quote character,
* that character will be doubled. We check for the closing quote only because it is the character that
* the parser will look for determining the text end.
@@ -787,6 +912,24 @@ public class Formatter {
*/
numberFormat.setMaximumFractionDigits(DecimalFunctions.fractionDigitsForValue(number, 2));
numberFormat.setMinimumFractionDigits(1); // Must be after setMaximumFractionDigits(…).
+ numberFormat.setRoundingMode(RoundingMode.HALF_EVEN);
+ numberFormat.format(number, buffer, dummy);
+ resetColor();
+ }
+
+ /**
+ * Appends the given number without any change to the {@link NumberFormat} setting.
+ * Caller shall ensure that the following method has been invoked prior this method call:
+ *
+ * <ul>
+ * <li>{@link NumberFormat#setMinimumFractionDigits(int)}</li>
+ * <li>{@link NumberFormat#setMaximumFractionDigits(int)}</li>
+ * <li>{@link NumberFormat#setRoundingMode(RoundingMode)}</li>
+ * </ul>
+ */
+ private void appendPreset(final double number) {
+ appendSeparator(false);
+ setColor(ElementKind.NUMBER);
numberFormat.format(number, buffer, dummy);
resetColor();
}
Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/io/wkt/WKTFormat.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/io/wkt/WKTFormat.java?rev=1563744&r1=1563743&r2=1563744&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/io/wkt/WKTFormat.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/io/wkt/WKTFormat.java [UTF-8] Sun Feb 2 22:51:14 2014
@@ -367,7 +367,7 @@ public class WKTFormat extends CompoundF
*/
Formatter formatter = this.formatter;
if (formatter == null) {
- formatter = new Formatter(symbols,
+ formatter = new Formatter(getLocale(), symbols,
(NumberFormat) getFormat(Number.class),
(UnitFormat) getFormat(Unit.class));
updateFormatter(formatter);
Modified: sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/crs/HardCodedCRSTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/crs/HardCodedCRSTest.java?rev=1563744&r1=1563743&r2=1563744&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/crs/HardCodedCRSTest.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/crs/HardCodedCRSTest.java [UTF-8] Sun Feb 2 22:51:14 2014
@@ -80,7 +80,9 @@ public final strictfp class HardCodedCRS
" PRIMEM[“Greenwich”, 0.0, AUTHORITY[“EPSG”, “8901”]],\n" +
" UNIT[“degree”, 0.017453292519943295],\n" +
" AXIS[“Geodetic longitude”, EAST],\n" +
- " AXIS[“Geodetic latitude”, NORTH]]",
+ " AXIS[“Geodetic latitude”, NORTH],\n" +
+ " AREA[“World”],\n" +
+ " BBOX[-90.00, -180.00, 90.00, 180.00]]",
WGS84);
}
Modified: sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/DefaultPrimeMeridianTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/DefaultPrimeMeridianTest.java?rev=1563744&r1=1563743&r2=1563744&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/DefaultPrimeMeridianTest.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/DefaultPrimeMeridianTest.java [UTF-8] Sun Feb 2 22:51:14 2014
@@ -146,10 +146,12 @@ public final strictfp class DefaultPrime
assertEquals("greenwichLongitude", 2.33722917, pm.getGreenwichLongitude(NonSI.DEGREE_ANGLE), 1E-12);
assertEquals("Equivalent to 2°20′14.025″.", pm.getRemarks().toString());
assertNull("name.codeSpace", pm.getName().getCodeSpace());
- assertWktEquals("PRIMEM[“Paris”, 2.33722917, AUTHORITY[“EPSG”, “8903”]]", pm);
+ assertWktEquals(
+ "PRIMEM[“Paris”, 2.33722917, AUTHORITY[“EPSG”, “8903”],\n" +
+ "REMARKS[“Equivalent to 2°20′14.025″.”]]", pm);
assertXmlEquals(
"<gml:PrimeMeridian xmlns:gml=\"" + Namespaces.GML + "\">\n" +
- " <gml:identifier codeSpace=\"OGP\">urn:ogc:def:meridian:EPSG::8903</gml:identifier>" +
+ " <gml:identifier codeSpace=\"OGP\">urn:ogc:def:meridian:EPSG::8903</gml:identifier>\n" +
" <gml:name>Paris</gml:name>\n" +
" <gml:remarks>Equivalent to 2°20′14.025″.</gml:remarks>\n" +
" <gml:greenwichLongitude uom=\"urn:ogc:def:uom:EPSG::9105\">2.5969213</gml:greenwichLongitude>\n" +