Exemple #1
0
    def test_sentinel_scene_interpreter(self):
        expected = 'tiles/56/W/NV/2016/5/30/0'

        scene = 'S2A_tile_20160530_56WNV_0'
        self.assertEqual(Sentinel2.scene_interpreter(scene), expected)

        scene = 'S2A_OPER_MSI_L1C_TL_SGS__20160530T030406_A004890_T56WNV_N01.01'
        self.assertEqual(Sentinel2.scene_interpreter(scene), expected)
Exemple #2
0
    def test_scene_interpreter_success(self):
        scene = 'S2A_OPER_MSI_L1C_TL_SGS__20160325T150955_A003951_T34RCS_N02.01'
        output = Sentinel2.scene_interpreter(scene)
        expect = 'tiles/34/R/CS/2016/3/25/0'
        self.assertEqual(output, expect)

        scene = 'S2A_OPER_MSI_L1C_TL_SGS__20160325T150955_A003951_T34RCS_N02.01'
        output = Sentinel2.scene_interpreter(scene)
        expect = 'tiles/34/R/CS/2016/3/25/0'
        self.assertEqual(output, expect)

        scene = 'S2A_tile_20160526_1VCH_0'
        output = Sentinel2.scene_interpreter(scene)
        expect = 'tiles/1/V/CH/2016/5/26/0'
        self.assertEqual(output, expect)
Exemple #3
0
 def test_scene_interpreter_fail(self):
     with self.assertRaises(IncorrectSentine2SceneId):
         scene = 'S2A_OPER_MSI_L1C_TL_SGS__20160325T150955_A003951_T34RCS_N02.what'
         Sentinel2.scene_interpreter(scene)
Exemple #4
0
 def test_amazon_s3_url_sentinel2(self):
     scene = 'S2A_OPER_MSI_L1C_TL_SGS__20160325T150955_A003951_T34RCS_N02.01'
     path = Sentinel2.scene_interpreter(scene)
     string = Sentinel2.amazon_s3_url(path, 11)
     expect = 'tiles/34/R/CS/2016/3/25/0/B11.jp2'
     assert expect in string