How to use the momepy.SharedWallsRatio function in momepy

To help you get started, we’ve selected a few momepy 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 martinfleis / momepy / tests / test_distribution.py View on Github external
def test_SharedWallsRatio(self):
        self.df_buildings["swr"] = mm.SharedWallsRatio(self.df_buildings).series
        self.df_buildings["swr_array"] = mm.SharedWallsRatio(
            self.df_buildings, perimeters=self.df_buildings.geometry.length
        ).series
        nonconsecutive = self.df_buildings.drop(2)
        result = mm.SharedWallsRatio(nonconsecutive).series
        check = 0.3424804411228673
        assert self.df_buildings["swr"][10] == check
        assert self.df_buildings["swr_array"][10] == check
        assert result[10] == check
        with pytest.warns(FutureWarning):
            mm.SharedWallsRatio(self.df_buildings, "uID")
github martinfleis / momepy / tests / test_distribution.py View on Github external
def test_SharedWallsRatio(self):
        self.df_buildings["swr"] = mm.SharedWallsRatio(self.df_buildings).series
        self.df_buildings["swr_array"] = mm.SharedWallsRatio(
            self.df_buildings, perimeters=self.df_buildings.geometry.length
        ).series
        nonconsecutive = self.df_buildings.drop(2)
        result = mm.SharedWallsRatio(nonconsecutive).series
        check = 0.3424804411228673
        assert self.df_buildings["swr"][10] == check
        assert self.df_buildings["swr_array"][10] == check
        assert result[10] == check
        with pytest.warns(FutureWarning):
            mm.SharedWallsRatio(self.df_buildings, "uID")
github martinfleis / momepy / tests / test_distribution.py View on Github external
def test_SharedWallsRatio(self):
        self.df_buildings["swr"] = mm.SharedWallsRatio(self.df_buildings).series
        self.df_buildings["swr_array"] = mm.SharedWallsRatio(
            self.df_buildings, perimeters=self.df_buildings.geometry.length
        ).series
        nonconsecutive = self.df_buildings.drop(2)
        result = mm.SharedWallsRatio(nonconsecutive).series
        check = 0.3424804411228673
        assert self.df_buildings["swr"][10] == check
        assert self.df_buildings["swr_array"][10] == check
        assert result[10] == check
        with pytest.warns(FutureWarning):
            mm.SharedWallsRatio(self.df_buildings, "uID")
github martinfleis / momepy / tests / test_distribution.py View on Github external
def test_SharedWallsRatio(self):
        self.df_buildings["swr"] = mm.SharedWallsRatio(self.df_buildings).series
        self.df_buildings["swr_array"] = mm.SharedWallsRatio(
            self.df_buildings, perimeters=self.df_buildings.geometry.length
        ).series
        nonconsecutive = self.df_buildings.drop(2)
        result = mm.SharedWallsRatio(nonconsecutive).series
        check = 0.3424804411228673
        assert self.df_buildings["swr"][10] == check
        assert self.df_buildings["swr_array"][10] == check
        assert result[10] == check
        with pytest.warns(FutureWarning):
            mm.SharedWallsRatio(self.df_buildings, "uID")
github martinfleis / momepy / benchmarks / bench_distribution.py View on Github external
def time_SharedWallsRatio(self):
        mm.SharedWallsRatio(self.df_buildings)