sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1771315 - in /sis/branches/JDK8/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff: CRSBuilder.java ImageFileDirectory.java Reader.java Tags.java TiffCRSBuilder.java
Date Fri, 25 Nov 2016 13:55:57 GMT
Author: desruisseaux
Date: Fri Nov 25 13:55:56 2016
New Revision: 1771315

URL: http://svn.apache.org/viewvc?rev=1771315&view=rev
Log:
Renaming (no significant code change yet).

Added:
    sis/branches/JDK8/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/CRSBuilder.java
      - copied, changed from r1771314, sis/branches/JDK8/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/TiffCRSBuilder.java
Removed:
    sis/branches/JDK8/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/TiffCRSBuilder.java
Modified:
    sis/branches/JDK8/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/ImageFileDirectory.java
    sis/branches/JDK8/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/Reader.java
    sis/branches/JDK8/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/Tags.java

Copied: sis/branches/JDK8/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/CRSBuilder.java
(from r1771314, sis/branches/JDK8/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/TiffCRSBuilder.java)
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/CRSBuilder.java?p2=sis/branches/JDK8/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/CRSBuilder.java&p1=sis/branches/JDK8/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/TiffCRSBuilder.java&r1=1771314&r2=1771315&rev=1771315&view=diff
==============================================================================
--- sis/branches/JDK8/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/TiffCRSBuilder.java
[UTF-8] (original)
+++ sis/branches/JDK8/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/CRSBuilder.java
[UTF-8] Fri Nov 25 13:55:56 2016
@@ -72,16 +72,16 @@ import org.opengis.referencing.cs.Coordi
 /**
  * Build a {@link CoordinateReferenceSystem} from Tiff tags informations.<br>
  * More precisely we have to parse 3 Tiff tags which are<br>
- * GeoKeyDirectoryTag(34735),<br>
- * GeoDoubleParamsTag(34736),<br>
- * GeoAsciiParamsTag(34737).<br><br>
+ * GeoKeyDirectory(34735),<br>
+ * GeoDoubleParams(34736),<br>
+ * GeoAsciiParams(34737).<br><br>
  *
  * Forexample, for each tag data content are organize as follow :<br><br>
  *
  * Example:<br>
  * <table summary="GeoKeys">
  *    <tr>
- *       <td>GeoKeyDirectoryTag=( </td>
+ *       <td>GeoKeyDirectory=( </td>
  *       <td> 1,</td>
  *       <td> 1,</td>
  *       <td> 2,</td>
@@ -130,18 +130,18 @@ import org.opengis.referencing.cs.Coordi
  *       <td> 0)</td>
  *    </tr>
  * </table>
- * GeoDoubleParamsTag(34736)=(1.5)<br>
- * GeoAsciiParamsTag(34737)=("Custom File|My Geographic|")<br><br>
+ * GeoDoubleParams(34736)=(1.5)<br>
+ * GeoAsciiParams(34737)=("Custom File|My Geographic|")<br><br>
  *
  * The first line indicates that this is a Version 1 GeoTIFF GeoKey directory,
  * the keys are Rev. 1.2, and there are 6 Keys defined in this tag.<br>
  *
  * The next line indicates that the first Key (ID=1024 = GTModelTypeGeoKey) has the value
2 (Geographic),
  * explicitly placed in the entry list (since TIFFTagLocation=0).<br><br>
- * The next line indicates that the Key 1026 (the GTCitationGeoKey) is listed in the GeoAsciiParamsTag
(34737) array,
+ * The next line indicates that the Key 1026 (the GTCitationGeoKey) is listed in the GeoAsciiParams
(34737) array,
  * starting at offset 0 (the first in array), and running for 12 bytes and so has the value
  * "Custom File" (the "|" is converted to a null delimiter at the end). <br><br>
- * Going further down the list, the Key 2051 (GeogLinearUnitSizeGeoKey) is located in the
GeoDoubleParamsTag (34736),
+ * Going further down the list, the Key 2051 (GeogLinearUnitSizeGeoKey) is located in the
GeoDoubleParams (34736),
  * at offset 0 and has the value 1.5; the value of key 2049 (GeogCitationGeoKey) is "My Geographic".
  *
  * @author Remi Marechal (Geomatys).
@@ -150,7 +150,7 @@ import org.opengis.referencing.cs.Coordi
  * @module
  * @see GeoKeys
  */
