def test_StreetAlignment(self): self.df_buildings["orient"] = orient = mm.Orientation( self.df_buildings).series self.df_buildings["street_alignment"] = mm.StreetAlignment( self.df_buildings, self.df_streets, "orient", network_id="nID").series self.df_buildings["street_alignment2"] = mm.StreetAlignment( self.df_buildings, self.df_streets, "orient", left_network_id="nID", right_network_id="nID", ).series self.df_buildings["street_a_arr"] = mm.StreetAlignment( self.df_buildings, self.df_streets, orient, left_network_id=self.df_buildings["nID"], right_network_id=self.df_streets["nID"], ).series with pytest.raises(ValueError): self.df_buildings["street_alignment"] = mm.StreetAlignment( self.df_buildings, self.df_streets, "orient") with pytest.raises(ValueError): self.df_buildings["street_alignment"] = mm.StreetAlignment( self.df_buildings, self.df_streets, "orient", left_network_id="nID") with pytest.raises(ValueError): self.df_buildings["street_alignment"] = mm.StreetAlignment( self.df_buildings, self.df_streets, "orient", right_network_id="nID") check = 0.29073888476702336 assert self.df_buildings["street_alignment"][0] == pytest.approx(check) assert self.df_buildings["street_alignment2"][0] == pytest.approx( check) assert self.df_buildings["street_a_arr"][0] == pytest.approx(check)
def time_StreetAlignment(self): mm.StreetAlignment(self.df_buildings, self.df_streets, "orient", network_id="nID")