File tree Expand file tree Collapse file tree
OTAnalytics/plugin_datastore/track_geometry_store Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1430,6 +1430,12 @@ def _compute_intersection_points(
14301430 (pl .col (START_Y ) + pl .col (START_H ) * offset .y ).alias (PREVIOUS_Y ),
14311431 ]
14321432 )
1433+ # Segment-length math in the same coordinate space as
1434+ # INTERSECTION_X/Y. The offset is applied uniformly via
1435+ # START_W/END_W (and H counterparts); when geo column names are
1436+ # passed, the corresponding W/H values are 0 (point-based geo
1437+ # detections have no bounding box), so the offset terms vanish
1438+ # and the formula reduces to end_geo - start_geo.
14331439 .with_columns (
14341440 [
14351441 (
@@ -1449,6 +1455,9 @@ def _compute_intersection_points(
14491455 .alias (SEGMENT_LENGTH )
14501456 ]
14511457 )
1458+ # Same W/H=0 invariant applies: when geo column names are passed
1459+ # the offset terms vanish, reducing the formula to
1460+ # INTERSECTION_X - start_geo.
14521461 .with_columns (
14531462 [
14541463 (
You can’t perform that action at this time.
0 commit comments