trails/packages/db
Ullrich Schäfer b4c3f97296
Populate PostGIS geom column from GPX track data
Extract coordinates from parsed GPX tracks and store as PostGIS
LineString geometry via ST_GeomFromGeoJSON. Applied to:
- createRoute / updateRoute (routes.server.ts)
- createActivity / createRouteFromActivity (activities.server.ts)

Adds lineStringFromCoords() helper to the journal schema that
builds the SQL expression from [lon, lat] coordinate pairs.

Unblocks spatial queries (e.g. route discovery via ST_Intersects).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 17:05:02 +01:00
..
src Populate PostGIS geom column from GPX track data 2026-04-02 17:05:02 +01:00
drizzle.config.ts Add local dev setup, fix BRouter Dockerfile, archive change (#12) 2026-03-22 23:11:43 +00:00
package.json Add Drizzle ORM with shared db package (#10) 2026-03-22 22:35:50 +00:00
tsconfig.json Add Drizzle ORM with shared db package (#10) 2026-03-22 22:35:50 +00:00