sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1785688 - in /sis/branches/JDK8/core: sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/ sis-referencing-by-identifiers/src/test/java/org/apache/sis/referencing/gazetteer/ sis-utility/src/main/java/org/apach...
Date Mon, 06 Mar 2017 17:04:37 GMT
Author: desruisseaux
Date: Mon Mar  6 17:04:37 2017
New Revision: 1785688

URL: http://svn.apache.org/viewvc?rev=1785688&view=rev
Log:
Change the order of property shown by LocationFormat for making easier to see the representative
position in the context of location bounding box.

Modified:
    sis/branches/JDK8/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/LocationFormat.java
    sis/branches/JDK8/core/sis-referencing-by-identifiers/src/test/java/org/apache/sis/referencing/gazetteer/LocationFormatTest.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.properties
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary_fr.properties

Modified: sis/branches/JDK8/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/LocationFormat.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/LocationFormat.java?rev=1785688&r1=1785687&r2=1785688&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/LocationFormat.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/LocationFormat.java
[UTF-8] Mon Mar  6 17:04:37 2017
@@ -77,11 +77,11 @@ import org.apache.sis.util.resources.Voc
  *   │ Location type:               Grid zone designator           │
  *   │ Geographic identifier:       32TNL83                        │
  *   │ West bound:                    580,000 m    —     9°57′00″E │
+ *   │ Representative value:          585,000 m    —    10°00′36″E │
  *   │ East bound:                    590,000 m    —    10°04′13″E │
  *   │ South bound:                 4,530,000 m    —    40°54′58″N │
+ *   │ Representative value:        4,535,000 m    —    40°57′42″N │
  *   │ North bound:                 4,540,000 m    —    41°00′27″N │
- *   │ Representative position:       585,000 m    —    10°00′36″E │
- *   │                              4,535,000 m    —    40°57′42″N │
  *   │ Coordinate reference system: WGS 84 / UTM zone 32N          │
  *   └─────────────────────────────────────────────────────────────┘
  * }
@@ -114,11 +114,11 @@ public class LocationFormat extends Comp
      */
     private static final short[] BOUND_KEY = {
         Vocabulary.Keys.WestBound,
+        Vocabulary.Keys.RepresentativeValue,
         Vocabulary.Keys.EastBound,
         Vocabulary.Keys.SouthBound,
-        Vocabulary.Keys.NorthBound,
-        Vocabulary.Keys.RepresentativePosition,
-        0
+        Vocabulary.Keys.RepresentativeValue,
+        Vocabulary.Keys.NorthBound
     };
 
     /**
@@ -329,21 +329,21 @@ public class LocationFormat extends Comp
                     case 0: if (bbox     != null) g = bbox.getWestBoundLongitude();
                             if (envelope != null) p = envelope.getMinimum(0);
                             break;
-                    case 1: if (bbox     != null) g = bbox.getEastBoundLongitude();
+                    case 2: if (bbox     != null) g = bbox.getEastBoundLongitude();
                             if (envelope != null) p = envelope.getMaximum(0);
                             rounding = RoundingMode.CEILING;
                             break;
-                    case 2: if (bbox     != null) g = bbox.getSouthBoundLatitude();
+                    case 3: if (bbox     != null) g = bbox.getSouthBoundLatitude();
                             if (envelope != null) p = envelope.getMinimum(1);
                             dimension = 1;
                             break;
-                    case 3: if (bbox     != null) g = bbox.getNorthBoundLatitude();
+                    case 5: if (bbox     != null) g = bbox.getNorthBoundLatitude();
                             if (envelope != null) p = envelope.getMaximum(1);
                             rounding = RoundingMode.CEILING;
                             dimension = 1;
                             break;
-                    case 5: dimension = 1;                            // Fall through
-                    case 4: if (geopos   != null) g = geopos  .getOrdinate(dimension);
+                    case 4: dimension = 1;                            // Fall through
+                    case 1: if (geopos   != null) g = geopos  .getOrdinate(dimension);
                             if (position != null) p = position.getOrdinate(dimension);
                             rounding = RoundingMode.HALF_EVEN;
                             break;
@@ -398,10 +398,7 @@ public class LocationFormat extends Comp
                 final String u = (unitSymbol != null) ? unitSymbol[i] : "";
                 final String g = (geographic != null) ? geographic[i] : "";
                 if (!p.isEmpty() || !g.isEmpty()) {
-                    final short key = BOUND_KEY[i];
-                    if (key != 0) {
-                        vocabulary.appendLabel(key, table);
-                    }
+                    vocabulary.appendLabel(BOUND_KEY[i], table);
                     table.nextColumn();
                     table.append(CharSequences.spaces(maxProjLength - p.length())).append(p);
                     table.append(CharSequences.spaces(maxUnitLength - u.length())).append(u).append(separator);

Modified: sis/branches/JDK8/core/sis-referencing-by-identifiers/src/test/java/org/apache/sis/referencing/gazetteer/LocationFormatTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing-by-identifiers/src/test/java/org/apache/sis/referencing/gazetteer/LocationFormatTest.java?rev=1785688&r1=1785687&r2=1785688&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing-by-identifiers/src/test/java/org/apache/sis/referencing/gazetteer/LocationFormatTest.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing-by-identifiers/src/test/java/org/apache/sis/referencing/gazetteer/LocationFormatTest.java
[UTF-8] Mon Mar  6 17:04:37 2017
@@ -51,11 +51,11 @@ public final strictfp class LocationForm
                 "┌─────────────────────────────────────────┐\n"
+
                 "│ Geographic identifier:       A location │\n" +
                 "│ West bound:                   8°00′00″E │\n" +
+                "│ Representative value:         9°00′00″E │\n" +
                 "│ East bound:                  10°00′00″E │\n" +
                 "│ South bound:                  2°00′00″S │\n" +
+                "│ Representative value:        14°00′00″N │\n" +
                 "│ North bound:                 30°00′00″N │\n" +
-                "│ Representative position:      9°00′00″E │\n" +
-                "│                              14°00′00″N │\n" +
                 "│ Coordinate reference system: WGS 84     │\n" +
                 "└─────────────────────────────────────────┘\n",
format.format(loc));
     }
@@ -80,11 +80,11 @@ public final strictfp class LocationForm
                 "┌────────────────────────────────────────────────────┐\n"
+
                 "│ Geographic identifier:       A location            │\n" +
                 "│ West bound:                    388,719 m           │\n" +
+                "│ Representative value:          500,000 m           │\n" +
                 "│ East bound:                    611,281 m           │\n" +
                 "│ South bound:                  -221,095 m           │\n" +
+                "│ Representative value:        1,549,056 m           │\n" +
                 "│ North bound:                 3,319,207 m           │\n" +
-                "│ Representative position:       500,000 m           │\n" +
-                "│                              1,549,056 m           │\n" +
                 "│ Coordinate reference system: WGS 84 / UTM zone 32N │\n" +
                 "└────────────────────────────────────────────────────┘\n",
format.format(loc));
     }
@@ -112,11 +112,11 @@ public final strictfp class LocationForm
                 "┌─────────────────────────────────────────────────────────────┐\n"
+
                 "│ Geographic identifier:       A location                     │\n" +
                 "│ West bound:                    388,719 m    —     8°00′00″E │\n"
+
+                "│ Representative value:          500,000 m    —     9°00′00″E │\n"
+
                 "│ East bound:                    611,281 m    —    10°00′00″E │\n"
+
                 "│ South bound:                  -221,095 m    —     2°00′00″S │\n"
+
+                "│ Representative value:        1,549,056 m    —    14°00′43″N │\n"
+
                 "│ North bound:                 3,319,207 m    —    30°00′00″N │\n"
+
-                "│ Representative position:       500,000 m    —     9°00′00″E │\n"
+
-                "│                              1,549,056 m    —    14°00′43″N │\n"
+
                 "│ Coordinate reference system: WGS 84 / UTM zone 32N          │\n" +
                 "└─────────────────────────────────────────────────────────────┘\n",
format.format(loc));
     }

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.java?rev=1785688&r1=1785687&r2=1785688&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.java
[UTF-8] Mon Mar  6 17:04:37 2017
@@ -582,9 +582,9 @@ public final class Vocabulary extends In
         public static final short RemoteConfiguration = 89;
 
         /**
-         * Representative position
+         * Representative value
          */
-        public static final short RepresentativePosition = 141;
+        public static final short RepresentativeValue = 141;
 
         /**
          * Root

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.properties
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.properties?rev=1785688&r1=1785687&r2=1785688&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.properties
[ISO-8859-1] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.properties
[ISO-8859-1] Mon Mar  6 17:04:37 2017
@@ -119,7 +119,7 @@ Quoted_1                = \u201c{0}\u201
 Read                    = Read
 Remarks                 = Remarks
 RemoteConfiguration     = Remote configuration
-RepresentativePosition  = Representative position
+RepresentativeValue     = Representative value
 Root                    = Root
 RootMeanSquare          = Root Mean Square
 Scale                   = Scale

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary_fr.properties
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary_fr.properties?rev=1785688&r1=1785687&r2=1785688&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary_fr.properties
[ISO-8859-1] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary_fr.properties
[ISO-8859-1] Mon Mar  6 17:04:37 2017
@@ -126,7 +126,7 @@ Quoted_1                = \u00ab\u202f{0
 Read                    = Lecture
 Remarks                 = Remarques
 RemoteConfiguration     = Configuration distante
-RepresentativePosition  = Position repr\u00e9sentative
+RepresentativeValue     = Valeur repr\u00e9sentative
 Root                    = Racine
 RootMeanSquare          = Moyenne quadratique
 Scale                   = \u00c9chelle



Mime
View raw message