Exemple #1
0
 def test_polygon(self):
     ts_ds = get_time_series(self.cube,
                             dict(type='Polygon',
                                  coordinates=[[[20.0, 10.0],
                                                [20.0, 20.0],
                                                [10.0, 20.0],
                                                [10.0, 10.0],
                                                [20.0, 10.0]]]))
     self.assert_dataset_ok(ts_ds, 100, True, False, False, True, False, False)
Exemple #2
0
 def test_no_vars(self):
     ts_ds = get_time_series(self.cube,
                             dict(type='Polygon',
                                  coordinates=[[[20.0, 10.0],
                                                [20.0, 20.0],
                                                [10.0, 20.0],
                                                [10.0, 10.0],
                                                [20.0, 10.0]]]),
                             var_names=[])
     self.assertIsNone(ts_ds)
Exemple #3
0
 def test_polygon_incl_count(self):
     ts_ds = get_time_series(self.cube,
                             dict(type='Polygon',
                                  coordinates=[[[20.0, 10.0],
                                                [20.0, 20.0],
                                                [10.0, 20.0],
                                                [10.0, 10.0],
                                                [20.0, 10.0]]]),
                             include_count=True)
     self.assert_dataset_ok(ts_ds, 110, True, True, False, True, True, False)
Exemple #4
0
 def test_polygon_incl_stdev_var_subs(self):
     ts_ds = get_time_series(self.cube,
                             dict(type='Polygon',
                                  coordinates=[[[20.0, 10.0],
                                                [20.0, 20.0],
                                                [10.0, 20.0],
                                                [10.0, 10.0],
                                                [20.0, 10.0]]]),
                             var_names=['B'],
                             include_stdev=True)
     self.assert_dataset_ok(ts_ds, 100, False, False, False, True, False, True)
Exemple #5
0
 def test_polygon_using_groupby(self):
     ts_ds = get_time_series(self.cube,
                             dict(type='Polygon',
                                  coordinates=[[[20.0, 10.0],
                                                [20.0, 20.0],
                                                [10.0, 20.0],
                                                [10.0, 10.0],
                                                [20.0, 10.0]]]),
                             include_count=True,
                             include_stdev=True,
                             use_groupby=True)
     self.assert_dataset_ok(ts_ds, 100, True, True, True, True, True, True)
Exemple #6
0
 def test_point(self):
     ts_ds = get_time_series(self.cube, dict(type='Point', coordinates=[20.0, 10.0]))
     self.assert_dataset_ok(ts_ds, 1, True, False, False, True, False, False)