Exemplo n.º 1
0
 def test_scaling_parameters_missing_band(self):
     sc = SceneCollection([
         MockScene({}, self.MOCK_RGBA_PROPERTIES),
         MockScene({}, self.MOCK_RGBA_PROPERTIES3),
     ])
     with pytest.raises(ValueError, match="not available"):
         scales, data_type = sc.scaling_parameters("red green blue alpha")
Exemplo n.º 2
0
 def test_scaling_parameters_physical_incompatible(self):
     sc = SceneCollection([
         MockScene({}, self.MOCK_RGBA_PROPERTIES),
         MockScene({}, self.MOCK_RGBA_PROPERTIES3),
     ])
     with pytest.raises(ValueError, match="incompatible"):
         scales, data_type = sc.scaling_parameters("green alpha",
                                                   "physical")
Exemplo n.º 3
0
 def test_scaling_parameters_raw_range(self):
     sc = SceneCollection([
         MockScene({}, self.MOCK_RGBA_PROPERTIES),
         MockScene({}, self.MOCK_RGBA_PROPERTIES3),
     ])
     scales, data_type = sc.scaling_parameters("red alpha", "raw")
     assert scales == [None, None]
     assert data_type == "Int32"
Exemplo n.º 4
0
 def test_scaling_parameters_display_range(self):
     sc = SceneCollection([
         MockScene({}, self.MOCK_RGBA_PROPERTIES),
         MockScene({}, self.MOCK_RGBA_PROPERTIES3),
     ])
     scales, data_type = sc.scaling_parameters("red alpha", "display")
     assert scales == [(0, 4000, 0, 255), None]
     assert data_type == "Byte"
Exemplo n.º 5
0
 def test_scaling_parameters_none_data_type(self):
     sc = SceneCollection([
         MockScene({}, self.MOCK_RGBA_PROPERTIES),
         MockScene({}, self.MOCK_RGBA_PROPERTIES3),
     ])
     scales, data_type = sc.scaling_parameters("red alpha")
     assert scales is None
     assert data_type == "Int32"
Exemplo n.º 6
0
 def test_scaling_parameters_single(self):
     sc = SceneCollection([MockScene({}, self.MOCK_RGBA_PROPERTIES)])
     scales, data_type = sc.scaling_parameters("red green blue alpha")
     assert scales is None
     assert data_type == "UInt16"