add datasources to gpslogger/google_takeout
This commit is contained in:
parent
36beab5f17
commit
fdfd22bef2
2 changed files with 7 additions and 1 deletions
|
@ -23,7 +23,12 @@ def locations() -> Iterator[Location]:
|
||||||
for g in events():
|
for g in events():
|
||||||
if isinstance(g, GoogleLocation):
|
if isinstance(g, GoogleLocation):
|
||||||
yield Location(
|
yield Location(
|
||||||
lon=g.lng, lat=g.lat, dt=g.dt, accuracy=g.accuracy, elevation=None
|
lon=g.lng,
|
||||||
|
lat=g.lat,
|
||||||
|
dt=g.dt,
|
||||||
|
accuracy=g.accuracy,
|
||||||
|
elevation=None,
|
||||||
|
datasource="google_takeout",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -65,6 +65,7 @@ def _extract_locations(path: Path) -> Iterator[Location]:
|
||||||
accuracy=config.accuracy,
|
accuracy=config.accuracy,
|
||||||
elevation=point.elevation,
|
elevation=point.elevation,
|
||||||
dt=datetime.replace(point.time, tzinfo=timezone.utc),
|
dt=datetime.replace(point.time, tzinfo=timezone.utc),
|
||||||
|
datasource="gpslogger",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue