/** * Mapillary image keys in OSM tags (iD Radnetz fork, feature 19): which keys hold image ids, what * they are about (a road side, a traffic sign, a direction) and which image to show first. * * Key grammar: `[source:][cycleway|sidewalk[:left|:right|:both]:][traffic_sign[:forward|:backward]:]mapillary[:forward|:backward|:]` * (as in the Berlin data and TILDA's `extract_bikelanes.lua`). */ export type OsmTags = Record; export type MapillaryTagKey = { key: string; /** `source:` prefix: the image is the source of the tag, not a picture of the feature. */ source: boolean; prefix?: 'cycleway' | 'sidewalk'; side?: 'left' | 'right' | 'both'; /** Image of the traffic sign. */ trafficSign: boolean; direction?: 'forward' | 'backward'; /** `mapillary:2` */ number?: number; }; /** Parse an image key, or `undefined` for other keys (`mapillary:map_feature`, `was:mapillary`). */ export declare const parseMapillaryTagKey: (key: string) => MapillaryTagKey | undefined; /** Image ids of a value: `;`-separated, trimmed, without empty parts. */ export declare const splitMapillaryImageIds: (value: string | undefined) => string[]; /** The image keys of `tags` that have a value, in display order. */ export declare const mapillaryTagKeysOf: (tags: OsmTags) => MapillaryTagKey[]; /** Short English label: "Right bike lane · traffic sign · forward (source)". */ export declare const mapillaryTagKeyLabel: (parsed: MapillaryTagKey) => string; export type MapillaryTagImage = { imageId: string; key: MapillaryTagKey; label: string; }; /** All images in a feature's tags, in display order, each id once (first key wins). */ export declare const mapillaryImagesOfTags: (tags: OsmTags) => MapillaryTagImage[]; /** The image to show first: `mapillary:forward`, then `mapillary`, then the rest in display order. */ export declare const preferredMapillaryImageId: (tags: OsmTags) => string | undefined;