Legal Default Speeds
class LegalDefaultSpeeds(roadTypesByName: Map<String, RoadTypeFilter>, speedLimitsByCountryCode: Map<String, List<RoadType>>)
Content copied to clipboard
Class with which to look up the default speed limits per country as specified in the given data (usually default_speed_limits.json)
Constructors
Link copied to clipboard
fun LegalDefaultSpeeds(roadTypesByName: Map<String, RoadTypeFilter>, speedLimitsByCountryCode: Map<String, List<RoadType>>)
Content copied to clipboard
Types
Link copied to clipboard
data class Result( val roadTypeName: String?, val tags: Map<String, String>, val certitude: Certitude)
Content copied to clipboard
The result of looking for the speed limits via getSpeedLimits. It includes the road type name, the maxspeed tags that road type is assumed to have implicitly and a Certitude.
Functions
Link copied to clipboard
fun getSpeedLimits( countryCode: String, tags: Map<String, String>, relationsTags: List<Map<String, String>> = emptyList(), replacerFn: (name: String, evaluate: () -> Boolean) -> Boolean = { _, ev -> ev() }): LegalDefaultSpeeds.Result?
Content copied to clipboard
Given a country/subdivision and a set of tags on the road (segment), will return a set of additional maxspeed tags the road can be assumed to have based on other properties of the road or (optionally) of which relations it is a member of. Returns null if nothing was found.