@@ -124,8 +124,6 @@ public void testReadAcquisitionInfo_MB() throws IOException {
124124 assertTrue (boundingGeometry instanceof Polygon );
125125 final Polygon polygon = (Polygon ) boundingGeometry ;
126126
127- System .out .println (GeometryUtil .toPointListWkt (polygon ));
128-
129127 final Point [] coordinates = polygon .getCoordinates ();
130128 assertEquals (75 , coordinates .length );
131129 assertEquals (59.658199310302734 , coordinates [0 ].getLon (), 1e-8 );
@@ -187,6 +185,48 @@ public void testReadAcquisitionInfo_MA_GZ() throws IOException {
187185 }
188186 }
189187
188+ @ Test
189+ public void testReadAcquisitionInfo_MC () throws IOException {
190+ final File file = getAvhrrFRAC_MC_File ();
191+
192+ try {
193+ reader .open (file );
194+
195+ final AcquisitionInfo acquisitionInfo = reader .read ();
196+ assertNotNull (acquisitionInfo );
197+
198+ final Date sensingStart = acquisitionInfo .getSensingStart ();
199+ TestUtil .assertCorrectUTCDate (2019 , 9 , 11 , 2 , 20 , 46 , sensingStart );
200+
201+ final Date sensingStop = acquisitionInfo .getSensingStop ();
202+ TestUtil .assertCorrectUTCDate (2019 , 9 , 11 , 3 , 19 , 28 , sensingStop );
203+
204+ final NodeType nodeType = acquisitionInfo .getNodeType ();
205+ assertEquals (NodeType .UNDEFINED , nodeType );
206+
207+ final Geometry boundingGeometry = acquisitionInfo .getBoundingGeometry ();
208+ assertNotNull (boundingGeometry );
209+ assertTrue (boundingGeometry instanceof Polygon );
210+ final Polygon polygon = (Polygon ) boundingGeometry ;
211+
212+ final Point [] coordinates = polygon .getCoordinates ();
213+ assertEquals (75 , coordinates .length );
214+ assertEquals (59.658199310302734 , coordinates [0 ].getLon (), 1e-8 );
215+ assertEquals (-61.54189682006836 , coordinates [0 ].getLat (), 1e-8 );
216+
217+ assertEquals (99.13909912109376 , coordinates [28 ].getLon (), 1e-8 );
218+ assertEquals (80.86370086669922 , coordinates [28 ].getLat (), 1e-8 );
219+
220+ final TimeAxis [] timeAxes = acquisitionInfo .getTimeAxes ();
221+ assertEquals (1 , timeAxes .length );
222+
223+ Date time = timeAxes [0 ].getTime (coordinates [0 ]);
224+ TestUtil .assertCorrectUTCDate (2019 , 9 , 11 , 2 , 20 , 46 , time );
225+ } finally {
226+ reader .close ();
227+ }
228+ }
229+
190230 @ Test
191231 public void testGetTimeLocator_MA () throws IOException {
192232 final File file = getAvhrrFRAC_MA_File ();
@@ -782,4 +822,9 @@ private File getAvhrrFRAC_MA_GZ_File() throws IOException {
782822 final String testFilePath = TestUtil .assembleFileSystemPath (new String []{"avhrr-frac-ma" , "v1" , "2014" , "11" , "09" , "NSS.FRAC.M1.D14313.S1746.E1837.B1112525.MM.gz" }, false );
783823 return TestUtil .getTestDataFileAsserted (testFilePath );
784824 }
825+
826+ private File getAvhrrFRAC_MC_File () throws IOException {
827+ final String testFilePath = TestUtil .assembleFileSystemPath (new String []{"avhrr-frac-mc" , "v1" , "2019" , "09" , "18" , "NSS.FRAC.M3.D19261.S1708.E1849.B0448586.SV" }, false );
828+ return TestUtil .getTestDataFileAsserted (testFilePath );
829+ }
785830}
0 commit comments