This page contains notes to myself about working with driving log data; hopefully others will also find it useful.
QGIS Track Editing
- QGIS is able to merge multiple line features into a single line, using Edit > Edit Geometry > Merge Selected Features.
- QGIS does not automatically close gaps when merging lines. Before merging, a third line needs to be created, snapped to the endpoints of the gap.
- The merge functionality provides a dialog allowing selection of which pre-merge feature each attribute should come from for the merged feature. Be careful to make sure the earliest utc_start and latest utc_stop are selected.
- If columns need to be reordered in the future, QGIS can do so with Processing > Toolbox > Vector table > Refactor fields.
LineString vs. MultiLineString
GPX files allow multiple disconnected track segments (trkseg) in the same track, effectively replicating the functionality of a MultiLineString. Although entire process is set up already to split disconnected segments into their own tracks, some GIS software has difficulty with LineStrings crossing the 180th meridian, so each track should still be stored as a MultiLineString so it can be split at the 180th meridian if necessary.
GeoPandas
- When reading relational data from a GeoPackage with
geopandas.read_file, be sure to setfid_as_index=True. Otherwise, GeoPandas will create its own ID values for the GeoDataFrame.