コード例 #1
0
ファイル: union_test.py プロジェクト: 82d28a/geopyspark
    def test_union_of_tiled_raster_layers(self):
        result = union(self.tiled_layer_1, self.tiled_layer_2)

        bounds_1 = self.tiled_layer_1.layer_metadata.bounds
        bounds_2 = self.tiled_layer_2.layer_metadata.bounds

        min_col = min(bounds_1.minKey.col, bounds_2.minKey.col)
        min_row = min(bounds_1.minKey.row, bounds_2.minKey.row)
        max_col = max(bounds_1.maxKey.col, bounds_2.maxKey.col)
        max_row = max(bounds_1.maxKey.row, bounds_2.maxKey.row)

        min_key = SpatialKey(min_col, min_row)
        max_key = SpatialKey(max_col, max_row)

        self.assertTrue(result.srdd.rdd().count(), 2)
        self.assertEqual(result.layer_metadata.bounds,
                         Bounds(min_key, max_key))
コード例 #2
0
ファイル: union_test.py プロジェクト: 82d28a/geopyspark
    def test_union_of_raster_layers(self):
        result = union(self.layer_1, self.layer_2)

        self.assertTrue(result.srdd.rdd().count(), 2)