def makeSeg(start, end, oneway=False): """ Make RouteSegment message. :param start: Initial UUID. :param end: Final UUID. :param oneway: True if segment is one-way. :returns: RouteSegment message. """ uu = geodesy.gen_uuid.makeUniqueID(PKG_URL + '/' + str(start) + '/' + str(end)) seg = RouteSegment(id=uu, start=UniqueID(uuid=start), end=UniqueID(uuid=end)) if oneway: seg.props.append(KeyValue(key='oneway', value='yes')) return seg
def makeWayPoint(id, lat, lon): w = WayPoint() w.id = UniqueID(id) w.position = GeoPoint(latitude=lat, longitude=lon) return w
def makeSegment(id, start, end): return RouteSegment(id = UniqueID(id), start = UniqueID(start), end = UniqueID(end))
def makeRequest(network, start, goal): return GetRoutePlanRequest(UniqueID(uuid=network), UniqueID(uuid=start), UniqueID(uuid=goal))