How to use the maup.repair.absorb_by_shared_perimeter function in maup

To help you get started, we’ve selected a few maup examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mggg / maup / tests / test_holes.py View on Github external
def test_raises_error_if_targets_empty(self):
        square1 = square_at((0, 0))
        square2 = square_at((1, 0))
        sources = geopandas.GeoSeries([square1, square2])
        targets = geopandas.GeoSeries()

        with pytest.raises(IndexError):
            absorb_by_shared_perimeter(sources, targets)
github mggg / maup / tests / test_holes.py View on Github external
def test_returns_targets_if_sources_empty(self):
        square1 = square_at((0, 0))
        square2 = square_at((1, 0))
        targets = geopandas.GeoSeries([square1, square2])
        sources = geopandas.GeoSeries()

        assert absorb_by_shared_perimeter(sources, targets) is targets