-public class TiffCRSBuilder {
+final class CRSBuilder {
 
     /**
      * Factory to build needed Datum from other precedently objects.
@@ -185,12 +185,12 @@ public class TiffCRSBuilder {
     private Vector geoKeyDirectoryTag = null;
 
     /**
-     * This tag is used to store all of the DOUBLE valued GeoKeys, referenced by the GeoKeyDirectoryTag.
+     * This tag is used to store all of the DOUBLE valued GeoKeys, referenced by the GeoKeyDirectory.
      */
     private Vector geoDoubleParamsTag = null;
 
     /**
-     * This tag is used to store all of the ASCII valued GeoKeys, referenced by the GeoKeyDirectoryTag.
+     * This tag is used to store all of the ASCII valued GeoKeys, referenced by the GeoKeyDirectory.
      */
     private String geoAsciiParamsTag = null;
 
@@ -205,7 +205,7 @@ public class TiffCRSBuilder {
     private short numberOfKey;
     private int geoKeyDirectorySize;
 
-    TiffCRSBuilder(final Reader reader) {
+    CRSBuilder(final Reader reader) {
         this.reader = reader;
     }
 
@@ -318,10 +318,10 @@ public class TiffCRSBuilder {
      * Parse and store "geoKey" and its content into internal {@link #geoKeys}.
      *
      * @param KeyID geokey Id
-     * @param tiffTagLocation 0 if offset is the data, or one of GeoDoubleParamsTag or GeoAsciiParamsTag.
+     * @param tiffTagLocation 0 if offset is the data, or one of GeoDoubleParams or GeoAsciiParams.
      * @param count 1 if offset is data or n if data store into another geokey.
      * @param value_Offset data or offset if into another geokey.
-     * @see TiffCRSBuilder
+     * @see CRSBuilder
      */
     private void setKey(final int KeyID, final int tiffTagLocation, final int count, final
int value_Offset) {
         if (tiffTagLocation == 0) {
@@ -331,12 +331,12 @@ public class TiffCRSBuilder {
             geoKeys.put(KeyID, value_Offset);
         } else {
             switch (tiffTagLocation) {
-                case Tags.GeoDoubleParamsTag : {
+                case Tags.GeoDoubleParams : {
                     assert count == 1;
                     geoKeys.put(KeyID, geoDoubleParamsTag.doubleValue(value_Offset));
                     break;
                 }
-                case Tags.GeoAsciiParamsTag : {
+                case Tags.GeoAsciiParams : {
                     geoKeys.put(KeyID, geoAsciiParamsTag.substring(value_Offset, value_Offset
+ count));
                     break;
                 }
@@ -1138,7 +1138,7 @@ public class TiffCRSBuilder {
     }
 
     /**
-     * Set contents of previously read {@link Tags#GeoDoubleParamsTag}.
+     * Set contents of previously read {@link Tags#GeoDoubleParams}.
      * Contents is about Geographic keys, more precisely double value, scale, offset etc,
      * needed to build appropriate {@link CoordinateReferenceSystem}.
      *
@@ -1149,7 +1149,7 @@ public class TiffCRSBuilder {
     }
 
     /**
-     * Set contents of previously read {@link Tags#GeoAsciiParamsTag}.
+     * Set contents of previously read {@link Tags#GeoAsciiParams}.
      * Contents is about Geographic keys, more precisely name, identifier etc,
      * needed to build appropriate {@link CoordinateReferenceSystem}.
      *

Modified: sis/branches/JDK8/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/ImageFileDirectory.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/ImageFileDirectory.java?rev=1771315&r1=1771314&r2=1771315&view=diff
==============================================================================
--- sis/branches/JDK8/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/ImageFileDirectory.java
[UTF-8] (original)
+++ sis/branches/JDK8/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/ImageFileDirectory.java
[UTF-8] Fri Nov 25 13:55:56 2016
@@ -587,21 +587,21 @@ final class ImageFileDirectory {
              * An array of unsigned SHORT values, which are primarily grouped into blocks
of 4.
              * The first 4 values are special, and contain GeoKey directory header information.
              */
-            case Tags.GeoKeyDirectoryTag : {
+            case Tags.GeoKeyDirectory : {
                 reader.crsBuilder.setGeoKeyDirectoryTag(type.readVector(input(), count));
                 break;
             }
             /*
-             * This tag is used to store all of the DOUBLE valued GeoKeys, referenced by
the GeoKeyDirectoryTag.
+             * This tag is used to store all of the DOUBLE valued GeoKeys, referenced by
the GeoKeyDirectory.
              */
-            case Tags.GeoDoubleParamsTag : {
+            case Tags.GeoDoubleParams : {
                 reader.crsBuilder.setGeoDoubleParamsTag(type.readVector(input(), count));
                 break;
             }
             /*
-             * This tag is used to store all of the ASCII valued GeoKeys, referenced by the
GeoKeyDirectoryTag.
+             * This tag is used to store all of the ASCII valued GeoKeys, referenced by the
GeoKeyDirectory.
              */
-            case Tags.GeoAsciiParamsTag : {
+            case Tags.GeoAsciiParams : {
                 final String[] values = type.readString(input(), count, encoding());
                 reader.crsBuilder.setGeoAsciiParamsTag(values[0]);      // TODO: should pass
the full array.
                 break;

Modified: sis/branches/JDK8/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/Reader.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/Reader.java?rev=1771315&r1=1771314&r2=1771315&view=diff
==============================================================================
--- sis/branches/JDK8/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/Reader.java
[UTF-8] (original)
+++ sis/branches/JDK8/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/Reader.java
[UTF-8] Fri Nov 25 13:55:56 2016
@@ -115,7 +115,7 @@ final class Reader extends GeoTIFF {
      * @todo should not be here since we can have a CRS for each image and we don't want
to merge them
      *       like we do for metadata.
      */
-    final TiffCRSBuilder crsBuilder;
+    final CRSBuilder crsBuilder;
 
     /**
      * Creates a new GeoTIFF reader which will read data from the given input.
@@ -129,7 +129,7 @@ final class Reader extends GeoTIFF {
         this.input      = input;
         this.origin     = input.getStreamPosition();
         this.metadata   = new MetadataBuilder();
-        this.crsBuilder = new TiffCRSBuilder(this);
+        this.crsBuilder = new CRSBuilder(this);
         /*
          * A TIFF file begins with either "II" (0x4949) or "MM" (0x4D4D) characters.
          * Those characters identify the byte order. Note that we do not need to care

Modified: sis/branches/JDK8/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/Tags.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/Tags.java?rev=1771315&r1=1771314&r2=1771315&view=diff
==============================================================================
--- sis/branches/JDK8/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/Tags.java
[UTF-8] (original)
+++ sis/branches/JDK8/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/Tags.java
[UTF-8] Fri Nov 25 13:55:56 2016
@@ -20,7 +20,8 @@ import java.lang.reflect.Field;
 
 
 /**
- * Numerical values of GeoTIFF tags. In this class, field names are identical to TIFF tag
names.
+ * Numerical values of GeoTIFF tags, as <strong>unsigned</strong> short integers.
+ * In this class, field names are identical to TIFF tag names.
  * For that reason, many of those field names do not follow usual Java convention for constants.
  *
  * <p>A useful (but unofficial) reference is the
@@ -143,21 +144,21 @@ final class Tags {
      * GeoTIFF keys are stored in a kind of directory inside the TIFF directory, with
      * the keys enumerated in the {@link GeoTIFF} class.
      *
-     * @todo omit the "Tag" suffix since this class is all about tags.
+     * @see GeoKeys
      */
-    public static final short GeoKeyDirectoryTag = (short) 0x87AF;        // 34735
+    public static final short GeoKeyDirectory = (short) 0x87AF;           // 34735
 
     /**
      * References all {@code double} values referenced by the {@link GeoKeys}.
-     * The keys are stored in the entry referenced by {@link #GeoKeyDirectoryTag}.
+     * The keys are stored in the entry referenced by {@link #GeoKeyDirectory}.
      */
-    public static final short GeoDoubleParamsTag = (short) 0x87B0;        // 34736
+    public static final short GeoDoubleParams = (short) 0x87B0;           // 34736
 
     /**
      * References all {@link String} values referenced by the {@link GeoKeys}.
-     * The keys are stored in the entry referenced by {@link #GeoKeyDirectoryTag}.
+     * The keys are stored in the entry referenced by {@link #GeoKeyDirectory}.
      */
-    public static final short GeoAsciiParamsTag = (short) 0x87B1;         // 34737
+    public static final short GeoAsciiParams = (short) 0x87B1;            // 34737
 
     /**
      * Do not allow instantiation of this class.



Mime
View raw message