def compute_addr_repr(self, lat, lon, valid_streets): ix, address, error = self.compute_addr(lat, lon, valid_streets) if ix != -1: addrRepr = CvtdUtil.addr_repr(address, self.roadList[ix].dir, self.roadList[ix].name) else: addrRepr = "N/A" return ix, addrRepr, error
def compute_addr(self, lat, lon, nodeDict): point_ix, proj_ratio, error = self.compute_proj_ratio( lat, lon, nodeDict) vaddr_begin = self.points[point_ix].addr vaddr_end = self.points[point_ix + 1].addr address = round(proj_ratio * (vaddr_end - vaddr_begin) + vaddr_begin) addrRepr = CvtdUtil.addr_repr(address, self.dir, self.name) return addrRepr, CvtdUtil.coord_to_ft(error)
def addr_repr(self, roadList): return CvtdUtil.addr_repr(self.addr, roadList[self.roadIx].dir, roadList[self.roadIx].name)