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 2017/03/14 17:12:11 UTC
svn commit: r1786931 - in /sis/trunk: ./
core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/sql/
core/sis-referencing-by-identifiers/
core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/
core/sis-referen...
Author: desruisseaux
Date: Tue Mar 14 17:12:11 2017
New Revision: 1786931
URL: http://svn.apache.org/viewvc?rev=1786931&view=rev
Log:
Merge refactoring of GeohashCoder from JDK7 branch.
Added:
sis/trunk/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/GeohashReferenceSystem.java
- copied, changed from r1786926, sis/branches/JDK7/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/GeohashReferenceSystem.java
sis/trunk/core/sis-referencing-by-identifiers/src/test/java/org/apache/sis/referencing/gazetteer/GeohashReferenceSystemTest.java
- copied, changed from r1786926, sis/branches/JDK7/core/sis-referencing-by-identifiers/src/test/java/org/apache/sis/referencing/gazetteer/GeohashReferenceSystemTest.java
Removed:
sis/trunk/storage/sis-storage/src/test/java/org/apache/sis/index/GeoHashCoderTest.java
Modified:
sis/trunk/ (props changed)
sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/sql/Initializer.java
sis/trunk/core/sis-referencing-by-identifiers/pom.xml
sis/trunk/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/MilitaryGridReferenceSystem.java
sis/trunk/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/ReferencingByIdentifiers.java
sis/trunk/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/SimpleLocation.java
sis/trunk/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/package-info.java
sis/trunk/core/sis-referencing-by-identifiers/src/test/java/org/apache/sis/test/suite/ReferencingByIdentifiersTestSuite.java
sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/index/GeoHashCoder.java
sis/trunk/storage/sis-storage/src/test/java/org/apache/sis/test/suite/StorageTestSuite.java
Propchange: sis/trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Mar 14 17:12:11 2017
@@ -1,5 +1,5 @@
/sis/branches/Android:1430670-1480699
/sis/branches/JDK6:1394364-1758914
-/sis/branches/JDK7:1394913-1786890
-/sis/branches/JDK8:1584960-1786889
+/sis/branches/JDK7:1394913-1786926
+/sis/branches/JDK8:1584960-1786922
/sis/branches/JDK9:1773327-1773512
Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/sql/Initializer.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/sql/Initializer.java?rev=1786931&r1=1786930&r2=1786931&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/sql/Initializer.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/sql/Initializer.java [UTF-8] Tue Mar 14 17:12:11 2017
@@ -277,7 +277,7 @@ public abstract class Initializer {
*/
path = path.normalize();
create = !Files.exists(path);
- source = forJavaDB(path.toString());
+ source = forJavaDB(path.toString().replace(path.getFileSystem().getSeparator(), "/"));
} else if (home != null) {
final Path path = Paths.get(home);
create = !Files.exists(path.resolve(DATABASE)) && Files.isDirectory(path);
Modified: sis/trunk/core/sis-referencing-by-identifiers/pom.xml
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing-by-identifiers/pom.xml?rev=1786931&r1=1786930&r2=1786931&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing-by-identifiers/pom.xml (original)
+++ sis/trunk/core/sis-referencing-by-identifiers/pom.xml Tue Mar 14 17:12:11 2017
@@ -48,6 +48,18 @@ Implementations of Spatial Reference Sys
=========================================================== -->
<developers>
<developer>
+ <name>Chris A. Mattmann</name>
+ <id>mattmann</id>
+ <email>mattmann@apache.org</email>
+ <url>http://sunset.usc.edu/~mattmann/</url>
+ <organization>NASA Jet Propulsion Laboratory</organization>
+ <organizationUrl>http://www.jpl.nasa.gov</organizationUrl>
+ <timezone>-8</timezone>
+ <roles>
+ <role>PMC emeritus</role>
+ </roles>
+ </developer>
+ <developer>
<name>Martin Desruisseaux</name>
<id>desruisseaux</id>
<email>desruisseaux@apache.org</email>
Copied: sis/trunk/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/GeohashReferenceSystem.java (from r1786926, sis/branches/JDK7/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/GeohashReferenceSystem.java)
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/GeohashReferenceSystem.java?p2=sis/trunk/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/GeohashReferenceSystem.java&p1=sis/branches/JDK7/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/GeohashReferenceSystem.java&r1=1786926&r2=1786931&rev=1786931&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/GeohashReferenceSystem.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/GeohashReferenceSystem.java [UTF-8] Tue Mar 14 17:12:11 2017
@@ -36,10 +36,6 @@ import org.apache.sis.util.ArgumentCheck
import org.apache.sis.util.resources.Errors;
import org.apache.sis.util.resources.Vocabulary;
-// Branch-dependent imports
-import org.opengis.referencing.gazetteer.Location;
-import org.opengis.referencing.gazetteer.LocationType;
-
/**
* Geographic coordinates represented as <cite>geohashes</cite> strings.
@@ -164,10 +160,10 @@ public class GeohashReferenceSystem exte
* ("Relax constraint on placement of this()/super() call in constructors").
*/
@Workaround(library="JDK", version="1.8")
- private static LocationType[] types() {
+ private static ModifiableLocationType[] types() {
final ModifiableLocationType gzd = new ModifiableLocationType("Geohash");
gzd.addIdentification(Vocabulary.formatInternational(Vocabulary.Keys.Code));
- return new LocationType[] {gzd};
+ return new ModifiableLocationType[] {gzd};
}
/**
@@ -348,11 +344,16 @@ public class GeohashReferenceSystem exte
* Decodes the given geohash into a latitude and a longitude.
* The axis order depends on the coordinate reference system of the enclosing {@link GeohashReferenceSystem}.
*
+ * <div class="warning"><b>Upcoming API change \u2014 generalization</b><br>
+ * in a future SIS version, the type of returned element may be generalized
+ * to the {@code org.opengis.referencing.gazetteer.Location} interface.
+ * This change is pending GeoAPI revision.</div>
+ *
* @param geohash geohash string to decode.
* @return a new geographic coordinate for the given geohash.
* @throws TransformException if an error occurred while parsing the given string.
*/
- public Location decode(final CharSequence geohash) throws TransformException {
+ public AbstractLocation decode(final CharSequence geohash) throws TransformException {
ArgumentChecks.ensureNonEmpty("geohash", geohash);
return new Decoder(geohash, coordinates);
}
Modified: sis/trunk/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/MilitaryGridReferenceSystem.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/MilitaryGridReferenceSystem.java?rev=1786931&r1=1786930&r2=1786931&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/MilitaryGridReferenceSystem.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/MilitaryGridReferenceSystem.java [UTF-8] Tue Mar 14 17:12:11 2017
@@ -18,11 +18,11 @@ package org.apache.sis.referencing.gazet
import java.util.Arrays;
import java.util.Map;
-import java.util.HashMap;
import java.util.IdentityHashMap;
import java.util.ConcurrentModificationException;
import java.util.Iterator;
import java.awt.geom.Rectangle2D;
+import javax.xml.bind.annotation.XmlTransient;
import org.opengis.util.FactoryException;
import org.opengis.geometry.Envelope;
import org.opengis.geometry.DirectPosition;
@@ -45,7 +45,6 @@ import org.apache.sis.referencing.Identi
import org.apache.sis.referencing.cs.AxesConvention;
import org.apache.sis.referencing.crs.DefaultProjectedCRS;
import org.apache.sis.internal.referencing.j2d.IntervalRectangle;
-import org.apache.sis.metadata.iso.extent.Extents;
import org.apache.sis.math.MathFunctions;
import org.apache.sis.util.CharSequences;
import org.apache.sis.util.ArgumentChecks;
@@ -135,6 +134,7 @@ import org.apache.sis.metadata.iso.citat
* @see CommonCRS#universal(double, double)
* @see <a href="https://en.wikipedia.org/wiki/Military_Grid_Reference_System">Military Grid Reference System on Wikipedia</a>
*/
+@XmlTransient
public class MilitaryGridReferenceSystem extends ReferencingByIdentifiers {
/**
* For cross-version compatibility.
@@ -264,12 +264,7 @@ public class MilitaryGridReferenceSystem
@Workaround(library="JDK", version="1.8")
private static Map<String,?> properties() {
AbstractParty party = new AbstractParty("North Atlantic Treaty Organization", null);
- final Map<String,Object> properties = new HashMap<>(6);
- properties.put(NAME_KEY, new NamedIdentifier(null, "NATO", Resources.formatInternational(Resources.Keys.MGRS), null, null));
- properties.put(DOMAIN_OF_VALIDITY_KEY, Extents.WORLD);
- properties.put(THEME_KEY, Vocabulary.formatInternational(Vocabulary.Keys.Mapping));
- properties.put(OVERALL_OWNER_KEY, party);
- return properties;
+ return properties(new NamedIdentifier(null, "NATO", Resources.formatInternational(Resources.Keys.MGRS), null, null), party);
}
/**
@@ -289,13 +284,6 @@ public class MilitaryGridReferenceSystem
}
/**
- * Returns the first location types, which should be the grid zone identifier.
- */
- final AbstractLocationType rootType() {
- return locationTypes.get(0);
- }
-
- /**
* Returns the value to add to the row number in order to have the "A" letter on the southernmost or
* northernmost value on Greenwich meridian of the Universal Polar Stereographic (UPS) projection.
* If {@code south} is {@code true}, then this is computed from the northernmost value of UPS South;
@@ -423,6 +411,8 @@ public class MilitaryGridReferenceSystem
/**
* Returns the reference system for which MGRS references will be encoded or decoded.
+ *
+ * @return the enclosing reference system.
*/
final MilitaryGridReferenceSystem getReferenceSystem() {
return MilitaryGridReferenceSystem.this;
@@ -646,7 +636,7 @@ public class MilitaryGridReferenceSystem
* @throws TransformException if an error occurred while parsing the given string.
*/
public AbstractLocation decode(final CharSequence reference) throws TransformException {
- ArgumentChecks.ensureNonNull("reference", reference);
+ ArgumentChecks.ensureNonEmpty("reference", reference);
return new Decoder(this, reference);
}
@@ -1619,8 +1609,8 @@ public class MilitaryGridReferenceSystem
/**
- * The result of decoding a MGRS reference. The {@linkplain #getPosition() position}
- * represents the lower-left corner (not the centroid) of the decoded MGRS reference.
+ * The result of decoding a MGRS reference.
+ * The {@linkplain #getPosition() position} represents the centroid of the decoded MGRS reference.
*
* @author Martin Desruisseaux (Geomatys)
* @since 0.8
Modified: sis/trunk/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/ReferencingByIdentifiers.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/ReferencingByIdentifiers.java?rev=1786931&r1=1786930&r2=1786931&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/ReferencingByIdentifiers.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/ReferencingByIdentifiers.java [UTF-8] Tue Mar 14 17:12:11 2017
@@ -19,6 +19,7 @@ package org.apache.sis.referencing.gazet
import java.util.Map;
import java.util.List;
import java.util.Objects;
+import java.util.HashMap;
import javax.xml.bind.annotation.XmlTransient;
import org.opengis.util.InternationalString;
import org.apache.sis.referencing.AbstractReferenceSystem;
@@ -29,8 +30,10 @@ import org.apache.sis.util.iso.Types;
import org.apache.sis.util.Debug;
import org.apache.sis.io.wkt.Formatter;
import org.apache.sis.io.wkt.ElementKind;
+import org.apache.sis.metadata.iso.extent.Extents;
import org.apache.sis.internal.referencing.WKTUtilities;
import org.apache.sis.io.wkt.FormattableObject;
+import org.apache.sis.util.resources.Vocabulary;
// Branch-dependent imports
import org.apache.sis.metadata.iso.citation.AbstractParty;
@@ -185,6 +188,21 @@ public class ReferencingByIdentifiers ex
}
/**
+ * Convenience method for helping subclasses to build their argument for the constructor.
+ * The returned properties have the domain of validity set to the whole word and the theme to "mapping".
+ *
+ * @param name the reference system name as an {@link org.opengis.metadata.Identifier} or a {@link String}.
+ * @param party the overall owner, or {@code null} if none.
+ */
+ static Map<String,Object> properties(final Object name, final AbstractParty party) {
+ final Map<String,Object> properties = new HashMap<>(6);
+ properties.put(NAME_KEY, name);
+ properties.put(DOMAIN_OF_VALIDITY_KEY, Extents.WORLD);
+ properties.put(THEME_KEY, Vocabulary.formatInternational(Vocabulary.Keys.Mapping));
+ properties.put(OVERALL_OWNER_KEY, party);
+ return properties;
+ }
+ /**
* Property used to characterize the spatial reference system.
*
* @return property used to characterize the spatial reference system.
@@ -231,6 +249,13 @@ public class ReferencingByIdentifiers ex
}
/**
+ * Returns the first location type.
+ */
+ final AbstractLocationType rootType() {
+ return locationTypes.get(0);
+ }
+
+ /**
* Compares this reference system with the specified object for equality.
* If the {@code mode} argument value is {@link ComparisonMode#STRICT STRICT} or
* {@link ComparisonMode#BY_CONTRACT BY_CONTRACT}, then all available properties are
Modified: sis/trunk/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/SimpleLocation.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/SimpleLocation.java?rev=1786931&r1=1786930&r2=1786931&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/SimpleLocation.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/SimpleLocation.java [UTF-8] Tue Mar 14 17:12:11 2017
@@ -343,6 +343,42 @@ class SimpleLocation extends AbstractLoc
}
/**
+ * Returns the western-most coordinate of the limit of the dataset extent.
+ * The value is expressed in longitude in decimal degrees (positive east).
+ */
+ @Override
+ public final double getWestBoundLongitude() {
+ return westBoundLongitude;
+ }
+
+ /**
+ * Returns the eastern-most coordinate of the limit of the dataset extent.
+ * The value is expressed in longitude in decimal degrees (positive east).
+ */
+ @Override
+ public final double getEastBoundLongitude() {
+ return eastBoundLongitude;
+ }
+
+ /**
+ * Returns the southern-most coordinate of the limit of the dataset extent.
+ * The value is expressed in latitude in decimal degrees (positive north).
+ */
+ @Override
+ public final double getSouthBoundLatitude() {
+ return southBoundLatitude;
+ }
+
+ /**
+ * Returns the northern-most, coordinate of the limit of the dataset extent.
+ * The value is expressed in latitude in decimal degrees (positive north).
+ */
+ @Override
+ public final double getNorthBoundLatitude() {
+ return northBoundLatitude;
+ }
+
+ /**
* Computes the geographic bounding box from the current values of {@link #minX}, {@link #minY}, {@link #maxX}
* and {@link #maxY} fields. This method performs a work similar to the {@code Envelopes.transform(\u2026)} methods
* but using a much simpler (and faster) algorithm: this method projects only the 4 corners, without any check
@@ -429,41 +465,33 @@ class SimpleLocation extends AbstractLoc
if (ymin > minY + ty) minY = ymin;
if (ymax < maxY - ty) maxY = ymax;
}
+ }
- /**
- * Returns the western-most coordinate of the limit of the dataset extent.
- * The value is expressed in longitude in decimal degrees (positive east).
- */
- @Override
- public final double getWestBoundLongitude() {
- return westBoundLongitude;
- }
-
- /**
- * Returns the eastern-most coordinate of the limit of the dataset extent.
- * The value is expressed in longitude in decimal degrees (positive east).
- */
- @Override
- public final double getEastBoundLongitude() {
- return eastBoundLongitude;
- }
-
- /**
- * Returns the southern-most coordinate of the limit of the dataset extent.
- * The value is expressed in latitude in decimal degrees (positive north).
- */
- @Override
- public final double getSouthBoundLatitude() {
- return southBoundLatitude;
- }
-
- /**
- * Returns the northern-most, coordinate of the limit of the dataset extent.
- * The value is expressed in latitude in decimal degrees (positive north).
- */
- @Override
- public final double getNorthBoundLatitude() {
- return northBoundLatitude;
+ /**
+ * Converts the current envelope using the given math transform.
+ * The given transform usually performs nothing more than axis swapping or unit conversions.
+ *
+ * @param mt the math transform to use for conversion.
+ * @param buffer a temporary buffer of length 8 or more.
+ * @throws TransformException if an error occurred while converting the points.
+ */
+ final void convert(final MathTransform mt, final double[] buffer) throws TransformException {
+ buffer[3] = buffer[7] = maxY;
+ buffer[4] = buffer[6] = maxX;
+ buffer[1] = buffer[5] = minY;
+ buffer[0] = buffer[2] = minX;
+ minX = maxX = minY = maxY = Double.NaN;
+ mt.transform(buffer, 0, buffer, 0, 4);
+ for (int i=0; i<8;) {
+ final double x = buffer[i++];
+ final double y = buffer[i++];
+ if (Double.isNaN(x) || Double.isNaN(y)) {
+ throw new TransformException(Errors.format(Errors.Keys.CanNotTransformEnvelope));
+ }
+ if (!(x >= minX)) minX = x; // Use '!' for accepting NaN.
+ if (!(x <= maxX)) maxX = x;
+ if (!(y >= minY)) minY = y;
+ if (!(y <= maxY)) maxY = y;
}
}
}
Modified: sis/trunk/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/package-info.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/package-info.java?rev=1786931&r1=1786930&r2=1786931&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/package-info.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/package-info.java [UTF-8] Tue Mar 14 17:12:11 2017
@@ -27,7 +27,7 @@
*
* <p>This package provides also implementations on top of above base classes.
* Some implementation classes are {@link org.apache.sis.referencing.gazetteer.MilitaryGridReferenceSystem}
- * (also for civilian use).</p>
+ * (also for civilian use) and {@link org.apache.sis.referencing.gazetteer.GeohashReferenceSystem}.</p>
*
* @author Chris Mattmann (JPL)
* @author Martin Desruisseaux (Geomatys)
Copied: sis/trunk/core/sis-referencing-by-identifiers/src/test/java/org/apache/sis/referencing/gazetteer/GeohashReferenceSystemTest.java (from r1786926, sis/branches/JDK7/core/sis-referencing-by-identifiers/src/test/java/org/apache/sis/referencing/gazetteer/GeohashReferenceSystemTest.java)
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing-by-identifiers/src/test/java/org/apache/sis/referencing/gazetteer/GeohashReferenceSystemTest.java?p2=sis/trunk/core/sis-referencing-by-identifiers/src/test/java/org/apache/sis/referencing/gazetteer/GeohashReferenceSystemTest.java&p1=sis/branches/JDK7/core/sis-referencing-by-identifiers/src/test/java/org/apache/sis/referencing/gazetteer/GeohashReferenceSystemTest.java&r1=1786926&r2=1786931&rev=1786931&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing-by-identifiers/src/test/java/org/apache/sis/referencing/gazetteer/GeohashReferenceSystemTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing-by-identifiers/src/test/java/org/apache/sis/referencing/gazetteer/GeohashReferenceSystemTest.java [UTF-8] Tue Mar 14 17:12:11 2017
@@ -29,10 +29,6 @@ import org.junit.Test;
import static org.junit.Assert.*;
-// Branch-dependent imports
-import org.opengis.referencing.gazetteer.Location;
-import org.opengis.referencing.gazetteer.LocationType;
-
/**
* Tests methods from the {@link GeohashReferenceSystem} class.
@@ -145,7 +141,7 @@ public final strictfp class GeohashRefer
*/
private void testDecode(final GeohashReferenceSystem.Coder coder, final int \u03bbi, final int \u03c6i) throws TransformException {
for (final Place place : PLACES) {
- final Location location = coder.decode(place.geohash);
+ final AbstractLocation location = coder.decode(place.geohash);
final DirectPosition result = location.getPosition().getDirectPosition();
assertEquals(place.name, place.longitude, result.getOrdinate(\u03bbi), TOLERANCE);
assertEquals(place.name, place.latitude, result.getOrdinate(\u03c6i), TOLERANCE);
@@ -163,7 +159,7 @@ public final strictfp class GeohashRefer
assertEquals("theme", "Mapping", rs.getTheme().toString(Locale.ENGLISH));
assertEquals("theme", "Cartographie", rs.getTheme().toString(Locale.FRENCH));
- final LocationType type = TestUtilities.getSingleton(rs.getLocationTypes());
+ final AbstractLocationType type = TestUtilities.getSingleton(rs.getLocationTypes());
assertEquals("type", "Geohash", type.getName().toString(Locale.ENGLISH));
assertEquals("parent", 0, type.getParents().size());
assertEquals("children", 0, type.getChildren().size());
Modified: sis/trunk/core/sis-referencing-by-identifiers/src/test/java/org/apache/sis/test/suite/ReferencingByIdentifiersTestSuite.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing-by-identifiers/src/test/java/org/apache/sis/test/suite/ReferencingByIdentifiersTestSuite.java?rev=1786931&r1=1786930&r2=1786931&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing-by-identifiers/src/test/java/org/apache/sis/test/suite/ReferencingByIdentifiersTestSuite.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing-by-identifiers/src/test/java/org/apache/sis/test/suite/ReferencingByIdentifiersTestSuite.java [UTF-8] Tue Mar 14 17:12:11 2017
@@ -33,6 +33,7 @@ import org.junit.BeforeClass;
org.apache.sis.referencing.gazetteer.LocationFormatTest.class,
org.apache.sis.referencing.gazetteer.LocationTypeTest.class,
org.apache.sis.referencing.gazetteer.ReferencingByIdentifiersTest.class,
+ org.apache.sis.referencing.gazetteer.GeohashReferenceSystemTest.class,
org.apache.sis.referencing.gazetteer.MilitaryGridReferenceSystemTest.class
})
public final strictfp class ReferencingByIdentifiersTestSuite extends TestSuite {
Modified: sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/index/GeoHashCoder.java
URL: http://svn.apache.org/viewvc/sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/index/GeoHashCoder.java?rev=1786931&r1=1786930&r2=1786931&view=diff
==============================================================================
--- sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/index/GeoHashCoder.java [UTF-8] (original)
+++ sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/index/GeoHashCoder.java [UTF-8] Tue Mar 14 17:12:11 2017
@@ -38,7 +38,11 @@ import org.apache.sis.util.resources.Err
* @module
*
* @see <a href="http://en.wikipedia.org/wiki/Geohash">Wikipedia: Geohash</a>
+ *
+ * @deprecated Moved to {@link org.apache.sis.referencing.gazetteer.GeohashReferenceSystem}.
+ * Note that axis order of {@code encode(double, double)} method differs.
*/
+@Deprecated
public class GeoHashCoder implements Serializable {
/**
* For cross-version compatibility.
@@ -47,7 +51,10 @@ public class GeoHashCoder implements Ser
/**
* The encoding format used by {@link GeoHashCoder}.
+ *
+ * @deprecated Moved to {@link org.apache.sis.referencing.gazetteer.GeohashReferenceSystem.Format}.
*/
+ @Deprecated
public static enum Format {
/**
* Format consisting of 32 symbols used at {@code http://geohash.org}. This encoding uses digits 0 to 9,
Modified: sis/trunk/storage/sis-storage/src/test/java/org/apache/sis/test/suite/StorageTestSuite.java
URL: http://svn.apache.org/viewvc/sis/trunk/storage/sis-storage/src/test/java/org/apache/sis/test/suite/StorageTestSuite.java?rev=1786931&r1=1786930&r2=1786931&view=diff
==============================================================================
--- sis/trunk/storage/sis-storage/src/test/java/org/apache/sis/test/suite/StorageTestSuite.java [UTF-8] (original)
+++ sis/trunk/storage/sis-storage/src/test/java/org/apache/sis/test/suite/StorageTestSuite.java [UTF-8] Tue Mar 14 17:12:11 2017
@@ -48,8 +48,7 @@ import org.junit.BeforeClass;
org.apache.sis.internal.storage.wkt.StoreTest.class,
org.apache.sis.internal.storage.csv.StoreProviderTest.class,
org.apache.sis.internal.storage.csv.StoreTest.class,
- org.apache.sis.storage.DataStoresTest.class,
- org.apache.sis.index.GeoHashCoderTest.class
+ org.apache.sis.storage.DataStoresTest.class
})
public final strictfp class StorageTestSuite extends TestSuite {
/**