sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1757018 - in /sis/branches/JDK8/storage/sis-earth-observation/src: main/java/org/apache/sis/storage/earthobservation/ main/java/org/apache/sis/storage/earthobservation/doc-files/ test/java/org/apache/sis/storage/earthobservation/ test/reso...
Date Sat, 20 Aug 2016 18:18:19 GMT
Author: desruisseaux
Date: Sat Aug 20 18:18:19 2016
New Revision: 1757018

URL: http://svn.apache.org/viewvc?rev=1757018&view=rev
Log:
Make the doc-files/LandsatMetadata.html documentation and the LandsatReader.java implementation
in agreement.

Modified:
    sis/branches/JDK8/storage/sis-earth-observation/src/main/java/org/apache/sis/storage/earthobservation/LandsatReader.java
    sis/branches/JDK8/storage/sis-earth-observation/src/main/java/org/apache/sis/storage/earthobservation/doc-files/LandsatMetadata.html
    sis/branches/JDK8/storage/sis-earth-observation/src/test/java/org/apache/sis/storage/earthobservation/LandsatReaderTest.java
    sis/branches/JDK8/storage/sis-earth-observation/src/test/resources/org/apache/sis/storage/earthobservation/LandsatTest.txt

Modified: sis/branches/JDK8/storage/sis-earth-observation/src/main/java/org/apache/sis/storage/earthobservation/LandsatReader.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/storage/sis-earth-observation/src/main/java/org/apache/sis/storage/earthobservation/LandsatReader.java?rev=1757018&r1=1757017&r2=1757018&view=diff
==============================================================================
--- sis/branches/JDK8/storage/sis-earth-observation/src/main/java/org/apache/sis/storage/earthobservation/LandsatReader.java
[UTF-8] (original)
+++ sis/branches/JDK8/storage/sis-earth-observation/src/main/java/org/apache/sis/storage/earthobservation/LandsatReader.java
[UTF-8] Sat Aug 20 18:18:19 2016
@@ -33,7 +33,6 @@ import org.opengis.metadata.acquisition.
 import org.opengis.metadata.citation.DateType;
 import org.opengis.metadata.content.CoverageContentType;
 import org.opengis.metadata.content.ImageDescription;
-import org.opengis.metadata.distribution.Distribution;
 import org.opengis.metadata.extent.Extent;
 import org.opengis.metadata.identification.Identification;
 import org.opengis.metadata.identification.Progress;
@@ -41,28 +40,25 @@ import org.opengis.metadata.maintenance.
 
 import org.apache.sis.metadata.iso.DefaultIdentifier;
 import org.apache.sis.metadata.iso.DefaultMetadata;
+import org.apache.sis.metadata.iso.DefaultMetadataScope;
 import org.apache.sis.metadata.iso.acquisition.DefaultAcquisitionInformation;
 import org.apache.sis.metadata.iso.acquisition.DefaultEvent;
 import org.apache.sis.metadata.iso.acquisition.DefaultInstrument;
 import org.apache.sis.metadata.iso.acquisition.DefaultOperation;
 import org.apache.sis.metadata.iso.acquisition.DefaultPlatform;
 import org.apache.sis.metadata.iso.citation.Citations;
-import org.apache.sis.metadata.iso.citation.AbstractParty;
 import org.apache.sis.metadata.iso.citation.DefaultCitation;
 import org.apache.sis.metadata.iso.citation.DefaultCitationDate;
-import org.apache.sis.metadata.iso.citation.DefaultResponsibility;
 import org.apache.sis.metadata.iso.content.DefaultAttributeGroup;
 import org.apache.sis.metadata.iso.content.DefaultBand;
 import org.apache.sis.metadata.iso.content.DefaultImageDescription;
 import org.apache.sis.metadata.iso.distribution.DefaultFormat;
-import org.apache.sis.metadata.iso.distribution.DefaultDistribution;
 import org.apache.sis.metadata.iso.extent.DefaultExtent;
 import org.apache.sis.metadata.iso.extent.DefaultGeographicBoundingBox;
 import org.apache.sis.metadata.iso.extent.DefaultTemporalExtent;
 import org.apache.sis.metadata.iso.identification.DefaultDataIdentification;
