Skip to content

Materialized route geometries#519

Merged
irees merged 4 commits intomainfrom
materialized-route-geoms
Oct 21, 2025
Merged

Materialized route geometries#519
irees merged 4 commits intomainfrom
materialized-route-geoms

Conversation

@irees
Copy link
Copy Markdown
Contributor

@irees irees commented Oct 21, 2025

No description provided.

@irees irees requested a review from Copilot October 21, 2025 23:39
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds materialized route geometries to improve spatial search capabilities. The implementation conditionally simplifies geometries in PostGIS while storing full geometries in SQLite.

Key Changes:

  • Added a SupportsSpatialFunctions() method to database adapters to differentiate PostGIS-enabled PostgreSQL from SQLite
  • Introduced geometry_simplified column to the tl_materialized_active_routes table with appropriate spatial indexing in PostgreSQL
  • Refactored materialization queries to use maps for column definitions, enabling conditional geometry processing

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tldb/adapter.go Added SupportsSpatialFunctions() interface method
tldb/postgres/postgres.go Implemented spatial functions support returning true for PostGIS
tldb/sqlite/sqlite.go Implemented spatial functions support returning false
schema/postgres/migrations/20251021000001_add_route_geometry_columns.up.pgsql Added geometry column and spatial index to materialized routes table
schema/sqlite/sqlite.sql Added geometry_simplified BLOB column to materialized routes table
internal/feedstate/manager.go Refactored materialization logic to support conditional geometry simplification

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@irees irees marked this pull request as ready for review October 21, 2025 23:50
@irees irees merged commit 1a71a49 into main Oct 21, 2025
6 checks passed
@irees irees deleted the materialized-route-geoms branch October 21, 2025 23:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants