mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-22 02:46:42 +02:00
feat(geocoding): auto-categorize places via Pelias taxonomy
Pelias hides the 'category' field from API responses unless the caller filters by categories=... explicitly — a default intended for keyword search that strips category metadata from address queries. Patch the Pelias API's geojsonify_place_details.js so the category array is returned on every feature (food, retail, transport, …), mounted into the container as a read-only volume override. Rewrite category-map.ts to map Pelias' OSM taxonomy to our 7 PlaceCategories using a priority-ordered list so a restaurant tagged ['food','retail','nightlife'] resolves to 'food' (the most specific), not 'shopping'. Verified with Konstanz test queries: Konzil Restaurant → food Bahnhof Konstanz → transit Physiotherapie-Schule → work MX-Park → leisure Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
1293756bbf
commit
e82b5c1449
5 changed files with 195 additions and 156 deletions
|
|
@ -31,8 +31,8 @@ export interface GeocodingResult {
|
|||
country?: string;
|
||||
};
|
||||
category: PlaceCategory;
|
||||
osmCategory?: string;
|
||||
osmType?: string;
|
||||
/** Raw Pelias categories (food, retail, transport, …) */
|
||||
peliasCategories?: string[];
|
||||
confidence: number;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue