Exemplo n.º 1
0
    def test_merge_subsite_OK(self):
        cleaner = SiteNodeGeometryCleaner(self.mainsite)
        cleaner.process_all_features()

        cleaner.merge_subsite(self.subsite)

        self.assertTrue(cleaner.geom['{Level curve A}'].equals(
            self.cleaned_level_A_shape))
        self.assertTrue(cleaner.geom['{Level curve B}'].equals(
            self.cleaned_level_B_shape))
Exemplo n.º 2
0
    def test_merge_subsite_material(self):
        self.subgrass = MaterialArea(rect(6, 7, 7, 8),
                                     material=self.grass,
                                     id="{Grass in subsite}",
                                     parent_site=self.subsite)
        cleaner = SiteNodeGeometryCleaner(self.mainsite)
        cleaner.process_all_features()
        cleaner.merge_subsite(self.subsite)

        self.assertIn(self.subgrass.id, cleaner.geom)
        geom, info = cleaner[self.subgrass.id]
        self.assertEqual(info['material'], self.grass.id)