From 22254765831204d7dc63b5f710e6b5def491f247 Mon Sep 17 00:00:00 2001 From: jlayec Date: Sat, 20 Mar 2021 22:04:36 +0000 Subject: [PATCH] fix positions url when coordinates are not available in a record --- MyPSACC.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MyPSACC.py b/MyPSACC.py index 103fd4f..05b3965 100644 --- a/MyPSACC.py +++ b/MyPSACC.py @@ -619,6 +619,8 @@ class MyPSACC: res = conn.execute('SELECT * FROM position ORDER BY Timestamp') features_list = [] for row in res: + if row["longitude"] is None or row["latitude"] is None: + continue feature = Feature(geometry=Point((row["longitude"], row["latitude"])), properties={"vin": row["vin"], "date": row["Timestamp"].strftime("%x %X"), "mileage": row["mileage"],