/// <summary> /// Returns the maximum speed. /// </summary> /// <returns></returns> public KilometerPerHour MaxSpeedAllowed(TagsCollection tags) { // THESE ARE THE MAX SPEEDS FOR BELGIUM. // TODO: Find a way to make this all configurable. KilometerPerHour speed = 5; // get max-speed tag if any. if (tags.TryGetMaxSpeed(out speed)) { return(speed); } string highwayType; if (TryGetHighwayType(tags, out highwayType)) { speed = this.MaxSpeedAllowed(highwayType); } return(speed); }