api: Fix track again, using correct filters to get all points
This commit is contained in:
parent
65b261630f
commit
a866eb3ab7
|
@ -1 +1 @@
|
||||||
Subproject commit 16909ea356ff6695d3e97d46efce78bca5fe5c40
|
Subproject commit 6beab2ebfede7e41a1184b5ae1d0be0c83f8f95c
|
|
@ -7,13 +7,14 @@ import json
|
||||||
from obs.face.importer import ImportMeasurementsCsv
|
from obs.face.importer import ImportMeasurementsCsv
|
||||||
from obs.face.annotate import AnnotateMeasurements
|
from obs.face.annotate import AnnotateMeasurements
|
||||||
from obs.face.filter import (
|
from obs.face.filter import (
|
||||||
PrivacyFilter,
|
|
||||||
ChainFilter,
|
|
||||||
AnonymizationMode,
|
AnonymizationMode,
|
||||||
RequiredFieldsFilter,
|
ChainFilter,
|
||||||
ConfirmedFilter,
|
ConfirmedFilter,
|
||||||
|
DistanceMeasuredFilter,
|
||||||
|
PrivacyFilter,
|
||||||
PrivacyZone,
|
PrivacyZone,
|
||||||
PrivacyZonesFilter,
|
PrivacyZonesFilter,
|
||||||
|
RequiredFieldsFilter,
|
||||||
)
|
)
|
||||||
from obs.face.osm import DataSource as OSMDataSource
|
from obs.face.osm import DataSource as OSMDataSource
|
||||||
|
|
||||||
|
@ -105,10 +106,14 @@ def process(args):
|
||||||
),
|
),
|
||||||
*filters_from_settings,
|
*filters_from_settings,
|
||||||
)
|
)
|
||||||
confirmed_filter = ConfirmedFilter()
|
events_filter = DistanceMeasuredFilter()
|
||||||
|
confirmed_filter = ChainFilter(
|
||||||
|
ConfirmedFilter(),
|
||||||
|
)
|
||||||
|
|
||||||
valid_measurements = input_filter.filter(measurements, log=log)
|
track_measurements = input_filter.filter(measurements, log=log)
|
||||||
confirmed_measurements = confirmed_filter.filter(valid_measurements, log=log)
|
event_measurements = events_filter.filter(track_measurements , log=log)
|
||||||
|
confirmed_measurements = confirmed_filter.filter(track_measurements, log=log)
|
||||||
|
|
||||||
# write out
|
# write out
|
||||||
confirmed_measurements_json = {
|
confirmed_measurements_json = {
|
||||||
|
@ -144,8 +149,7 @@ def process(args):
|
||||||
"confirmed": m in confirmed_measurements,
|
"confirmed": m in confirmed_measurements,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
for m in valid_measurements
|
for m in event_measurements
|
||||||
if m["distance_overtaker"] or m["distance_stationary"]
|
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -154,7 +158,7 @@ def process(args):
|
||||||
"geometry": {
|
"geometry": {
|
||||||
"type": "LineString",
|
"type": "LineString",
|
||||||
"coordinates": [
|
"coordinates": [
|
||||||
[m["latitude"], m["longitude"]] for m in valid_measurements
|
[m["latitude"], m["longitude"]] for m in track_measurements
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue