Spaces:
Sleeping
Sleeping
LapStore
commited on
Commit
·
f5f278d
1
Parent(s):
6069409
modified api resonse
Browse files- traffic_utils.py +2 -2
traffic_utils.py
CHANGED
|
@@ -28,8 +28,8 @@ def get_traffic_in_container(coordinates):
|
|
| 28 |
|
| 29 |
|
| 30 |
def get_rectangle_container(coordinates):
|
| 31 |
-
|
| 32 |
-
|
| 33 |
min_lat, max_lat = min(lats), max(lats)
|
| 34 |
min_lon, max_lon = min(lons), max(lons)
|
| 35 |
return min_lat, max_lat, min_lon, max_lon
|
|
|
|
| 28 |
|
| 29 |
|
| 30 |
def get_rectangle_container(coordinates):
|
| 31 |
+
lats = [i for i, _ in coordinates] # lats as it from mobile app take lats first
|
| 32 |
+
lons = [i for _, i in coordinates]
|
| 33 |
min_lat, max_lat = min(lats), max(lats)
|
| 34 |
min_lon, max_lon = min(lons), max(lons)
|
| 35 |
return min_lat, max_lat, min_lon, max_lon
|