fix slow position grabbing
This commit is contained in:
parent
c6d1d51b00
commit
8975c158a5
2 changed files with 8 additions and 15 deletions
|
|
@ -190,17 +190,11 @@ def write_course_geometry(polyline_str: str, course_id: int, ts: datetime) -> st
|
|||
wkb_arr = ga.as_wkb([wkt])
|
||||
|
||||
# 4) Cast into a WkbType with EPSG:4326 built in
|
||||
wkb_with_crs = wkb_arr.cast(
|
||||
ga.wkb().with_crs("EPSG:4326")
|
||||
)
|
||||
wkb_with_crs = wkb_arr.cast(ga.wkb().with_crs("EPSG:4326"))
|
||||
|
||||
# 5) Build a 1-row table
|
||||
table = pa.Table.from_arrays(
|
||||
[
|
||||
pa.array([ts]),
|
||||
pa.array([course_id]),
|
||||
wkb_with_crs
|
||||
],
|
||||
[pa.array([ts]), pa.array([course_id]), wkb_with_crs],
|
||||
names=["fetch_date", "course_id", "geometry"],
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue