Way

class Way : Feature

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
@Json(name = "bbox")
var bbox: List<Double>?
Link copied to clipboard

In the (abridged) Feature object shown below

Link copied to clipboard
@Json(name = "geometry")
var geometry: GeoJsonObject
Link copied to clipboard
@Json(name = "id")
var id: String?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@Json(name = "properties")
var properties: HashMap<String, Any?>?
Link copied to clipboard
@Json(name = "type")
var type: String
Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
fun direction(fromIntersection: Intersection, deviceHeading: Double): Direction

direction returns the integer direction (0-7) indicating which direction the way is relative to the device heading.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun followWays(fromIntersection: Intersection, ways: MutableList<Pair<Boolean, Way>>, depth: Int = 0, optionalEarlyPredicate: (Way, Way?) -> Boolean? = null)
Link copied to clipboard
fun getName(direction: Boolean? = null, gridState: GridState? = null, localizedContext: Context? = null, nonGenericOnly: Boolean = false): String
Link copied to clipboard
Link copied to clipboard
fun heading(fromIntersection: Intersection): Double

heading returns the heading of the way as it leaves the intersection

Link copied to clipboard

isLoopedBack is used to determine if a Way starts and ends at the same intersection.

Link copied to clipboard
fun isSidewalkConnector(intersection: Intersection, mainWay: Way?, gridState: GridState): Boolean

isSidewalkConnector returns true if this way is joining mainWay from intersection to its own sidewalk e.g. https://www.openstreetmap.org/way/958596881. If we are map matched to the sidewalk, but calling out from the perspective of mainWay, these connectors are not useful.

Link copied to clipboard
Link copied to clipboard
fun removeIntersection(intersection: Intersection)