LC044 / LC044/TrailSnap

feat(location): 智能行程聚合 — 将连续多天的同地区照片自动归为一个 Trip

Open
#63 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement status: pending-review
Dominant language
Python
Stars
739
Forks
97
Avg merge
10h 3m
Merged PRs (30d)
82

Description

功能描述

当前 timeline 是按天聚合的,如果同一次旅行跨越多天但都在同一城市,会拆成很多节点。增加"行程(Trip)"概念:连续多天在同一地区(或相邻地区)的照片自动归为一个行程。

实现思路

  • timeline_nodes 按时间排序后,如果相邻节点地理位置接近(如 < 100km)且时间连续(间隔 < 3天),就合并为一个 Trip
  • 后端新增 /api/locations/trips 接口,返回聚合后的行程列表
  • 每个 Trip 包含:起止日期、覆盖的城市/景区列表、照片数量、代表性照片
  • 前端在 timeline 视图中增加"按行程"聚合模式,可折叠展开查看每日详情
  • 轨迹视图也可按 Trip 维度展示,不同行程用不同颜色区分

优先级

中 — 解决 timeline 碎片化问题,但算法需要调参

依赖

  • 需要后端新增 Trip 聚合逻辑和 API

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or existing entry points are named. Start by tracing how timeline_nodes are aggregated and how location data is exposed, then design the backend /api/locations/trips response and the timeline and track views around it. Done means consecutive nearby days form Trips with dates, places, photo counts, and representative photos, while daily details remain expandable and Trips are visually distinguished.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend-api-design, frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.