Skip to content

Implement shape data retrieval and GeoJSON conversion - #31

Merged
chtitux merged 3 commits into
mainfrom
claude/add-shapes-geojson-methods-01U5hJh5LmzQcKNauVss6Paw
Nov 27, 2025
Merged

chtitux merged 3 commits into
mainfrom
claude/add-shapes-geojson-methods-01U5hJh5LmzQcKNauVss6Paw

Conversation

@chtitux

@chtitux chtitux commented Nov 27, 2025

Copy link
Copy Markdown
Contributor

No description provided.

Implement shape query methods following the same pattern as getTrips:
- getShapes: Query shape points with filters (shapeId, routeId, tripId, limit)
- getShapesToGeojson: Convert shapes to GeoJSON FeatureCollection with
  configurable coordinate precision (default 6 decimals)

GeoJSON features include route properties (route_id, route_short_name,
route_long_name, route_type, route_color) from the first matching route
for each shape.
- Add 25 unit tests for getShapes and getShapesToGeojson methods
- Add shape test data (SHAPE1, SHAPE2) to test database helper
- Update README with shape query documentation and examples
- Document GeoJSON output format and precision options
- Update API reference and TypeScript types section
@chtitux
chtitux merged commit 7912bef into main Nov 27, 2025
4 checks passed
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