29 lines
No EOL
811 B
Python
29 lines
No EOL
811 B
Python
import gpxpy
|
|
|
|
coordinates = [
|
|
(45.48022428207604,9.195426779729253),
|
|
(45.47955920386783,9.211414017521326),
|
|
(45.47004427949249,9.203266840037728),
|
|
(45.475357889920666,9.191542629685118),
|
|
(45.47459610057904,9.208902213194566),
|
|
(45.478548651650364,9.214803404483442),
|
|
(45.46896260077224,9.210735083849189),
|
|
(45.476397626274775,9.194716709512006),
|
|
(45.475918164099824,9.200196924291388),
|
|
(45.479553171431604,9.21471213487326),
|
|
(45.47701013861511,9.208935252810576),
|
|
(45.48182315628131,9.197640483441692),
|
|
(45.47577401244318,9.212112575183651)
|
|
]
|
|
|
|
gpx = gpxpy.gpx.GPX()
|
|
|
|
for coord in coordinates:
|
|
lat, lon = coord
|
|
w = gpxpy.gpx.GPXWaypoint()
|
|
w.latitude = lat
|
|
w.longitude = lon
|
|
w.name = "Testing"
|
|
gpx.waypoints.append(w)
|
|
|
|
print(gpx.to_xml()) |