You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
The segmentation function split_timedelta, in combination with _splits_idx and _segment_rng, produce incomplete segments when processing AIS data. This issue potentially removes useful vessel information from the segmented tracks, leaving the incomplete visualization of vessel movements.
Sample code to reproduce the issue
MMSI = 636018124
# Set the start and end times for the query
start_time = datetime.strptime("2018-01-01 00:00:00", '%Y-%m-%d %H:%M:%S')
end_time = datetime.strptime("2018-01-31 00:00:00", '%Y-%m-%d %H:%M:%S')
with aisdb.SQLiteDBConn(dbpath=dbpath) as dbconn:
qry = aisdb.DBQuery(
dbconn=dbconn,
dbpath='./data/meridian_2018_vacuumed.db',
start=start_time,
end=end_time,
mmsi = MMSI,
callback=aisdb.database.sqlfcn_callbacks.in_timerange_hasmmsi,
)
rowgen = qry.gen_qry()
tracks = aisdb.track_gen.TrackGen(rowgen, decimate=False)
# Split the tracks into segments based on the maximum time interval
track_segments = aisdb.split_timedelta(tracks, timedelta(hours=24))
aisdb.web_interface.visualize(
track_segments,
domain=domain,
visualearth=True,
open_browser=True,
)
Before segmentation:
After segmentation with 24 hours as the max time interval:
Expected output is for the trajectory to be split into multiple single-voyage track segments. However, the actual output may only contain partial segments of these expected trajectories.
The text was updated successfully, but these errors were encountered:
Description
The segmentation function
split_timedelta
, in combination with_splits_idx
and_segment_rng
, produce incomplete segments when processing AIS data. This issue potentially removes useful vessel information from the segmented tracks, leaving the incomplete visualization of vessel movements.Sample code to reproduce the issue
Before segmentation:

After segmentation with 24 hours as the max time interval:

Expected output is for the trajectory to be split into multiple single-voyage track segments. However, the actual output may only contain partial segments of these expected trajectories.
The text was updated successfully, but these errors were encountered: