Hello Chris
Le 21/12/12 03:29, Mattmann, Chris A (388J) a écrit :
Yep, I commented back -- I agree with your position. Let's not port those
coordinate transform methods.
Thanks. I will port the functionality of getNormLon(). I suggest a
"normalize()" method which normalize the coordinate as a whole
(longitude may not be the only cyclic coordinate).
On a related question about QuadTree, I wonder if the QuadTreeNode class
could be considered as internal mechanic? QuadTreeNode is used publicly
only be QuadTree.getRoot(), itself used only internally be
QuadTreeReader/QuadTreeWriter. Unless they are actually used by other
projects outside SIS, could we turn the following into package-private
elements?
* Method QuadTree.getRoot()
* Class QuadTreeNode
* Class Quadrant
The proposed patch is attached to this email.
Martin
Index: sis-referencing/src/main/java/org/apache/sis/storage/QuadTree.java
===================================================================
--- sis-referencing/src/main/java/org/apache/sis/storage/QuadTree.java
(révision 1424365)
+++ sis-referencing/src/main/java/org/apache/sis/storage/QuadTree.java (copie
de travail)
@@ -549,7 +549,7 @@ public class QuadTree {
*
* @return root node of the quad tree.
*/
- public QuadTreeNode getRoot() {
+ final QuadTreeNode getRoot() {
return this.root;
}
Index: sis-referencing/src/main/java/org/apache/sis/storage/QuadTreeNode.java
===================================================================
--- sis-referencing/src/main/java/org/apache/sis/storage/QuadTreeNode.java
(révision 1424365)
+++ sis-referencing/src/main/java/org/apache/sis/storage/QuadTreeNode.java
(copie de travail)
@@ -21,7 +21,7 @@ package org.apache.sis.storage;
* Implementation of quad tree node.
*
*/
-public class QuadTreeNode {
+final class QuadTreeNode {
private QuadTreeData[] data;
private QuadTreeNode nw;
Index: sis-referencing/src/main/java/org/apache/sis/storage/Quadrant.java
===================================================================
--- sis-referencing/src/main/java/org/apache/sis/storage/Quadrant.java
(révision 1424365)
+++ sis-referencing/src/main/java/org/apache/sis/storage/Quadrant.java (copie
de travail)
@@ -21,7 +21,7 @@ package org.apache.sis.storage;
* Enum to represent the 4 quadrants of a quad tree node.
*
*/
-public enum Quadrant {
+enum Quadrant {
NW(0), NE(1), SW(2), SE(3);
private final int index;