OSM tag-to-profile mapping + TransformNode wiring#97
Conversation
Pure function reads accessibility tags from a POI node and produces a profile or nil. Covers wheelchair, toilets:wheelchair, capacity:disabled, automatic_door, step_count + entrance:step_count, ramp/ramp:wheelchair, and elevator. No graph traversal — POI-node only for v1. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
When mapTagsToProfile returns a non-nil profile, set it on Place.Accessibility before emitting. Signature unchanged; downstream code already handles Accessibility being optional. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Claude finished @koinsaari's task in 5m 37s —— View job Code Review
SummaryThe 🔴 Important —
|
TransformNode now returns (*Place, *AccessibilityProfile, error) instead of embedding the profile on Place.Accessibility. Profile and place are independent values — keeping them separate prevents GORM from trying to cascade-create accessibility_profiles rows through UpsertBatch. Also: capacity:disabled=0 preserves Count=0 to distinguish confirmed-zero from unknown; ramp=yes alone is documented as returning nil via a new test. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Claude finished @koinsaari's task in 3m 49s —— View job Code Review
SummaryThe 🔴 Important — computed profile is discarded in
|
Summary
internal/sources/osm/a11y.gowith a puremapTagsToProfilefunction that translates POI-node accessibility tags into a*models.AccessibilityProfile(ornilwhen no signal is present)wheelchair,toilets:wheelchair,capacity:disabled,parking:disabled,automatic_door,step_count/entrance:step_count,ramp/ramp:wheelchair,elevatorTransformNodenow setsPlace.AccessibilityviamapTagsToProfile; signature unchangedTest plan
go test ./internal/sources/osm/... -v— all 71 tests passgo test ./internal/... ./pkg/... ./cmd/api/...— 276 tests passPart of #10.
🤖 Generated with Claude Code