MCPcopy Create free account
hub / github.com/comaps/comaps / parse_route

Function parse_route

tools/python/openlr/quality.py:131–142  ·  view source on GitHub ↗
(route)

Source from the content-addressed store, hash-verified

129 return self.segment_id, self.matched_route, self.golden_route
130
131def parse_route(route):
132 if not route:
133 return None
134 result = []
135 for edge in route.findall('RoadEdge'):
136 start = edge.find('StartJunction')
137 end = edge.find('EndJunction')
138 result.append((
139 LatLon(float(start.find('lat').text), float(start.find('lon').text)),
140 LatLon(float(end.find('lat').text), float(end.find('lon').text))
141 ))
142 return result
143
144def ignored_segments_number(tree, limit):
145 ignored_segments_num = 0

Callers 1

parse_segmentsFunction · 0.85

Calls 3

LatLonClass · 0.50
findMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected