Пример #1
0
    def test_get_nansat_object_no_reproject(self):
        ''' Mosaic.Layer should open file with Nansat '''
        l = Layer(self.test_file_gcps, doReproject=False)
        l.make_nansat_object(self.domain)

        self.assertEqual(type(l.n), Nansat)
        self.assertEqual(l.n.shape(), (200, 200))
Пример #2
0
    def test_get_nansat_object_no_reproject(self):
        ''' Mosaic.Layer should open file with Nansat '''
        l = Layer(self.test_file_gcps, doReproject=False)
        l.make_nansat_object(self.domain)

        self.assertEqual(type(l.n), Nansat)
        self.assertEqual(l.n.shape(), (200, 200))
Пример #3
0
    def test_get_nansat_object(self):
        ''' Mosaic.Layer should open file with Nansat and reproject '''
        l = Layer(self.test_file_gcps)
        l.make_nansat_object(self.domain)

        self.assertEqual(type(l.n), Nansat)
        self.assertEqual(l.n.shape(), (650, 700))
Пример #4
0
    def test_get_nansat_object(self):
        ''' Mosaic.Layer should open file with Nansat and reproject '''
        l = Layer(self.test_file_gcps)
        l.make_nansat_object(self.domain)

        self.assertEqual(type(l.n), Nansat)
        self.assertEqual(l.n.shape(), (650, 700))
Пример #5
0
    def test_get_mask_no_reproject(self):
        '''Mosaic.Layer should get mask from reprojected file '''
        l = Layer(self.test_file_gcps, doReproject=False)
        l.make_nansat_object(self.domain)
        mask = l.get_mask_array()

        self.assertEqual(type(mask), np.ndarray)
        np.testing.assert_allclose(mask, np.ones((200,200))*64)
Пример #6
0
    def test_get_mask_no_reproject(self):
        '''Mosaic.Layer should get mask from reprojected file '''
        l = Layer(self.test_file_gcps, doReproject=False)
        l.make_nansat_object(self.domain)
        mask = l.get_mask_array()

        self.assertEqual(type(mask), np.ndarray)
        np.testing.assert_allclose(mask, np.ones((200, 200)) * 64)
Пример #7
0
    def test_get_mask(self):
        '''Mosaic.Layer should get mask from reprojected file '''
        n = Nansat(self.test_file_gcps)
        n.reproject(self.domain)
        swathmask = n['swathmask']

        l = Layer(self.test_file_gcps)
        l.make_nansat_object(self.domain)
        mask = l.get_mask_array()

        self.assertEqual(type(mask), np.ndarray)
        self.assertEqual(mask.shape, (650, 700))
        np.testing.assert_allclose(mask, swathmask*64)
Пример #8
0
    def test_get_mask(self):
        '''Mosaic.Layer should get mask from reprojected file '''
        n = Nansat(self.test_file_gcps)
        n.reproject(self.domain)
        swathmask = n['swathmask']

        l = Layer(self.test_file_gcps)
        l.make_nansat_object(self.domain)
        mask = l.get_mask_array()

        self.assertEqual(type(mask), np.ndarray)
        self.assertEqual(mask.shape, (650, 700))
        np.testing.assert_allclose(mask, swathmask * 64)