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

Method write_gpx

tools/python/google_maps_bookmarks.py:242–249  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

240 tree.write(self.output_file)
241
242 def write_gpx(self):
243 gpx = ET.Element("gpx", version="1.1", creator="GoogleMapsConverter")
244 for place in self.places:
245 wpt = ET.SubElement(gpx, "wpt", lat=place['coordinates'].split(',')[1], lon=place['coordinates'].split(',')[0])
246 ET.SubElement(wpt, "name").text = place['name']
247 ET.SubElement(wpt, "desc").text = place['description']
248 tree = ET.ElementTree(gpx)
249 tree.write(self.output_file)
250
251 def convert(self):
252 with open(self.input_file, 'r') as file:

Callers 1

convertMethod · 0.95

Calls 2

ElementMethod · 0.80
writeMethod · 0.45

Tested by

no test coverage detected