developmentseed / developmentseed/cng-sandbox

feat: trajectory / GPS track ingestion and animated playback

Open
#403 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
TypeScript
Stars
3
Forks
0
Avg merge
2h 21m
Merged PRs (30d)
3

Description

## User feedback

> It would be great to have a framework that plugs in Open Source libraries. For example, something that plugs in MovingPandas or other GPS track libraries to show and tell the story of movement over time.

## Problem

CNG Sandbox has no support for GPS track or trajectory data. Users with movement datasets (vessel tracks, wildlife telemetry, vehicle routes, field surveys) have no way to upload, visualize, or build stories around them.

## Proposed solution

Add first-class trajectory data support using [MovingPandas](https://movingpandas.org/) as the ingestion library.

### Ingestion

- Accept GPX files and CSV files with lat/lon/time columns as new input formats
- Use MovingPandas to parse, validate, and clean trajectories
- Store as GeoParquet (one row per point, with `trajectory_id` and `timestamp` columns) so tipg can serve it as vector tiles

### Visualization

- New `TrajectoryLayer` in the frontend (deck.gl `PathLayer` or `TripsLayer`) that renders animated movement
- Temporal scrubber to play/pause/seek through time
- Optional: speed-coded color (slow → fast gradient)

### Stories

- Trajectory datasets usable in story chapters like any other dataset
- Chapter config supports animation start/end time and playback speed

## Scope notes

- "Plugin framework" framing from the feedback is deferred — start with MovingPandas as a concrete implementation. Generalize later if other libraries (e.g. `traja`, `scikit-mobility`) are requested.
- Frontend temporal playback may overlap with or extend the existing temporal raster controls.
- GPX is the highest-priority input format; CSV support can follow.

## Open questions

- Should trajectories be stored as lines (one row per track) or points (one row per ping)? Points are more flexible for animation; lines are simpler for static display.
- Does this need a new dataset `type` in the backend model, or can it live under the existing `vector` type with extra metadata?

Contributor guide

Open the contributing guide

Research direction

The issue names no files or tests. Start by mapping the existing ingestion path, backend dataset model, story chapter configuration, and temporal raster controls mentioned in the proposal. Done would require an agreed trajectory storage model plus GPX ingestion, frontend playback, and story support, with the open design questions resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, typescript
Domain
backend, data, frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.