/** * Groups of Mapillary map-feature / detection values, for filters and counts. * * Values look like `regulatory--maximum-speed-limit-30--g1` (category, name, design variant) or * `object--traffic-light--general-upright`. Groups match by pattern, so new variants are covered. * Sign groups come from the iD Radnetz fork (feature 26); object and marking groups from the * Knotenpunkte plan (traffic lights, bicycle symbols, stop lines, arrows, crosswalks). */ export type MapFeatureGroup = { id: string; label: string; /** Tested against the whole value. */ pattern: RegExp; }; /** Whether a value is a traffic sign (and not an object like `object--bench`). */ export declare const isSignValue: (value: string) => boolean; /** `regulatory--maximum-speed-limit-30--g1` → `maximum-speed-limit-30`. */ export declare const signName: (value: string) => string; /** * Traffic sign groups. In Berlin (2026-09) most detected signs are in none of them (direction * and warning signs, …); use `OTHER_SIGNS_GROUP_ID` for those. */ export declare const SIGN_GROUPS: MapFeatureGroup[]; export declare const OTHER_SIGNS_GROUP_ID = "other"; /** Ids of `SIGN_GROUPS` plus `other`, in display order. */ export declare const SIGN_GROUP_IDS: readonly ['parking', 'bike', 'speed', 'access', "other"]; export type SignGroupId = (typeof SIGN_GROUP_IDS)[number]; /** Objects and markings that matter at junctions. */ export declare const JUNCTION_FEATURE_GROUPS: MapFeatureGroup[]; /** * Per-photo detection classes for junction ratings (these exist only as outlines in images, not * as map points): bike-lane surface, line markings, hatching, traffic islands. */ export declare const JUNCTION_DETECTION_GROUPS: MapFeatureGroup[]; /** Ids of the groups a value belongs to (`[]` when none). */ export declare const mapFeatureGroupIds: (value: string, groups: readonly MapFeatureGroup[]) => string[]; /** Sign group ids of a value; `other` for signs in none of the named groups. */ export declare const signGroupIds: (value: string) => string[]; /** Predicate for `filter` options: values in any of the groups. */ export declare const matchesAnyGroup: (groups: readonly MapFeatureGroup[]) => (value: string) => boolean; /** Number of features per group id, e.g. for "3 traffic lights" next to a form field. */ export declare const countByGroup: (features: readonly T[], groups: readonly MapFeatureGroup[]) => Record; /** * Filter for `filter.mapFeatureValue`: signs of the chosen groups pass; other objects always do. * `undefined` when all groups are chosen (no filtering). The function is cached per selection, so * its identity is stable and layers do not re-render on every call. */ export declare const signGroupFilter: (groups: readonly string[]) => ((value: string) => boolean) | undefined;