-import org.apache.sis.metadata.iso.identification.DefaultAggregateInformation;
 import org.apache.sis.storage.DataStoreException;
-import org.apache.sis.util.iso.DefaultInternationalString;
+import org.apache.sis.util.iso.SimpleInternationalString;
 import org.apache.sis.util.logging.WarningListeners;
 
 import static java.util.Collections.singleton;
@@ -74,11 +70,18 @@ import java.time.OffsetDateTime;
 import java.time.OffsetTime;
 import java.time.format.DateTimeParseException;
 import java.time.temporal.ChronoField;
+import org.opengis.metadata.acquisition.Context;
 import org.opengis.metadata.content.AttributeGroup;
 
 
 /**
  * Parses Landsat metadata as {@linkplain DefaultMetadata ISO-19115 Metadata} object.
+ * This class reads the content of a given {@link BufferedReader} from buffer position
+ * until the first occurrence of the {@code END} keyword. Lines beginning with the
+ * {@code #} character (ignoring spaces) are treated as comment lines and ignored.
+ *
+ * <p><b>NOTE FOR MAINTAINER:</b> if the work performed by this class is
modified, consider updating
+ * <a href="./doc-files/LandsatMetadata.html">./doc-files/LandsatMetadata.html</a>
accordingly.</p>
  *
  * @author  Thi Phuong Hao Nguyen (VNSC)
  * @author  Remi Marechal (Geomatys)
@@ -91,7 +94,7 @@ public class LandsatReader {
      * The description of all bands that can be included in a Landsat coverage.
      * This description is hard-coded and shared by all metadata instances.
      *
-     * @todo Move those information in a database.
+     * @todo Move those information in a database after we implemented the {@code org.apache.sis.metadata.sql}
package.
      */
     private static final AttributeGroup BANDS;
     static {
@@ -113,7 +116,7 @@ public class LandsatReader {
         final Unit<Length> nm = SI.MetricPrefix.NANO(SI.METRE);
         for (int i = 0; i < bands.length; i++) {
             final DefaultBand band = new DefaultBand();
-            band.setDescription(new DefaultInternationalString(nameband[i]));
+            band.setDescription(new SimpleInternationalString(nameband[i]));
             band.setPeakResponse(wavelengths[i]);
             band.setBoundUnits(nm);
             bands[i] = band;
@@ -147,6 +150,7 @@ public class LandsatReader {
 
     /**
      * Creates a new metadata parser from the given characters reader.
+     * See class javadoc for more information on the expected format.
      *
      * @param  reader  a reader opened on the Landsat file.
      *         It is caller's responsibility to close this reader.
@@ -337,7 +341,7 @@ public class LandsatReader {
             throw new DataStoreException("Can not read the geographic bounding box.", e);
         }
         final DefaultExtent extent = new DefaultExtent();
-        final boolean isEmpty = box.isEmpty();
+        boolean isEmpty = box.isEmpty();
         if (!isEmpty) {
             extent.setGeographicElements(singleton(box));
         }
@@ -346,15 +350,13 @@ public class LandsatReader {
                 final DefaultTemporalExtent t = new DefaultTemporalExtent();
                 t.setBounds(sceneTime, sceneTime);
                 extent.setTemporalElements(singleton(t));
+                isEmpty = false;                            // Set only after the above succeed.
             } catch (UnsupportedOperationException e) {
                 // May happen if the temporal module (which is optional) is not on the classpath.
                 warning(e);
-                if (isEmpty) {
-                    return null;
-                }
             }
         }
-        return extent;
+        return isEmpty ? null : extent;
     }
 
     /**
@@ -385,6 +387,7 @@ public class LandsatReader {
         }
         if (sceneTime != null) {
             final DefaultEvent event = new DefaultEvent();
+            event.setContext(Context.ACQUISITION);
             event.setTime(sceneTime);
             final DefaultOperation op = new DefaultOperation();
             op.setSignificantEvents(singleton(event));
@@ -397,20 +400,6 @@ public class LandsatReader {
     }
 
     /**
-     * Get basic Information about the distributor of and options for obtaining the resource.
-     *
-     * @return the data distributor information, or {@code null} if none.
-     */
-    private Distribution createDistribution() {
-        DefaultDistribution distribution = new DefaultDistribution();
-        DefaultFormat format = new DefaultFormat();
-        String value = getValue(OUTPUT_FORMAT);
-        format.setName(new DefaultInternationalString(value));
-        distribution.setDistributionFormats(singleton(format));
-        return distribution;
-    }
-
-    /**
      * Gets basic information required to uniquely identify the data, or {@code null} if
none.
      * This method expects the metadata and data acquisition time in argument in order to
avoid
      * to compute them twice.
@@ -420,17 +409,17 @@ public class LandsatReader {
      * @return the data identification information, or {@code null} if none.
      * @throws DataStoreException if a property value can not be parsed as a number or a
date.
      */
-    private Identification createIdentification(final Date metadataTime, final Date sceneTime)
throws DataStoreException {
+    private Identification createIdentification(final DefaultCitationDate metadataTime, final
Date sceneTime) throws DataStoreException {
         final DefaultDataIdentification identification = new DefaultDataIdentification();
         final DefaultCitation citation = new DefaultCitation();
         boolean isEmpty = true;
         if (metadataTime != null) {
-            citation.setDates(singleton(new DefaultCitationDate(metadataTime, DateType.PUBLICATION)));
+            citation.setDates(singleton(metadataTime));
             isEmpty = false;
         }
         String value = getValue(LANDSAT_SCENE_ID);
         if (value != null) {
-            citation.setTitle(new DefaultInternationalString(value + ".tar.gz"));
+            citation.setIdentifiers(singleton(new DefaultIdentifier(value)));
             isEmpty = false;
         }
         if (!isEmpty) {
@@ -443,20 +432,12 @@ public class LandsatReader {
         }
         value = getValue(ORIGIN);
         if (value != null) {
-            DefaultResponsibility responsibility = new DefaultResponsibility();
-            AbstractParty party = new AbstractParty();
-            party.setName(new DefaultInternationalString(value));
-            responsibility.getParties().add(party);
-            citation.getCitedResponsibleParties().add(responsibility);
+            identification.setCredits(singleton(new SimpleInternationalString(value)));
             isEmpty = false;
         }
-        value = getValue(ORIGIN);
+        value = getValue(OUTPUT_FORMAT);
         if (value != null) {
-            DefaultCitation citation1 = new DefaultCitation();
-            DefaultAggregateInformation aggregateInformation = new DefaultAggregateInformation();
-            citation1.setTitle(new DefaultInternationalString(value));
-            aggregateInformation.setAggregateDataSetName(citation1);
-            identification.setAggregationInfo(singleton(aggregateInformation));
+            identification.setResourceFormats(singleton(new DefaultFormat(value, null)));
             isEmpty = false;
         }
         return isEmpty ? null : identification;
@@ -471,14 +452,14 @@ public class LandsatReader {
     public Metadata read() throws DataStoreException {
         final DefaultMetadata metadata = new DefaultMetadata();
         metadata.setMetadataStandards(Citations.ISO_19115);
-        final Date metadataTime = getDate(FILE_DATE);
-        if (metadataTime != null) {
-            metadata.setDateInfo(singleton(new DefaultCitationDate(metadataTime, DateType.CREATION)));
+        final Date fileDate = getDate(FILE_DATE);
+        DefaultCitationDate metadataTime = null;
+        if (fileDate != null) {
+            metadataTime = new DefaultCitationDate(fileDate, DateType.CREATION);
+            metadata.setDateInfo(singleton(metadataTime));
         }
-        metadata.setLanguage(Locale.ENGLISH);
-        metadata.setFileIdentifier(getValue(LANDSAT_SCENE_ID));
-        final Distribution metadataDistribution = createDistribution();
-        metadata.setDistributionInfo(singleton(metadataDistribution));
+        metadata.setLanguages(singleton(Locale.ENGLISH));
+        metadata.setMetadataIdentifier(new DefaultIdentifier(getValue(LANDSAT_SCENE_ID)));
         final Date sceneTime = getDate(DATE_ACQUIRED, SCENE_CENTER_TIME);
         final Identification identification = createIdentification(metadataTime, sceneTime);
         if (identification != null) {
@@ -492,9 +473,7 @@ public class LandsatReader {
         if (acquisition != null) {
             metadata.setAcquisitionInformation(singleton(acquisition));
         }
-        if (getValue(DATA_TYPE) != null) {
-            metadata.setHierarchyLevels(singleton(ScopeCode.METADATA));
-        }
+        metadata.setMetadataScopes(singleton(new DefaultMetadataScope(ScopeCode.DATASET,
null)));
         return metadata;
     }
 

Modified: sis/branches/JDK8/storage/sis-earth-observation/src/main/java/org/apache/sis/storage/earthobservation/doc-files/LandsatMetadata.html
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/storage/sis-earth-observation/src/main/java/org/apache/sis/storage/earthobservation/doc-files/LandsatMetadata.html?rev=1757018&r1=1757017&r2=1757018&view=diff
==============================================================================
--- sis/branches/JDK8/storage/sis-earth-observation/src/main/java/org/apache/sis/storage/earthobservation/doc-files/LandsatMetadata.html
(original)
+++ sis/branches/JDK8/storage/sis-earth-observation/src/main/java/org/apache/sis/storage/earthobservation/doc-files/LandsatMetadata.html
Sat Aug 20 18:18:19 2016
@@ -84,8 +84,8 @@
       so the value is hard-coded in the <code>LandsatReader</code> class.
     </p>
     <p>
-      In the following table, black values in the Landsat column are hard-coded values inferred
from table 2-1:
-      <cite>Band Reference Table</cite> in the Landsat Data Format Control Book
(DFCB).
+      In the following table, black values in the "Landsat property" column are hard-coded
values.
+      Some of them are inferred from table 2-1: <cite>Band Reference Table</cite>
in the Landsat Data Format Control Book (DFCB).
       Green values are values to be read and interpreted as described in table 3-4: <cite>L1Gt
/ L1T Metadata File</cite>.
       Values in the ISO 19115 column shown the paths to an ISO property relative to the <code>Metadata</code>
root.
       When an ISO property can accept various subtypes, the type used are those listed below:
@@ -106,24 +106,26 @@
       <tr>
         <th>ISO 19115 property</th>
         <th>Landsat property</th>
-        <th>Description</th>
+        <th>Description or comment</th>
       </tr>
       <tr><td colspan="3" style="padding-top: 9px">Metadata</td></tr>
+      <tr><td><code>  ├─</code>Language</td>
                             <td>English</td>                                
     <td></td></tr>
       <tr><td><code>  ├─</code>Identification info</td>
                  <td></td>                                             <td></td></tr>
       <tr><td><code>  │   ├─</code>Citation</td>
                         <td></td>                                           
 <td></td></tr>
       <tr><td><code>  │   │   ├─</code>Date:</td>
                        <td><code class="rf">FILE_DATE</code></td>
           <td>The date when metadata file product set was created.</td></tr>
-      <tr><td><code>  │   │   │   └─</code>Date
type:</td>                <td>Publication</td>                         
        <td></td></tr>
+      <tr><td><code>  │   │   │   └─</code>Date
type:</td>                <td>Creation</td>                            
        <td>Hard-coded ISO 19115 value to be set only if above date exists.</td></tr>
       <tr><td><code>  │   │   └─</code>Identifier:</td>
                  <td><code class="rf">LANDSAT_SCENE_ID</code></td>
    <td>The unique Landsat scene identifier.</td></tr>
       <tr><td><code>  │   ├─</code>Credit:</td>
                          <td><code class="rf">ORIGIN</code></td>
              <td>Recognition of those who contributed to the resources.</td></tr>
       <tr><td><code>  │   ├─</code>Resource
format</td>                   <td></td>                                
            <td></td></tr>
       <tr><td><code>  │   │   └─</code>Format
specification citation</td> <td></td>                                  
          <td></td></tr>
-      <tr><td><code>  │   │       └─</code>Title:</td>
                   <td><code class="rf">OUTPUT_FORMAT</code></td>
       <td>The name of the data transfer format.</td></tr>
+      <tr><td><code>  │   │       ├─</code>Title:</td>
                   <td></td>                                             <td>Long
name inferred from <code>OUTPUT_FORMAT</code> if possible.</td></tr>
+      <tr><td><code>  │   │       └─</code>Alternate
title:</td>          <td><code class="rf">OUTPUT_FORMAT</code></td>
       <td>The name of the data transfer format, considered as an abbreviation.</td></tr>
       <tr><td><code>  │   └─</code>Extent</td>
                           <td></td>                                         
   <td></td></tr>
       <tr><td><code>  │       ├─</code>Geographic
element</td>            <td></td>                                      
      <td></td></tr>
-      <tr><td><code>  │       │   ├─</code>West
bound longitude:</td>     <td><code>min(<span class="rf">CORNER_UL_LON_PRODUCT</span>,
<span class="rf">CORNER_LL_LON_PRODUCT</span>)</code></td> <td>The
western-most longitude value in degrees.</td></tr>
-      <tr><td><code>  │       │   ├─</code>East
bound longitude:</td>     <td><code>max(<span class="rf">CORNER_UR_LON_PRODUCT</span>,
<span class="rf">CORNER_LR_LON_PRODUCT</span>)</code></td> <td>The
eastern-most longitude value in degrees.</td></tr>
-      <tr><td><code>  │       │   ├─</code>South
bound latitude:</td>     <td><code>min(<span class="rf">CORNER_LL_LAT_PRODUCT</span>,
<span class="rf">CORNER_LR_LAT_PRODUCT</span>)</code></td> <td>The
southern-most longitude value in degrees.</td></tr>
-      <tr><td><code>  │       │   ├─</code>North
bound latitude:</td>     <td><code>max(<span class="rf">CORNER_UL_LAT_PRODUCT</span>,
<span class="rf">CORNER_UR_LAT_PRODUCT</span>)</code></td> <td>The
northern-most longitude value in degrees.</td></tr>
+      <tr><td><code>  │       │   ├─</code>West
bound longitude:</td>     <td><code>min(<span class="rf">CORNER_*_LON_PRODUCT</span>)</code></td>
<td>The western-most longitude value in degrees (approximative).</td></tr>
+      <tr><td><code>  │       │   ├─</code>East
bound longitude:</td>     <td><code>max(<span class="rf">CORNER_*_LON_PRODUCT</span>)</code></td>
<td>The eastern-most longitude value in degrees (approximative).</td></tr>
+      <tr><td><code>  │       │   ├─</code>South
bound latitude:</td>     <td><code>min(<span class="rf">CORNER_*_LAT_PRODUCT</span>)</code></td>
<td>The southern-most longitude value in degrees (approximative).</td></tr>
+      <tr><td><code>  │       │   ├─</code>North
bound latitude:</td>     <td><code>max(<span class="rf">CORNER_*_LAT_PRODUCT</span>)</code></td>
<td>The northern-most longitude value in degrees (approximative).</td></tr>
       <tr><td><code>  │       │   └─</code>Extent
type code:</td>         <td>true</td>                                  
      <td></td></tr>
       <tr><td><code>  │       └─</code>Temporal
element</td>              <td></td>                                    
        <td></td></tr>
       <tr><td><code>  │           └─</code>Start
time:</td>               <td><code><span class="rf">DATE_ACQUIRED</span>
+ <span class="rf">SCENE_CENTER_TIME</span></code></td> <td>The
date and center time the image was acquired.</td></tr>
@@ -179,7 +181,7 @@
       <tr><td><code>  │           └─</code>Description:</td>
             <td>TIRS 2</td>                                       <td></td></tr>
       <tr><td><code>  ├─</code>Acquisition information</td>
              <td></td>                                             <td></td></tr>
       <tr><td><code>  │   ├─</code>Operation</td>
                        <td></td>                                            
<td></td></tr>
-      <tr><td><code>  │   │   ├─</code>Progress:</td>
                    <td>Completed</td>                                    <td>Status
of the data acquisition.</td></tr>
+      <tr><td><code>  │   │   ├─</code>Status:</td>
                      <td>Completed</td>                                    <td>Status
of the data acquisition.</td></tr>
       <tr><td><code>  │   │   ├─</code>Type:</td>
                        <td>Real</td>                                        
<td>Collection technique for the operation.</td></tr>
       <tr><td><code>  │   │   └─</code>Significant
event</td>             <td></td>                                       
     <td></td></tr>
       <tr><td><code>  │   │       ├─</code>Context:</td>
                 <td>Acquisition</td>                                  <td>Meaning
of the event.</td></tr>

Modified: sis/branches/JDK8/storage/sis-earth-observation/src/test/java/org/apache/sis/storage/earthobservation/LandsatReaderTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/storage/sis-earth-observation/src/test/java/org/apache/sis/storage/earthobservation/LandsatReaderTest.java?rev=1757018&r1=1757017&r2=1757018&view=diff
==============================================================================
--- sis/branches/JDK8/storage/sis-earth-observation/src/test/java/org/apache/sis/storage/earthobservation/LandsatReaderTest.java
[UTF-8] (original)
+++ sis/branches/JDK8/storage/sis-earth-observation/src/test/java/org/apache/sis/storage/earthobservation/LandsatReaderTest.java
[UTF-8] Sat Aug 20 18:18:19 2016
@@ -41,13 +41,18 @@ public class LandsatReaderTest extends T
     /**
      * Tests {@link LandsatReader#read()}.
      *
+     * <p><b>NOTE FOR MAINTAINER:</b> if the result of this test changes,
consider updating
+     * <a href="./doc-files/LandsatMetadata.html">./doc-files/LandsatMetadata.html</a>
accordingly.</p>
+     *
      * @throws IOException if an error occurred while reading the test file.
      * @throws DataStoreException if a property value can not be parsed as a number or a
date.
      */
     @Test
     public void testRead() throws IOException, DataStoreException {
         final Metadata actual;
-        try (BufferedReader in = new BufferedReader(new InputStreamReader(LandsatReaderTest.class.getResourceAsStream("LandsatTest.txt"),
"UTF-8"))) {
+        try (BufferedReader in = new BufferedReader(new InputStreamReader(
+                LandsatReaderTest.class.getResourceAsStream("LandsatTest.txt"), "UTF-8")))
+        {
             actual = new LandsatReader(in).read();
         }
         final String text = formatNameAndValue(DefaultMetadata.castOrCopy(actual).asTreeTable());
@@ -56,23 +61,23 @@ public class LandsatReaderTest extends T
                 + "  ├─Language……………………………………………………………………………
en\n"
                 + "  ├─Identification info\n"
                 + "  │   ├─Citation\n"
-                + "  │   │   ├─Title………………………………………………………………
TestImage.tar.gz\n"
                 + "  │   │   ├─Date\n"
                 + "  │   │   │   ├─Date………………………………………………………
2016-06-27 16:48:12\n"
-                + "  │   │   │   └─Date type…………………………………………
Publication\n"
-                + "  │   │   └─Cited responsible party\n"
-                + "  │   │       └─Party\n"
-                + "  │   │           └─Name……………………………………………
Test file\n"
-                + "  │   ├─Extent\n"
-                + "  │   │   └─Geographic element\n"
-                + "  │   │       ├─West bound longitude……………
108°20′24″E\n"
-                + "  │   │       ├─East bound longitude……………
110°26′24″E\n"
-                + "  │   │       ├─South bound latitude……………
10°30′N\n"
-                + "  │   │       ├─North bound latitude……………
12°37′12″N\n"
-                + "  │   │       └─Extent type code………………………
true\n"
-                + "  │   └─Associated resource\n"
-                + "  │       └─Name\n"
-                + "  │           └─Title……………………………………………………
Test file\n"
+                + "  │   │   │   └─Date type…………………………………………
Creation\n"
+                + "  │   │   └─Identifier\n"
+                + "  │   │       └─Code………………………………………………………
LandsatTest\n"
+                + "  │   ├─Credit………………………………………………………………………
Derived from U.S. Geological Survey data\n"
+                + "  │   ├─Resource format\n"
+                + "  │   │   └─Format specification citation\n"
+                + "  │   │       ├─Title……………………………………………………
GeoTIFF Coverage Encoding Profile\n"
+                + "  │   │       └─Alternate title…………………………
GEOTIFF\n"
+                + "  │   └─Extent\n"
+                + "  │       └─Geographic element\n"
+                + "  │           ├─West bound longitude……………
108°20′24″E\n"
+                + "  │           ├─East bound longitude……………
110°26′24″E\n"
+                + "  │           ├─South bound latitude……………
10°30′N\n"
+                + "  │           ├─North bound latitude……………
12°37′12″N\n"
+                + "  │           └─Extent type code………………………
true\n"
                 + "  ├─Content info\n"
                 + "  │   ├─Illumination elevation angle…………… 58.8\n"
                 + "  │   ├─Illumination azimuth angle………………… 116.9\n"
@@ -123,29 +128,26 @@ public class LandsatReaderTest extends T
                 + "  │           ├─Peak response………………………………
12000.0\n"
                 + "  │           ├─Bound units……………………………………
nm\n"
                 + "  │           └─Description……………………………………
Thermal Infrared Sensor (TIRS) 2\n"
-                + "  ├─Distribution info\n"
-                + "  │   └─Distribution format\n"
-                + "  │       └─Format specification citation\n"
-                + "  │           └─Alternate title…………………………
GEOTIFF\n"
                 + "  ├─Acquisition information\n"
                 + "  │   ├─Operation\n"
                 + "  │   │   ├─Status……………………………………………………………
Completed\n"
                 + "  │   │   ├─Type…………………………………………………………………
Real\n"
                 + "  │   │   └─Significant event\n"
+                + "  │   │       ├─Context………………………………………………
Acquisition\n"
                 + "  │   │       └─Time………………………………………………………
2016-06-26 03:02:01\n"
                 + "  │   └─Platform\n"
                 + "  │       ├─Identifier\n"
-                + "  │       │   └─Code………………………………………………………
LANDSAT\n"
+                + "  │       │   └─Code………………………………………………………
Pseudo LANDSAT\n"
                 + "  │       └─Instrument\n"
                 + "  │           └─Identifier\n"
-                + "  │               └─Code……………………………………………
PseudoSensor\n"
+                + "  │               └─Code……………………………………………
Pseudo TIRS\n"
                 + "  ├─Date info\n"
                 + "  │   ├─Date……………………………………………………………………………
2016-06-27 16:48:12\n"
                 + "  │   └─Date type………………………………………………………………
Creation\n"
                 + "  ├─Metadata scope\n"
-                + "  │   └─Resource scope…………………………………………………
Metadata\n"
+                + "  │   └─Resource scope…………………………………………………
Dataset\n"
                 + "  ├─Metadata identifier\n"
-                + "  │   └─Code……………………………………………………………………………
TestImage\n"
+                + "  │   └─Code……………………………………………………………………………
LandsatTest\n"
                 + "  ├─Metadata standard (1 of 2)\n"
                 + "  │   ├─Title…………………………………………………………………………
Geographic Information — Metadata Part 1: Fundamentals\n"
                 + "  │   ├─Cited responsible party\n"

Modified: sis/branches/JDK8/storage/sis-earth-observation/src/test/resources/org/apache/sis/storage/earthobservation/LandsatTest.txt
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/storage/sis-earth-observation/src/test/resources/org/apache/sis/storage/earthobservation/LandsatTest.txt?rev=1757018&r1=1757017&r2=1757018&view=diff
==============================================================================
--- sis/branches/JDK8/storage/sis-earth-observation/src/test/resources/org/apache/sis/storage/earthobservation/LandsatTest.txt
[UTF-8] (original)
+++ sis/branches/JDK8/storage/sis-earth-observation/src/test/resources/org/apache/sis/storage/earthobservation/LandsatTest.txt
[UTF-8] Sat Aug 20 18:18:19 2016
@@ -4,19 +4,19 @@
 #
 GROUP = L1_METADATA_FILE
   GROUP = METADATA_FILE_INFO
-    ORIGIN = "Test file"
-    REQUEST_ID = "UnitTests"
-    LANDSAT_SCENE_ID = "TestImage"
+    ORIGIN = "Derived from U.S. Geological Survey data"
+    REQUEST_ID = "Software unit tests"
+    LANDSAT_SCENE_ID = "LandsatTest"
     FILE_DATE = 2016-06-27T16:48:12Z
-    STATION_ID = "Virtual"
-    PROCESSING_SOFTWARE_VERSION = "0.8"
+    STATION_ID = "Virtual station for test"
+    PROCESSING_SOFTWARE_VERSION = "SIS 0.8"
   END_GROUP = METADATA_FILE_INFO
   GROUP = PRODUCT_METADATA
-    DATA_TYPE = "Synthetic"
-    ELEVATION_SOURCE = "None"
+    DATA_TYPE = "Pseudo LT1"
+    ELEVATION_SOURCE = "Pseudo GLS"
     OUTPUT_FORMAT = "GEOTIFF"
-    SPACECRAFT_ID = "LANDSAT"
-    SENSOR_ID = "PseudoSensor"
+    SPACECRAFT_ID = "Pseudo LANDSAT"
+    SENSOR_ID = "Pseudo TIRS"
     WRS_PATH = 100
     WRS_ROW = 50
     NADIR_OFFNADIR = "NADIR"
@@ -40,28 +40,28 @@ GROUP = L1_METADATA_FILE
     CORNER_LL_PROJECTION_Y_PRODUCT = 1200000
     CORNER_LR_PROJECTION_X_PRODUCT =  440000
     CORNER_LR_PROJECTION_Y_PRODUCT = 1200000
-    PANCHROMATIC_LINES = 15500
+    PANCHROMATIC_LINES   = 15500
     PANCHROMATIC_SAMPLES = 15000
-    REFLECTIVE_LINES = 7800
-    REFLECTIVE_SAMPLES = 7600
-    THERMAL_LINES = 7800
-    THERMAL_SAMPLES = 7600
-    FILE_NAME_BAND_1 = "TestImage_B1.TIF"
-    FILE_NAME_BAND_2 = "TestImage_B2.TIF"
-    FILE_NAME_BAND_3 = "TestImage_B3.TIF"
-    FILE_NAME_BAND_4 = "TestImage_B4.TIF"
-    FILE_NAME_BAND_5 = "TestImage_B5.TIF"
-    FILE_NAME_BAND_6 = "TestImage_B6.TIF"
-    FILE_NAME_BAND_7 = "TestImage_B7.TIF"
-    FILE_NAME_BAND_8 = "TestImage_B8.TIF"
-    FILE_NAME_BAND_9 = "TestImage_B9.TIF"
-    FILE_NAME_BAND_10 = "TestImage_B10.TIF"
-    FILE_NAME_BAND_11 = "TestImage_B11.TIF"
+    REFLECTIVE_LINES     =  7800
+    REFLECTIVE_SAMPLES   =  7600
+    THERMAL_LINES        =  7800
+    THERMAL_SAMPLES      =  7600
+    FILE_NAME_BAND_1       = "TestImage_B1.TIF"
+    FILE_NAME_BAND_2       = "TestImage_B2.TIF"
+    FILE_NAME_BAND_3       = "TestImage_B3.TIF"
+    FILE_NAME_BAND_4       = "TestImage_B4.TIF"
+    FILE_NAME_BAND_5       = "TestImage_B5.TIF"
+    FILE_NAME_BAND_6       = "TestImage_B6.TIF"
+    FILE_NAME_BAND_7       = "TestImage_B7.TIF"
+    FILE_NAME_BAND_8       = "TestImage_B8.TIF"
+    FILE_NAME_BAND_9       = "TestImage_B9.TIF"
+    FILE_NAME_BAND_10      = "TestImage_B10.TIF"
+    FILE_NAME_BAND_11      = "TestImage_B11.TIF"
     FILE_NAME_BAND_QUALITY = "TestImage_BQA.TIF"
-    METADATA_FILE_NAME = "TestImage_MTL.txt"
-    BPF_NAME_OLI = "LO8BPF.01"
-    BPF_NAME_TIRS = "LT8BPF.01"
-    CPF_NAME = "L8CPF.03"
+    METADATA_FILE_NAME     = "LandsatTest.txt"
+    BPF_NAME_OLI   = "LO8BPF.01"
+    BPF_NAME_TIRS  = "LT8BPF.01"
+    CPF_NAME       = "L8CPF.03"
     RLUT_FILE_NAME = "L8RLUT.h5"
   END_GROUP = PRODUCT_METADATA
   GROUP = IMAGE_ATTRIBUTES



Mime
View raw message