Ignore traffic lights to the south

This commit is contained in:
Tobias Eidelpes 2021-06-09 18:27:11 +02:00
parent 597feaead8
commit dc91e5e6eb

View File

@ -54,16 +54,19 @@ def get_traffic_lights_geo():
}}, }},
{"$redact": { {"$redact": {
"$cond": { "$cond": {
"if": {"$lte": ["$calculatedRange", "$range"]}, "if": {
"$lte": ["$calculatedRange", "$range"]
},
"then": "$$KEEP", "then": "$$KEEP",
"else": "$$PRUNE" "else": "$$PRUNE"
} }
}} }}
] ]
) )
if lat < traffic_light['location'][1]
] ]
return json_util.dumps({'cursor': traffic_lights}) return json_util.dumps({'cursor': traffic_lights[:1]})
if __name__ == '__main__': if __name__ == '__main__':