Ejemplo n.º 1
0
    def test_NeighborDistance(self):
        sw = Queen.from_dataframe(self.df_tessellation, ids="uID")
        self.df_buildings["dist_sw"] = mm.NeighborDistance(
            self.df_buildings, sw, "uID").series
        check = 29.18589019096464
        assert self.df_buildings["dist_sw"][0] == check

        sw_drop = Queen.from_dataframe(self.df_tessellation[:-2], ids="uID")
        self.df_buildings["dist_sw"] = mm.NeighborDistance(
            self.df_buildings, sw_drop, "uID").series
        check = 29.18589019096464
        assert self.df_buildings["dist_sw"][0] == check
        assert self.df_buildings["dist_sw"].isna().any()
Ejemplo n.º 2
0
 def time_NeighborDistance(self):
     mm.NeighborDistance(self.df_buildings, self.sw, "uID")