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 2016/08/09 17:29:35 UTC
svn commit: r1755633 [2/2] - in /sis/branches/JDK8:
core/sis-feature/src/main/java/org/apache/sis/feature/
ide-project/NetBeans/ ide-project/NetBeans/nbproject/ storage/
storage/sis-earth-observation/ storage/sis-earth-observation/src/
storage/sis-eart...
Added: 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=1755633&view=auto
==============================================================================
--- sis/branches/JDK8/storage/sis-earth-observation/src/test/java/org/apache/sis/storage/earthobservation/LandsatReaderTest.java (added)
+++ sis/branches/JDK8/storage/sis-earth-observation/src/test/java/org/apache/sis/storage/earthobservation/LandsatReaderTest.java [UTF-8] Tue Aug 9 17:29:34 2016
@@ -0,0 +1,174 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.storage.earthobservation;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import org.opengis.metadata.Metadata;
+import org.apache.sis.metadata.iso.DefaultMetadata;
+import org.apache.sis.storage.DataStoreException;
+import org.apache.sis.test.TestCase;
+import org.junit.Test;
+
+import static org.apache.sis.test.Assert.assertMultilinesEquals;
+import static org.apache.sis.test.TestUtilities.formatNameAndValue;
+
+
+/**
+ * Tests {@link LandsatReader}.
+ *
+ * @author Thi Phuong Hao Nguyen (VNSC)
+ * @since 0.8
+ * @version 0.8
+ * @module
+ */
+public class LandsatReaderTest extends TestCase {
+ /**
+ * Tests {@link LandsatReader#read()}.
+ *
+ * @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"))) {
+ actual = new LandsatReader(in).read();
+ }
+ final String text = formatNameAndValue(DefaultMetadata.castOrCopy(actual).asTreeTable());
+ assertMultilinesEquals(
+ "Metadata\n"
+ + "��\u251c\u2500Language\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026 en\n"
+ + "��\u251c\u2500Identification info\n"
+ + "��\u2502���\u251c\u2500Citation\n"
+ + "��\u2502���\u2502���\u251c\u2500Title\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026 TestImage.tar.gz\n"
+ + "��\u2502���\u2502���\u251c\u2500Date\n"
+ + "��\u2502���\u2502���\u2502���\u251c\u2500Date\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026 2016-06-27 16:48:12\n"
+ + "��\u2502���\u2502���\u2502���\u2514\u2500Date type\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026 Publication\n"
+ + "��\u2502���\u2502���\u2514\u2500Cited responsible party\n"
+ + "��\u2502���\u2502�������\u2514\u2500Party\n"
+ + "��\u2502���\u2502�����������\u2514\u2500Name\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026 Test file\n"
+ + "��\u2502���\u251c\u2500Extent\n"
+ + "��\u2502���\u2502���\u2514\u2500Geographic element\n"
+ + "��\u2502���\u2502�������\u251c\u2500West bound longitude\u2026\u2026\u2026\u2026\u2026 108�20\u203224\u2033E\n"
+ + "��\u2502���\u2502�������\u251c\u2500East bound longitude\u2026\u2026\u2026\u2026\u2026 110�26\u203224\u2033E\n"
+ + "��\u2502���\u2502�������\u251c\u2500South bound latitude\u2026\u2026\u2026\u2026\u2026 10�30\u2032N\n"
+ + "��\u2502���\u2502�������\u251c\u2500North bound latitude\u2026\u2026\u2026\u2026\u2026 12�37\u203212\u2033N\n"
+ + "��\u2502���\u2502�������\u2514\u2500Extent type code\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026 true\n"
+ + "��\u2502���\u2514\u2500Associated resource\n"
+ + "��\u2502�������\u2514\u2500Name\n"
+ + "��\u2502�����������\u2514\u2500Title\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026 Test file\n"
+ + "��\u251c\u2500Content info\n"
+ + "��\u2502���\u251c\u2500Illumination elevation angle\u2026\u2026\u2026\u2026\u2026 58.8\n"
+ + "��\u2502���\u251c\u2500Illumination azimuth angle\u2026\u2026\u2026\u2026\u2026\u2026\u2026 116.9\n"
+ + "��\u2502���\u251c\u2500Cloud cover percentage\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026 8.3\n"
+ + "��\u2502���\u2514\u2500Attribute group\n"
+ + "��\u2502�������\u251c\u2500Content type\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026 Physical measurement\n"
+ + "��\u2502�������\u251c\u2500Attribute (1 of 11)\n"
+ + "��\u2502�������\u2502���\u251c\u2500Peak response\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026 433.0\n"
+ + "��\u2502�������\u2502���\u251c\u2500Bound units\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026 nm\n"
+ + "��\u2502�������\u2502���\u2514\u2500Description\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026 Coastal Aerosol\n"
+ + "��\u2502�������\u251c\u2500Attribute (2 of 11)\n"
+ + "��\u2502�������\u2502���\u251c\u2500Peak response\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026 482.0\n"
+ + "��\u2502�������\u2502���\u251c\u2500Bound units\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026 nm\n"
+ + "��\u2502�������\u2502���\u2514\u2500Description\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026 Blue\n"
+ + "��\u2502�������\u251c\u2500Attribute (3 of 11)\n"
+ + "��\u2502�������\u2502���\u251c\u2500Peak response\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026 562.0\n"
+ + "��\u2502�������\u2502���\u251c\u2500Bound units\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026 nm\n"
+ + "��\u2502�������\u2502���\u2514\u2500Description\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026 Green\n"
+ + "��\u2502�������\u251c\u2500Attribute (4 of 11)\n"
+ + "��\u2502�������\u2502���\u251c\u2500Peak response\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026 655.0\n"
+ + "��\u2502�������\u2502���\u251c\u2500Bound units\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026 nm\n"
+ + "��\u2502�������\u2502���\u2514\u2500Description\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026 Red\n"
+ + "��\u2502�������\u251c\u2500Attribute (5 of 11)\n"
+ + "��\u2502�������\u2502���\u251c\u2500Peak response\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026 865.0\n"
+ + "��\u2502�������\u2502���\u251c\u2500Bound units\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026 nm\n"
+ + "��\u2502�������\u2502���\u2514\u2500Description\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026 Near-Infrared\n"
+ + "��\u2502�������\u251c\u2500Attribute (6 of 11)\n"
+ + "��\u2502�������\u2502���\u251c\u2500Peak response\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026 1610.0\n"
+ + "��\u2502�������\u2502���\u251c\u2500Bound units\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026 nm\n"
+ + "��\u2502�������\u2502���\u2514\u2500Description\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026 Short Wavelength Infrared (SWIR) 1\n"
+ + "��\u2502�������\u251c\u2500Attribute (7 of 11)\n"
+ + "��\u2502�������\u2502���\u251c\u2500Peak response\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026 2200.0\n"
+ + "��\u2502�������\u2502���\u251c\u2500Bound units\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026 nm\n"
+ + "��\u2502�������\u2502���\u2514\u2500Description\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026 Short Wavelength Infrared (SWIR) 2\n"
+ + "��\u2502�������\u251c\u2500Attribute (8 of 11)\n"
+ + "��\u2502�������\u2502���\u251c\u2500Peak response\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026 590.0\n"
+ + "��\u2502�������\u2502���\u251c\u2500Bound units\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026 nm\n"
+ + "��\u2502�������\u2502���\u2514\u2500Description\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026 Panchromatic\n"
+ + "��\u2502�������\u251c\u2500Attribute (9 of 11)\n"
+ + "��\u2502�������\u2502���\u251c\u2500Peak response\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026 1375.0\n"
+ + "��\u2502�������\u2502���\u251c\u2500Bound units\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026 nm\n"
+ + "��\u2502�������\u2502���\u2514\u2500Description\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026 Cirrus\n"
+ + "��\u2502�������\u251c\u2500Attribute (10 of 11)\n"
+ + "��\u2502�������\u2502���\u251c\u2500Peak response\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026 10800.0\n"
+ + "��\u2502�������\u2502���\u251c\u2500Bound units\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026 nm\n"
+ + "��\u2502�������\u2502���\u2514\u2500Description\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026 Thermal Infrared Sensor (TIRS) 1\n"
+ + "��\u2502�������\u2514\u2500Attribute (11 of 11)\n"
+ + "��\u2502�����������\u251c\u2500Peak response\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026 12000.0\n"
+ + "��\u2502�����������\u251c\u2500Bound units\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026 nm\n"
+ + "��\u2502�����������\u2514\u2500Description\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026 Thermal Infrared Sensor (TIRS) 2\n"
+ + "��\u251c\u2500Distribution info\n"
+ + "��\u2502���\u2514\u2500Distribution format\n"
+ + "��\u2502�������\u2514\u2500Format specification citation\n"
+ + "��\u2502�����������\u2514\u2500Alternate title\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026 GEOTIFF\n"
+ + "��\u251c\u2500Acquisition information\n"
+ + "��\u2502���\u251c\u2500Operation\n"
+ + "��\u2502���\u2502���\u251c\u2500Status\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026 Completed\n"
+ + "��\u2502���\u2502���\u251c\u2500Type\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026 Real\n"
+ + "��\u2502���\u2502���\u2514\u2500Significant event\n"
+ + "��\u2502���\u2502�������\u2514\u2500Time\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026 2016-06-26 03:02:01\n"
+ + "��\u2502���\u2514\u2500Platform\n"
+ + "��\u2502�������\u251c\u2500Identifier\n"
+ + "��\u2502�������\u2502���\u2514\u2500Code\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026 LANDSAT\n"
+ + "��\u2502�������\u2514\u2500Instrument\n"
+ + "��\u2502�����������\u2514\u2500Identifier\n"
+ + "��\u2502���������������\u2514\u2500Code\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026 PseudoSensor\n"
+ + "��\u251c\u2500Date info\n"
+ + "��\u2502���\u251c\u2500Date\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026 2016-06-27 16:48:12\n"
+ + "��\u2502���\u2514\u2500Date type\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026 Creation\n"
+ + "��\u251c\u2500Metadata scope\n"
+ + "��\u2502���\u2514\u2500Resource scope\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026 Metadata\n"
+ + "��\u251c\u2500Metadata identifier\n"
+ + "��\u2502���\u2514\u2500Code\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026 TestImage\n"
+ + "��\u251c\u2500Metadata standard (1 of 2)\n"
+ + "��\u2502���\u251c\u2500Title\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026 Geographic Information \u2014 Metadata Part 1: Fundamentals\n"
+ + "��\u2502���\u251c\u2500Cited responsible party\n"
+ + "��\u2502���\u2502���\u251c\u2500Party\n"
+ + "��\u2502���\u2502���\u2502���\u2514\u2500Name\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026 International Organization for Standardization\n"
+ + "��\u2502���\u2502���\u2514\u2500Role\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026 Principal investigator\n"
+ + "��\u2502���\u251c\u2500Edition\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026 ISO 19115-1:2014(E)\n"
+ + "��\u2502���\u251c\u2500Identifier\n"
+ + "��\u2502���\u2502���\u251c\u2500Code\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026 19115-1\n"
+ + "��\u2502���\u2502���\u251c\u2500Code space\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026 ISO\n"
+ + "��\u2502���\u2502���\u2514\u2500Version\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026 2014(E)\n"
+ + "��\u2502���\u2514\u2500Presentation form\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026 Document digital\n"
+ + "��\u2514\u2500Metadata standard (2 of 2)\n"
+ + "������\u251c\u2500Title\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026 Geographic Information \u2014 Metadata Part 2: Extensions for imagery and gridded data\n"
+ + "������\u251c\u2500Cited responsible party\n"
+ + "������\u2502���\u251c\u2500Party\n"
+ + "������\u2502���\u2502���\u2514\u2500Name\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026 International Organization for Standardization\n"
+ + "������\u2502���\u2514\u2500Role\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026 Principal investigator\n"
+ + "������\u251c\u2500Edition\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026 ISO 19115-2:2009(E)\n"
+ + "������\u251c\u2500Identifier\n"
+ + "������\u2502���\u251c\u2500Code\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026 19115-2\n"
+ + "������\u2502���\u251c\u2500Code space\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026 ISO\n"
+ + "������\u2502���\u2514\u2500Version\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026 2009(E)\n"
+ + "������\u2514\u2500Presentation form\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026 Document digital\n", text);
+ }
+}
Propchange: sis/branches/JDK8/storage/sis-earth-observation/src/test/java/org/apache/sis/storage/earthobservation/LandsatReaderTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: sis/branches/JDK8/storage/sis-earth-observation/src/test/java/org/apache/sis/storage/earthobservation/LandsatReaderTest.java
------------------------------------------------------------------------------
svn:mime-type = text/plain;charset=UTF-8
Added: sis/branches/JDK8/storage/sis-earth-observation/src/test/java/org/apache/sis/test/suite/EarthObservationTestSuite.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/storage/sis-earth-observation/src/test/java/org/apache/sis/test/suite/EarthObservationTestSuite.java?rev=1755633&view=auto
==============================================================================
--- sis/branches/JDK8/storage/sis-earth-observation/src/test/java/org/apache/sis/test/suite/EarthObservationTestSuite.java (added)
+++ sis/branches/JDK8/storage/sis-earth-observation/src/test/java/org/apache/sis/test/suite/EarthObservationTestSuite.java [UTF-8] Tue Aug 9 17:29:34 2016
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.test.suite;
+
+import org.apache.sis.test.TestSuite;
+import org.junit.runners.Suite;
+import org.junit.BeforeClass;
+
+
+/**
+ * All tests from the {@code sis-earth-observation} module, in approximative dependency order.
+ *
+ * @author Thi Phuong Hao Nguyen (VNSC)
+ * @author Martin Desruisseaux (Geomatys)
+ * @since 0.8
+ * @version 0.8
+ * @module
+ */
+@Suite.SuiteClasses({
+ org.apache.sis.storage.earthobservation.LandsatReaderTest.class
+})
+public final strictfp class EarthObservationTestSuite extends TestSuite {
+ /**
+ * Verifies the list of tests before to run the suite.
+ * See {@link #verifyTestList(Class, Class[])} for more information.
+ */
+ @BeforeClass
+ public static void verifyTestList() {
+ assertNoMissingTest(EarthObservationTestSuite.class);
+ verifyTestList(EarthObservationTestSuite.class);
+ }
+}
Propchange: sis/branches/JDK8/storage/sis-earth-observation/src/test/java/org/apache/sis/test/suite/EarthObservationTestSuite.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: sis/branches/JDK8/storage/sis-earth-observation/src/test/java/org/apache/sis/test/suite/EarthObservationTestSuite.java
------------------------------------------------------------------------------
svn:mime-type = text/plain;charset=UTF-8
Added: 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=1755633&view=auto
==============================================================================
--- sis/branches/JDK8/storage/sis-earth-observation/src/test/resources/org/apache/sis/storage/earthobservation/LandsatTest.txt (added)
+++ sis/branches/JDK8/storage/sis-earth-observation/src/test/resources/org/apache/sis/storage/earthobservation/LandsatTest.txt [UTF-8] Tue Aug 9 17:29:34 2016
@@ -0,0 +1,210 @@
+#
+# Following file is based from a USGS Landsat metadata file
+# (LC81230522014071LGN00_MTL) modified with truncated values.
+#
+GROUP = L1_METADATA_FILE
+ GROUP = METADATA_FILE_INFO
+ ORIGIN = "Test file"
+ REQUEST_ID = "UnitTests"
+ LANDSAT_SCENE_ID = "TestImage"
+ FILE_DATE = 2016-06-27T16:48:12Z
+ STATION_ID = "Virtual"
+ PROCESSING_SOFTWARE_VERSION = "0.8"
+ END_GROUP = METADATA_FILE_INFO
+ GROUP = PRODUCT_METADATA
+ DATA_TYPE = "Synthetic"
+ ELEVATION_SOURCE = "None"
+ OUTPUT_FORMAT = "GEOTIFF"
+ SPACECRAFT_ID = "LANDSAT"
+ SENSOR_ID = "PseudoSensor"
+ WRS_PATH = 100
+ WRS_ROW = 50
+ NADIR_OFFNADIR = "NADIR"
+ TARGET_WRS_PATH = 100
+ TARGET_WRS_ROW = 50
+ DATE_ACQUIRED = 2016-06-26
+ SCENE_CENTER_TIME = 03:02:01.09Z
+ CORNER_UL_LAT_PRODUCT = 12.61
+ CORNER_UL_LON_PRODUCT = 108.34
+ CORNER_UR_LAT_PRODUCT = 12.62
+ CORNER_UR_LON_PRODUCT = 110.44
+ CORNER_LL_LAT_PRODUCT = 10.50
+ CORNER_LL_LON_PRODUCT = 108.36
+ CORNER_LR_LAT_PRODUCT = 10.51
+ CORNER_LR_LON_PRODUCT = 110.44
+ CORNER_UL_PROJECTION_X_PRODUCT = 210000
+ CORNER_UL_PROJECTION_Y_PRODUCT = 1400000
+ CORNER_UR_PROJECTION_X_PRODUCT = 440000
+ CORNER_UR_PROJECTION_Y_PRODUCT = 1400000
+ CORNER_LL_PROJECTION_X_PRODUCT = 210000
+ CORNER_LL_PROJECTION_Y_PRODUCT = 1200000
+ CORNER_LR_PROJECTION_X_PRODUCT = 440000
+ CORNER_LR_PROJECTION_Y_PRODUCT = 1200000
+ 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"
+ 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"
+ RLUT_FILE_NAME = "L8RLUT.h5"
+ END_GROUP = PRODUCT_METADATA
+ GROUP = IMAGE_ATTRIBUTES
+ CLOUD_COVER = 8.3
+ IMAGE_QUALITY_OLI = 9
+ IMAGE_QUALITY_TIRS = 9
+ ROLL_ANGLE = -0.001
+ SUN_AZIMUTH = 116.9
+ SUN_ELEVATION = 58.8
+ EARTH_SUN_DISTANCE = 0.99
+ GROUND_CONTROL_POINTS_MODEL = 160
+ GEOMETRIC_RMSE_MODEL = 8.6
+ GEOMETRIC_RMSE_MODEL_Y = 5.8
+ GEOMETRIC_RMSE_MODEL_X = 6.4
+ GROUND_CONTROL_POINTS_VERIFY = 60
+ GEOMETRIC_RMSE_VERIFY = 6.5
+ END_GROUP = IMAGE_ATTRIBUTES
+ GROUP = MIN_MAX_RADIANCE
+ RADIANCE_MAXIMUM_BAND_1 = 769.9
+ RADIANCE_MINIMUM_BAND_1 = -63.6
+ RADIANCE_MAXIMUM_BAND_2 = 788.4
+ RADIANCE_MINIMUM_BAND_2 = -65.1
+ RADIANCE_MAXIMUM_BAND_3 = 726.5
+ RADIANCE_MINIMUM_BAND_3 = -60.0
+ RADIANCE_MAXIMUM_BAND_4 = 612.6
+ RADIANCE_MINIMUM_BAND_4 = -50.6
+ RADIANCE_MAXIMUM_BAND_5 = 374.9
+ RADIANCE_MINIMUM_BAND_5 = -31.0
+ RADIANCE_MAXIMUM_BAND_6 = 93.2
+ RADIANCE_MINIMUM_BAND_6 = -7.7
+ RADIANCE_MAXIMUM_BAND_7 = 31.4
+ RADIANCE_MINIMUM_BAND_7 = -2.6
+ RADIANCE_MAXIMUM_BAND_8 = 693.3
+ RADIANCE_MINIMUM_BAND_8 = -57.3
+ RADIANCE_MAXIMUM_BAND_9 = 146.5
+ RADIANCE_MINIMUM_BAND_9 = -12.1
+ RADIANCE_MAXIMUM_BAND_10 = 22.0
+ RADIANCE_MINIMUM_BAND_10 = 0.1
+ RADIANCE_MAXIMUM_BAND_11 = 22.0
+ RADIANCE_MINIMUM_BAND_11 = 0.1
+ END_GROUP = MIN_MAX_RADIANCE
+ GROUP = MIN_MAX_REFLECTANCE
+ REFLECTANCE_MAXIMUM_BAND_1 = 1.21
+ REFLECTANCE_MINIMUM_BAND_1 = -0.10
+ REFLECTANCE_MAXIMUM_BAND_2 = 1.21
+ REFLECTANCE_MINIMUM_BAND_2 = -0.10
+ REFLECTANCE_MAXIMUM_BAND_3 = 1.21
+ REFLECTANCE_MINIMUM_BAND_3 = -0.10
+ REFLECTANCE_MAXIMUM_BAND_4 = 1.21
+ REFLECTANCE_MINIMUM_BAND_4 = -0.10
+ REFLECTANCE_MAXIMUM_BAND_5 = 1.21
+ REFLECTANCE_MINIMUM_BAND_5 = -0.10
+ REFLECTANCE_MAXIMUM_BAND_6 = 1.21
+ REFLECTANCE_MINIMUM_BAND_6 = -0.10
+ REFLECTANCE_MAXIMUM_BAND_7 = 1.21
+ REFLECTANCE_MINIMUM_BAND_7 = -0.10
+ REFLECTANCE_MAXIMUM_BAND_8 = 1.21
+ REFLECTANCE_MINIMUM_BAND_8 = -0.10
+ REFLECTANCE_MAXIMUM_BAND_9 = 1.21
+ REFLECTANCE_MINIMUM_BAND_9 = -0.10
+ END_GROUP = MIN_MAX_REFLECTANCE
+ GROUP = MIN_MAX_PIXEL_VALUE
+ QUANTIZE_CAL_MAX_BAND_1 = 65535
+ QUANTIZE_CAL_MIN_BAND_1 = 1
+ QUANTIZE_CAL_MAX_BAND_2 = 65535
+ QUANTIZE_CAL_MIN_BAND_2 = 1
+ QUANTIZE_CAL_MAX_BAND_3 = 65535
+ QUANTIZE_CAL_MIN_BAND_3 = 1
+ QUANTIZE_CAL_MAX_BAND_4 = 65535
+ QUANTIZE_CAL_MIN_BAND_4 = 1
+ QUANTIZE_CAL_MAX_BAND_5 = 65535
+ QUANTIZE_CAL_MIN_BAND_5 = 1
+ QUANTIZE_CAL_MAX_BAND_6 = 65535
+ QUANTIZE_CAL_MIN_BAND_6 = 1
+ QUANTIZE_CAL_MAX_BAND_7 = 65535
+ QUANTIZE_CAL_MIN_BAND_7 = 1
+ QUANTIZE_CAL_MAX_BAND_8 = 65535
+ QUANTIZE_CAL_MIN_BAND_8 = 1
+ QUANTIZE_CAL_MAX_BAND_9 = 65535
+ QUANTIZE_CAL_MIN_BAND_9 = 1
+ QUANTIZE_CAL_MAX_BAND_10 = 65535
+ QUANTIZE_CAL_MIN_BAND_10 = 1
+ QUANTIZE_CAL_MAX_BAND_11 = 65535
+ QUANTIZE_CAL_MIN_BAND_11 = 1
+ END_GROUP = MIN_MAX_PIXEL_VALUE
+ GROUP = RADIOMETRIC_RESCALING
+ RADIANCE_MULT_BAND_1 = 1.27E-02
+ RADIANCE_MULT_BAND_2 = 1.30E-02
+ RADIANCE_MULT_BAND_3 = 1.20E-02
+ RADIANCE_MULT_BAND_4 = 1.01E-02
+ RADIANCE_MULT_BAND_5 = 6.19E-03
+ RADIANCE_MULT_BAND_6 = 1.54E-03
+ RADIANCE_MULT_BAND_7 = 5.19E-04
+ RADIANCE_MULT_BAND_8 = 1.15E-02
+ RADIANCE_MULT_BAND_9 = 2.42E-03
+ RADIANCE_MULT_BAND_10 = 3.34E-04
+ RADIANCE_MULT_BAND_11 = 3.34E-04
+ RADIANCE_ADD_BAND_1 = -63.6
+ RADIANCE_ADD_BAND_2 = -65.1
+ RADIANCE_ADD_BAND_3 = -60.0
+ RADIANCE_ADD_BAND_4 = -50.6
+ RADIANCE_ADD_BAND_5 = -31.0
+ RADIANCE_ADD_BAND_6 = -7.7
+ RADIANCE_ADD_BAND_7 = -2.6
+ RADIANCE_ADD_BAND_8 = -57.3
+ RADIANCE_ADD_BAND_9 = -12.1
+ RADIANCE_ADD_BAND_10 = 0.1
+ RADIANCE_ADD_BAND_11 = 0.1
+ REFLECTANCE_MULT_BAND_1 = 2E-05
+ REFLECTANCE_MULT_BAND_2 = 2E-05
+ REFLECTANCE_MULT_BAND_3 = 2E-05
+ REFLECTANCE_MULT_BAND_4 = 2E-05
+ REFLECTANCE_MULT_BAND_5 = 2E-05
+ REFLECTANCE_MULT_BAND_6 = 2E-05
+ REFLECTANCE_MULT_BAND_7 = 2E-05
+ REFLECTANCE_MULT_BAND_8 = 2E-05
+ REFLECTANCE_MULT_BAND_9 = 2E-05
+ REFLECTANCE_ADD_BAND_1 = -0.1
+ REFLECTANCE_ADD_BAND_2 = -0.1
+ REFLECTANCE_ADD_BAND_3 = -0.1
+ REFLECTANCE_ADD_BAND_4 = -0.1
+ REFLECTANCE_ADD_BAND_5 = -0.1
+ REFLECTANCE_ADD_BAND_6 = -0.1
+ REFLECTANCE_ADD_BAND_7 = -0.1
+ REFLECTANCE_ADD_BAND_8 = -0.1
+ REFLECTANCE_ADD_BAND_9 = -0.1
+ END_GROUP = RADIOMETRIC_RESCALING
+ GROUP = TIRS_THERMAL_CONSTANTS
+ K1_CONSTANT_BAND_10 = 775
+ K1_CONSTANT_BAND_11 = 480
+ K2_CONSTANT_BAND_10 = 1320
+ K2_CONSTANT_BAND_11 = 1200
+ END_GROUP = TIRS_THERMAL_CONSTANTS
+ GROUP = PROJECTION_PARAMETERS
+ MAP_PROJECTION = "UTM"
+ DATUM = "WGS84"
+ ELLIPSOID = "WGS84"
+ UTM_ZONE = 49
+ GRID_CELL_SIZE_PANCHROMATIC = 15
+ GRID_CELL_SIZE_REFLECTIVE = 30
+ GRID_CELL_SIZE_THERMAL = 30
+ ORIENTATION = "NORTH_UP"
+ RESAMPLING_OPTION = "CUBIC_CONVOLUTION"
+ END_GROUP = PROJECTION_PARAMETERS
+END_GROUP = L1_METADATA_FILE
+END
Propchange: sis/branches/JDK8/storage/sis-earth-observation/src/test/resources/org/apache/sis/storage/earthobservation/LandsatTest.txt
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: sis/branches/JDK8/storage/sis-earth-observation/src/test/resources/org/apache/sis/storage/earthobservation/LandsatTest.txt
------------------------------------------------------------------------------
svn:mime-type = text/plain;charset=UTF-8