BaseFeature

data class BaseFeature(val id: String, val tags: Map<String, String>, val geometry: List<GeometryType>, val icon: String? = null, val imageURL: String? = null, val names: List<String>, val terms: List<String> = listOf(), val includeCountryCodes: List<String> = listOf(), val excludeCountryCodes: List<String> = listOf(), val isSearchable: Boolean = true, val matchScore: Float = 1.0f, val isSuggestion: Boolean = false, val addTags: Map<String, String> = tags, val removeTags: Map<String, String> = addTags, val preserveTags: List<Regex> = listOf(), val tagKeys: Set<String> = setOf(), val addTagKeys: Set<String> = tagKeys, val removeTagKeys: Set<String> = addTagKeys) : Feature

Data class associated with the Feature interface. Represents a non-localized feature.

Constructors

Link copied to clipboard
constructor(id: String, tags: Map<String, String>, geometry: List<GeometryType>, icon: String? = null, imageURL: String? = null, names: List<String>, terms: List<String> = listOf(), includeCountryCodes: List<String> = listOf(), excludeCountryCodes: List<String> = listOf(), isSearchable: Boolean = true, matchScore: Float = 1.0f, isSuggestion: Boolean = false, addTags: Map<String, String> = tags, removeTags: Map<String, String> = addTags, preserveTags: List<Regex> = listOf(), tagKeys: Set<String> = setOf(), addTagKeys: Set<String> = tagKeys, removeTagKeys: Set<String> = addTagKeys)

Properties

Link copied to clipboard
open override val addTagKeys: Set<String>

Keys that are added to the element when selecting this feature. This can differ from tagKeys, as those are just the minimum keys necessary to match this feature. If the key is not already present, the value should be set to "yes".

Link copied to clipboard
open override val addTags: Map<String, String>

tags that are added to the element when selecting this feature. This can differ from tags, as those are just the minimum tags necessary to match this feature.

Link copied to clipboard
open override val canonicalNames: List<String>

primary names + aliases in all lowercase with stripped diacritics

Link copied to clipboard
open override val canonicalTerms: List<String>

Additional search terms or keywords in all lowercase with stripped diacritics

Link copied to clipboard
open override val excludeCountryCodes: List<String>

A list of ISO 3166-1 alpha 2 or 3-letter country codes in which this feature is not available. Empty if it available everywhere.

Link copied to clipboard
open override val geometry: List<GeometryType>

a list of possible geometry types for this feature

Link copied to clipboard
open override val icon: String? = null

icon representing the feature

Link copied to clipboard
open override val id: String

unique identifier for this feature

Link copied to clipboard
open override val imageURL: String? = null

url to image representing the feature. Usually used for brands features

Link copied to clipboard
open override val includeCountryCodes: List<String>

A list of ISO 3166-1 alpha 2 or 3-letter country codes in which this feature is available. Empty if it is available everywhere.

Link copied to clipboard
open override val isSearchable: Boolean = true

Whether this feature should be searchable. E.g. deprecated or generic features are not searchable.

Link copied to clipboard
open override val isSuggestion: Boolean = false

Whether this feature is a brand feature i.e. from the NSI

Link copied to clipboard
open override val language: String?

ISO 639 language code of this feature. null if it isn't localized.

Link copied to clipboard
open override val matchScore: Float = 1.0f

A number that ranks this preset against others that match the feature.

Link copied to clipboard
open val name: String

primary name

Link copied to clipboard
open override val names: List<String>

primary name + aliases

Link copied to clipboard
open override val preserveTags: List<Regex>

Regexes for keys of tags which should not be overwritten by addTags when selecting a feature.

Link copied to clipboard
open override val removeTagKeys: Set<String>

Keys that are removed from the element when deselecting this feature, regardless of which value was set.

Link copied to clipboard
open override val removeTags: Map<String, String>

tags that are removed from the element when deselecting this feature.

Link copied to clipboard
open override val tagKeys: Set<String>

Keys an element must have to match this feature, regardless of what is its value. E.g. the "disused amenity" feature matches with all elements with tags that have the disused:amenity key set to any value.

Link copied to clipboard
open override val tags: Map<String, String>

tags an element must have to match this feature

Link copied to clipboard
open override val terms: List<String>

Additional search terms or keywords to find this feature

Functions

Link copied to clipboard
open override fun toString(): String