-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Detailed Road Classification #507
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
6497a7a
vk-458-road-classification: added `MapboxStreeetClasses` struct
Udumft ba20396
vk-458-road-classification: replaced MapboxStreetClasses with MapboSt…
Udumft 083d779
vk-458-road-classification: CHANGELOG updated
Udumft 3b771af
vk-458-road-classification: added Incident.streetClass doc comment. U…
Udumft 0b81298
vk-458-road-classification: CHANGELOG corrected. Updated code docs fo…
Udumft 6e410e8
vk-458-road-classification: unit test updated
Udumft 01f3bfc
vk-458-road-classification: docs and changelog corrected. renamed pro…
Udumft d3f6a8a
vk-458-road-classification: removed impossible Mapbox Streets classes
Udumft 0792abf
Merge branch 'main' into vk/458-road-classification
Udumft cc3c88d
vk-458-road-classification: added explict decodable implementation fo…
Udumft File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
|
||
import Foundation | ||
|
||
/// A road classification according to the [Mapbox Streets source](https://docs.mapbox.com/vector-tiles/reference/mapbox-streets-v8/#road) , version 8. | ||
public enum MapboxStreetsRoadClass: String, Codable { | ||
/// High-speed, grade-separated highways | ||
case motorway = "motorway" | ||
/// Link roads/lanes/ramps connecting to motorways | ||
case motorwayLink = "motorway_link" | ||
/// Important roads that are not motorways. | ||
case trunk = "trunk" | ||
/// Link roads/lanes/ramps connecting to trunk roads | ||
case trunkLink = "trunk_link" | ||
/// A major highway linking large towns. | ||
case primary = "primary" | ||
/// Link roads/lanes connecting to primary roads | ||
case primaryLink = "primary_link" | ||
/// A highway linking large towns. | ||
case secondary = "secondary" | ||
/// Link roads/lanes connecting to secondary roads | ||
case secondaryLink = "secondary_link" | ||
/// A road linking small settlements, or the local centres of a large town or city. | ||
case tertiary = "tertiary" | ||
/// Link roads/lanes connecting to tertiary roads | ||
case tertiaryLink = "tertiary_link" | ||
/// Standard unclassified, residential, road, and living_street road types | ||
case street = "street" | ||
/// Streets that may have limited or no access for motor vehicles. | ||
case streetLimited = "street_limited" | ||
/// Includes pedestrian streets, plazas, and public transportation platforms. | ||
case pedestrian = "pedestrian" | ||
/// Includes motor roads under construction (but not service roads, paths, etc. | ||
case construction = "construction" | ||
/// Roads mostly for agricultural and forestry use etc. | ||
case track = "track" | ||
/// Access roads, alleys, agricultural tracks, and other services roads. Also includes parking lot aisles, public & private driveways. | ||
case service = "service" | ||
/// Those that serves automobiles and no or unspecified automobile service. | ||
case ferry = "ferry" | ||
/// Foot paths, cycle paths, ski trails. | ||
case path = "path" | ||
/// Railways, including mainline, commuter rail, and rapid transit. | ||
case majorRail = "major_rail" | ||
/// Includes light rail & tram lines. | ||
case minorRail = "minor_rail" | ||
/// Yard and service railways. | ||
case serviceRail = "service_rail" | ||
/// Ski lifts, gondolas, and other types of aerialway. | ||
case aerialway = "aerialway" | ||
/// The approximate centerline of a golf course hole | ||
case golf = "golf" | ||
Comment on lines
+42
to
+51
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In case you’re wondering how these classes would ever come up: railroads are sometimes used as driveways in rural areas (but would have to be tagged with the appropriate access tags to be included in a route), and theoretically a ski lift could be part of a pedestrian route. |
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is fine because adding new road classes is a rare event and the new value wouldn’t be immediately useful in the navigation SDK anyways. However, if we ever learn of a plan to add new road classes in Streets source v8.x, we should proactively implement the
other
case with an associated value, similar to what’s proposed in #506 (comment). Not necessary just yet though.