Skip to content

feat(geocoding): add forward geocode method - #15

Merged
odsod merged 1 commit into
mainfrom
feat-forward-geocode
Aug 7, 2026
Merged

odsod merged 1 commit into
mainfrom
feat-forward-geocode

Conversation

@odsod

@odsod odsod commented Aug 7, 2026

Copy link
Copy Markdown
Member

Summary

  • Add Geocode() method to the client, calling Mapbox Geocoding v6 forward endpoint
  • Supports all optional params: countries, types, limit, language, bbox, proximity, autocomplete
  • Reuses existing FeatureCollection response type and Coordinate struct from mapmatching

Motivation

The backend GeocodingService needs forward geocoding for bulk location imports (address -> coordinate). This pairs with a new GeocodeAddress RPC being added to the Way backend that caches results permanently.

Test plan

  • Unit tests for query param serialization
  • Unit tests for response parsing (Finnish address)
  • Unit tests for empty query validation
  • Unit tests for HTTP error propagation
  • Unit tests for autocomplete=false param
  • All existing tests still pass
  • Lint clean

Add `Geocode()` to the client, calling the Mapbox Geocoding v6 forward
endpoint (`GET /search/geocode/v6/forward`).

- Supports all optional params: countries, types, limit, language, bbox,
  proximity, autocomplete
- Reuses existing `FeatureCollection` response type and `Coordinate` struct
- Uses `permanent=true` for infinite retention when specified
@odsod
odsod merged commit 3abd9e7 into main Aug 7, 2026
1 check passed
@odsod
odsod deleted the feat-forward-geocode branch August 7, 2026 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants