예제 #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)