diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 2a261df..3046cc8 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -14,8 +14,8 @@ android { applicationId = "com.kouros.navigation" minSdk = 33 targetSdk = 36 - versionCode = 23 - versionName = "0.1.3.23" + versionCode = 28 + versionName = "0.1.3.28" base.archivesName = "navi-$versionName" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" } diff --git a/app/src/main/java/com/kouros/navigation/ui/MainActivity.kt b/app/src/main/java/com/kouros/navigation/ui/MainActivity.kt index c99ff1e..127f43b 100644 --- a/app/src/main/java/com/kouros/navigation/ui/MainActivity.kt +++ b/app/src/main/java/com/kouros/navigation/ui/MainActivity.kt @@ -43,8 +43,8 @@ import com.kouros.data.R import com.kouros.navigation.MainApplication.Companion.navigationViewModel import com.kouros.navigation.data.Constants import com.kouros.navigation.data.Constants.DESTINATION_ARRIVAL_DISTANCE -import com.kouros.navigation.data.Constants.home2Location -import com.kouros.navigation.data.Constants.homeLocation +import com.kouros.navigation.data.Constants.homeHohenwaldeck +import com.kouros.navigation.data.Constants.homeVogelhart import com.kouros.navigation.data.StepData import com.kouros.navigation.model.BaseStyleModel import com.kouros.navigation.model.MockLocation @@ -62,7 +62,6 @@ import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.delay import kotlinx.coroutines.launch import org.joda.time.DateTime -import org.koin.androidx.viewmodel.ext.android.viewModel import org.maplibre.compose.camera.CameraPosition import org.maplibre.compose.location.DesiredAccuracy import org.maplibre.compose.location.Location @@ -89,10 +88,12 @@ class MainActivity : ComponentActivity() { val observer = Observer { newRoute -> if (newRoute.isNotEmpty()) { routeModel.startNavigation(newRoute, applicationContext) - routeData.value = routeModel.route.routeGeoJson - simulate() - //test() - ///gpx(applicationContext) + routeData.value = routeModel.curRoute.routeGeoJson + if (useMock) { + simulate() + //test() + ///gpx(applicationContext) + } } } val cameraPosition = MutableLiveData( @@ -109,8 +110,6 @@ class MainActivity : ComponentActivity() { private var loadRecentPlaces = false - private var overpass = false - lateinit var baseStyle: BaseStyle.Json init { @@ -132,8 +131,8 @@ class MainActivity : ComponentActivity() { if (useMock) { mock = MockLocation(locationManager) mock.setMockLocation( - home2Location.latitude, - home2Location.longitude + homeHohenwaldeck.latitude, + homeHohenwaldeck.longitude ) } } @@ -157,7 +156,7 @@ class MainActivity : ComponentActivity() { Content() // auto navigate if (useMock) { - //navigationViewModel.loadRoute(applicationContext, homeLocation, home2Location, 0F) + navigationViewModel.loadRoute(applicationContext, homeHohenwaldeck, homeVogelhart, 0F) } }, ) @@ -255,7 +254,7 @@ class MainActivity : ComponentActivity() { if (isNavigating()) { updateLocation(currentLocation, navigationViewModel) stepData.value = currentStep() - if (route.currentStep + 1 <= legs.steps.size) { + if (route.currentStep + 1 <= curLeg.steps.size) { nextStepData.value = nextStep() } if (maneuverType in 39..42 @@ -284,8 +283,8 @@ class MainActivity : ComponentActivity() { } fun stopNavigation(closeSheet: () -> Unit) { - val latitude = routeModel.route.waypoints!![0][1] - val longitude = routeModel.route.waypoints!![0][0] + val latitude = routeModel.curRoute.waypoints[0][1] + val longitude = routeModel.curRoute.waypoints[0][0] closeSheet() routeModel.stopNavigation() if (useMock) { @@ -325,10 +324,10 @@ class MainActivity : ComponentActivity() { fun simulate() { CoroutineScope(Dispatchers.IO).launch { - for ((index, waypoint) in routeModel.route.waypoints!!.withIndex()) { + for ((index, waypoint) in routeModel.curRoute.waypoints.withIndex()) { if (routeModel.isNavigating()) { var deviation = 0.0 - if (index in 0..routeModel.route.waypoints!!.size) { + if (index in 0..routeModel.curRoute.waypoints.size) { mock.setMockLocation(waypoint[1] + deviation, waypoint[0]) delay(500L) // } @@ -338,7 +337,7 @@ class MainActivity : ComponentActivity() { } fun test() { - for ((index, step) in routeModel.legs.steps.withIndex()) { + for ((index, step) in routeModel.curLeg.steps.withIndex()) { if (index in 3..3) { for ((windex, waypoint) in step.maneuver.waypoints.withIndex()) { routeModel.updateLocation( @@ -349,7 +348,7 @@ class MainActivity : ComponentActivity() { if (step.leftStepDistance == 70.0) { println("") } - if (index + 1 <= routeModel.legs.steps.size) { + if (index + 1 <= routeModel.curLeg.steps.size) { //nextStepData.value = routeModel.nextStep() } } diff --git a/common/car/src/main/java/com/kouros/navigation/car/NavigationSession.kt b/common/car/src/main/java/com/kouros/navigation/car/NavigationSession.kt index 2350c8d..a44ab26 100644 --- a/common/car/src/main/java/com/kouros/navigation/car/NavigationSession.kt +++ b/common/car/src/main/java/com/kouros/navigation/car/NavigationSession.kt @@ -115,7 +115,6 @@ class NavigationSession : Session(), NavigationScreen.Listener { } } - val carSpeedListener = OnCarDataAvailableListener { data -> if (data.displaySpeedMetersPerSecond.status == CarValue.STATUS_SUCCESS) { val speed = data.displaySpeedMetersPerSecond.value @@ -184,7 +183,7 @@ class NavigationSession : Session(), NavigationScreen.Listener { val useCarLocation = getBooleanKeyValue(carContext, CAR_LOCATION) if (useCarLocation) { val carSensors = carContext.getCarService(CarHardwareManager::class.java).carSensors - carSensors.addCompassListener(CarSensors.UPDATE_RATE_FASTEST, + carSensors.addCompassListener(CarSensors.UPDATE_RATE_NORMAL, carContext.mainExecutor, carCompassListener) carSensors.addCarHardwareLocationListener( diff --git a/common/car/src/main/java/com/kouros/navigation/car/SurfaceRenderer.kt b/common/car/src/main/java/com/kouros/navigation/car/SurfaceRenderer.kt index 34425c5..1f6dc42 100644 --- a/common/car/src/main/java/com/kouros/navigation/car/SurfaceRenderer.kt +++ b/common/car/src/main/java/com/kouros/navigation/car/SurfaceRenderer.kt @@ -30,7 +30,7 @@ import com.kouros.navigation.car.map.getPaddingValues import com.kouros.navigation.car.map.rememberBaseStyle import com.kouros.navigation.car.navigation.RouteCarModel import com.kouros.navigation.data.Constants.ROUTING_ENGINE -import com.kouros.navigation.data.Constants.homeLocation +import com.kouros.navigation.data.Constants.homeVogelhart import com.kouros.navigation.data.ObjectBox import com.kouros.navigation.data.RouteEngine import com.kouros.navigation.model.RouteModel @@ -55,11 +55,11 @@ class SurfaceRenderer( var lastLocation = location(0.0, 0.0) - var carOrientation = 0F + var carOrientation = 999F private val cameraPosition = MutableLiveData( CameraPosition( zoom = 15.0, - target = Position(latitude = homeLocation.latitude, longitude = homeLocation.longitude) + target = Position(latitude = homeVogelhart.latitude, longitude = homeVogelhart.longitude) ) ) private var visibleArea = MutableLiveData( @@ -245,11 +245,14 @@ class SurfaceRenderer( fun updateLocation(location: Location) { synchronized(this) { if (viewStyle == ViewStyle.VIEW || viewStyle == ViewStyle.PAN_VIEW) { - val bearing = bearing( + val bearing = if (carOrientation == 999F) + bearing( lastLocation, location, cameraPosition.value!!.bearing - ) + ) else { + carOrientation.toDouble() + } val zoom = if (viewStyle == ViewStyle.VIEW) { calculateZoom(location.speed.toDouble()) } else { @@ -281,16 +284,16 @@ class SurfaceRenderer( } fun setRouteData() { - routeData.value = routeModel.route.routeGeoJson + routeData.value = routeModel.curRoute.routeGeoJson viewStyle = ViewStyle.VIEW } fun setPreviewRouteData(routeModel: RouteModel) { viewStyle = ViewStyle.PREVIEW with(routeModel) { - routeData.value = route.routeGeoJson - centerLocation = route.centerLocation - previewDistance = route.summary!!.distance + routeData.value = curRoute.routeGeoJson + centerLocation = curRoute.centerLocation + previewDistance = curRoute.summary.distance } updateCameraPosition( 0.0, diff --git a/common/car/src/main/java/com/kouros/navigation/car/map/MapView.kt b/common/car/src/main/java/com/kouros/navigation/car/map/MapView.kt index eb0416d..bff662c 100644 --- a/common/car/src/main/java/com/kouros/navigation/car/map/MapView.kt +++ b/common/car/src/main/java/com/kouros/navigation/car/map/MapView.kt @@ -158,21 +158,31 @@ fun RouteLayer(routeData: String?) { @Composable fun AmenityLayer(routeData: String?) { if (routeData != null && routeData.isNotEmpty()) { - val color = if (routeData.contains(Constants.PHARMACY)) { - const(Color.Red) - } else if (routeData.contains(Constants.CHARGING_STATION)) { - const(Color.Blue) - } else { - const(Color.Black) + var color = const(Color.Red) + var img = image(painterResource(R.drawable.local_pharmacy_48px), drawAsSdf = true) + if (routeData.contains(Constants.CHARGING_STATION)) { + color = const(Color.Green) + img = image(painterResource(R.drawable.ev_station_48px), drawAsSdf = true) + } else if (routeData.contains(Constants.FUEL_STATION)){ + color = const(Color.Black) + img = image(painterResource(R.drawable.local_gas_station_48px), drawAsSdf = true) } val routes = rememberGeoJsonSource(GeoJsonData.JsonString(routeData)) SymbolLayer( id = "amenity-layer", source = routes, - iconImage = image(painterResource(R.drawable.ev_station_48px), drawAsSdf = true), + iconImage = img, iconColor = color, iconOpacity = const(2.0f), - iconSize = const(3.0f), + iconSize = + interpolate( + type = exponential(1.2f), + input = zoom(), + 5 to const(0.7f), + 6 to const(1.0f), + 7 to const(2.0f), + 20 to const(4f), + ), ) } } diff --git a/common/car/src/main/java/com/kouros/navigation/car/screen/NavigationScreen.kt b/common/car/src/main/java/com/kouros/navigation/car/screen/NavigationScreen.kt index 1da09ce..279c13e 100644 --- a/common/car/src/main/java/com/kouros/navigation/car/screen/NavigationScreen.kt +++ b/common/car/src/main/java/com/kouros/navigation/car/screen/NavigationScreen.kt @@ -450,7 +450,7 @@ class NavigationScreen( invalidate() val mainThreadHandler = Handler(carContext.mainLooper) mainThreadHandler.post { - object : CountDownTimer(3000, 1000) { + object : CountDownTimer(2000, 1000) { override fun onTick(millisUntilFinished: Long) {} override fun onFinish() { navigationType = NavigationType.NAVIGATION diff --git a/common/car/src/main/java/com/kouros/navigation/car/screen/RoutePreviewScreen.kt b/common/car/src/main/java/com/kouros/navigation/car/screen/RoutePreviewScreen.kt index 3c6a2fb..233ede8 100644 --- a/common/car/src/main/java/com/kouros/navigation/car/screen/RoutePreviewScreen.kt +++ b/common/car/src/main/java/com/kouros/navigation/car/screen/RoutePreviewScreen.kt @@ -6,11 +6,10 @@ import androidx.annotation.DrawableRes import androidx.car.app.CarContext import androidx.car.app.CarToast import androidx.car.app.Screen +import androidx.car.app.constraints.ConstraintManager import androidx.car.app.model.Action import androidx.car.app.model.Action.FLAG_DEFAULT -import androidx.car.app.model.Action.FLAG_PRIMARY import androidx.car.app.model.ActionStrip -import androidx.car.app.model.CarColor import androidx.car.app.model.CarIcon import androidx.car.app.model.CarText import androidx.car.app.model.DurationSpan @@ -18,19 +17,17 @@ import androidx.car.app.model.Header import androidx.car.app.model.ItemList import androidx.car.app.model.ListTemplate import androidx.car.app.model.MessageTemplate +import androidx.car.app.model.OnClickListener import androidx.car.app.model.Row import androidx.car.app.model.Template import androidx.car.app.navigation.model.MapController import androidx.car.app.navigation.model.MapWithContentTemplate -import androidx.car.app.navigation.model.NavigationTemplate -import androidx.car.app.navigation.model.RoutingInfo import androidx.core.graphics.drawable.IconCompat import androidx.lifecycle.Observer import com.kouros.data.R import com.kouros.navigation.car.SurfaceRenderer import com.kouros.navigation.car.navigation.NavigationMessage import com.kouros.navigation.car.navigation.RouteCarModel -import com.kouros.navigation.data.NavigationRepository import com.kouros.navigation.data.Place import com.kouros.navigation.model.ViewModel import com.kouros.navigation.utils.location @@ -79,9 +76,14 @@ class RoutePreviewScreen( .setFlags(FLAG_DEFAULT) .setIcon(navigateActionIcon) .setOnClickListener { this.onNavigate() } - .build() + val itemListBuilder = ItemList.Builder() + var i = 0 + routeModel.route.routes.forEach { it -> + itemListBuilder.addItem(createRow(i++, navigateAction)) + } + val header = Header.Builder() .setStartHeaderAction(Action.BACK) .setTitle(carContext.getString(R.string.route_preview)) @@ -93,30 +95,40 @@ class RoutePreviewScreen( ) .build() - val message = if (routeModel.isNavigating() && routeModel.route.waypoints!!.isNotEmpty()) { - createRouteText() - } else { - CarText.Builder("Wait") - .build() - } - val messageTemplate = MessageTemplate.Builder( - message - ) - .setHeader(header) - .addAction(navigateAction) - .setLoading(message.toString() == "Wait") - .build() - - val timer = object : CountDownTimer(5000, 1000) { - override fun onTick(millisUntilFinished: Long) {} - override fun onFinish() { - //onNavigate() + val message = + if (routeModel.isNavigating() && routeModel.curRoute.waypoints!!.isNotEmpty()) { + createRouteText(0) + } else { + CarText.Builder("Wait") + .build() } + if (routeModel.route.routes.size == 1) { + val timer = object : CountDownTimer(5000, 1000) { + override fun onTick(millisUntilFinished: Long) {} + override fun onFinish() { + onNavigate() + } + } + timer.start() } - timer.start() + val content = if (routeModel.route.routes.size > 1) { + ListTemplate.Builder() + .setHeader(header) + .setSingleList(itemListBuilder.build()) + .build() + } else { + MessageTemplate.Builder( + message + ) + .setHeader(header) + .addAction(navigateAction) + .setLoading(message.toString() == "Wait") + .build() + + } return MapWithContentTemplate.Builder() - .setContentTemplate(messageTemplate) + .setContentTemplate(content) .setMapController( MapController.Builder().setMapActionStrip( getMapActionStrip() @@ -176,10 +188,14 @@ class RoutePreviewScreen( ) .build() - private fun createRouteText(): CarText { - val time = routeModel.route.summary!!.duration + private fun createRouteText(index: Int): CarText { + val time = routeModel.route.routes[index].summary.duration + println("Duration $time") val length = - BigDecimal(routeModel.route.summary!!.distance).setScale(1, RoundingMode.HALF_EVEN) + BigDecimal(routeModel.route.routes[index].summary.distance).setScale( + 1, + RoundingMode.HALF_EVEN + ) val firstRoute = SpannableString(" \u00b7 $length km") firstRoute.setSpan( DurationSpan.create(time.toLong()), 0, 1, 0 @@ -188,14 +204,27 @@ class RoutePreviewScreen( .build() } + private fun createRow(index: Int, action: Action): Row { + val route = createRouteText(index) + val titleText = "$index" + return Row.Builder() + .setTitle(route) + .setOnClickListener(OnClickListener { onRouteSelected(index) }) + .addText(titleText) + .addAction(action) + .build() + } + private fun onNavigate() { setResult(destination) finish() } private fun onRouteSelected(index: Int) { - setResult(destination) - finish() + routeModel.currentRouteIndex = index + surfaceRenderer.setPreviewRouteData(routeModel) + //setResult(destination) + //finish() } fun getMapActionStrip(): ActionStrip { diff --git a/common/data/src/main/java/com/kouros/navigation/data/Data.kt b/common/data/src/main/java/com/kouros/navigation/data/Data.kt index a2e06a0..4d7845b 100644 --- a/common/data/src/main/java/com/kouros/navigation/data/Data.kt +++ b/common/data/src/main/java/com/kouros/navigation/data/Data.kt @@ -122,17 +122,8 @@ object Constants { val categories = listOf("Tankstelle", "Apotheke", "Ladestationen") /** The initial location to use as an anchor for searches. */ - val homeLocation: Location = Location(LocationManager.GPS_PROVIDER) - val home2Location: Location = Location(LocationManager.GPS_PROVIDER) - - init { - // Vogelhartstr. 17 - homeLocation.latitude = 48.185749 - homeLocation.longitude = 11.5793748 - // Hohenwaldeckstr. 27 - home2Location.latitude = 48.1164817 - home2Location.longitude = 11.594322 - } + val homeVogelhart = location(11.5793748, 48.185749) + val homeHohenwaldeck = location( 11.594322, 48.1164817) const val SHARED_PREF_KEY = "NavigationPrefs" @@ -151,7 +142,7 @@ object Constants { const val MAXIMAL_SNAP_CORRECTION = 50.0 - const val MAXIMAL_ROUTE_DEVIATION = 100.0 + const val MAXIMAL_ROUTE_DEVIATION = 80.0 const val DESTINATION_ARRIVAL_DISTANCE = 40.0 diff --git a/common/data/src/main/java/com/kouros/navigation/data/NavigationRepository.kt b/common/data/src/main/java/com/kouros/navigation/data/NavigationRepository.kt index fbf5d14..f492a92 100644 --- a/common/data/src/main/java/com/kouros/navigation/data/NavigationRepository.kt +++ b/common/data/src/main/java/com/kouros/navigation/data/NavigationRepository.kt @@ -43,7 +43,7 @@ abstract class NavigationRepository { val route = getRoute(currentLocation, location, carOrientation, searchFilter) val routeModel = RouteModel() routeModel.startNavigation(route, context) - return routeModel.route.summary!!.distance + return routeModel.curRoute.summary.distance } fun searchPlaces(search: String, location: Location) : String { diff --git a/common/data/src/main/java/com/kouros/navigation/data/Route.kt b/common/data/src/main/java/com/kouros/navigation/data/Route.kt index 4fbb7df..8712a0f 100644 --- a/common/data/src/main/java/com/kouros/navigation/data/Route.kt +++ b/common/data/src/main/java/com/kouros/navigation/data/Route.kt @@ -21,33 +21,23 @@ import org.maplibre.geojson.Point data class Route( val routeEngine: Int, - val summary: Summary?, - val legs: List?, - val routeGeoJson: String = "", - val centerLocation: Location = location(0.0, 0.0), + val routes: List, var currentStep: Int = 0, - val waypoints: List>?, ) { data class Builder( var routeEngine: Int = 0, - var summary: Summary? = null, - var legs: List? = null, - var routeGeoJson: String = "", - var centerLocation: Location = location(0.0, 0.0), - var waypoints: List>? = null, + var summary: Summary = Summary(), + var routes: List = emptyList(), ) { fun routeType(routeEngine: Int) = apply { this.routeEngine = routeEngine } - fun summary(summary: Summary) = apply { this.summary = summary } - fun legs(legs: List) = apply { this.legs = legs } - fun routeGeoJson(routeGeoJson: String) = apply { - this.routeGeoJson = routeGeoJson - centerLocation = createCenterLocation(routeGeoJson) + fun routes(routes: List) = apply { + this.routes = routes + } fun routeEngine(routeEngine: Int) = apply { this.routeEngine = routeEngine } - fun waypoints(waypoints: List>) = apply { this.waypoints = waypoints } fun route(route: String) = apply { if (route.isNotEmpty() && route != "[]") { val gson = GsonBuilder().serializeNulls().create() @@ -74,26 +64,30 @@ data class Route( fun build(): Route { return Route( routeEngine = this.routeEngine, - summary = this.summary, - legs = this.legs, - waypoints = this.waypoints, - routeGeoJson = this.routeGeoJson, + routes = this.routes, ) } fun buildEmpty(): Route { return Route( routeEngine = 0, - summary = Summary(0.0, 0.0), - legs = emptyList(), - waypoints = emptyList(), - routeGeoJson = "", + //summary = Summary(0.0, 0.0), + routes = emptyList(), + // legs = emptyList(), + //waypoints = emptyList(), + //routeGeoJson = "", ) } } + + val legs: List + get() = routes.first().legs + + fun currentStep(): Step { - return if (legs != null && legs.isNotEmpty()) { + + return if (legs.isNotEmpty()) { legs.first().steps[currentStep] } else { Step(maneuver = Maneuver(waypoints = emptyList(), location = location(0.0, 0.0))) @@ -102,7 +96,7 @@ data class Route( fun nextStep(): Step { val nextIndex = currentStep + 1 - return if (nextIndex < legs!!.first().steps.size) { + return if (nextIndex < legs.first().steps.size) { legs.first().steps[nextIndex] } else { throw IndexOutOfBoundsException("No next maneuver available.") diff --git a/common/data/src/main/java/com/kouros/navigation/data/osrm/OsrmRepository.kt b/common/data/src/main/java/com/kouros/navigation/data/osrm/OsrmRepository.kt index 8ae9a8d..aa0aa83 100644 --- a/common/data/src/main/java/com/kouros/navigation/data/osrm/OsrmRepository.kt +++ b/common/data/src/main/java/com/kouros/navigation/data/osrm/OsrmRepository.kt @@ -21,7 +21,7 @@ class OsrmRepository : NavigationRepository() { if (searchFilter.avoidTollway) { exclude = "$exclude&exclude=toll" } - val routeLocation = "${currentLocation.longitude},${currentLocation.latitude};${location.longitude},${location.latitude}?steps=true&alternatives=2" + val routeLocation = "${currentLocation.longitude},${currentLocation.latitude};${location.longitude},${location.latitude}?steps=true&alternatives=0" return fetchUrl(routeUrl + routeLocation + exclude, true) } } \ No newline at end of file diff --git a/common/data/src/main/java/com/kouros/navigation/data/osrm/OsrmRoute.kt b/common/data/src/main/java/com/kouros/navigation/data/osrm/OsrmRoute.kt index bcaa04d..9c5a8f3 100644 --- a/common/data/src/main/java/com/kouros/navigation/data/osrm/OsrmRoute.kt +++ b/common/data/src/main/java/com/kouros/navigation/data/osrm/OsrmRoute.kt @@ -7,6 +7,7 @@ import com.kouros.navigation.data.route.Leg import com.kouros.navigation.data.route.Maneuver as RouteManeuver import com.kouros.navigation.data.route.Step import com.kouros.navigation.data.route.Summary +import com.kouros.navigation.utils.GeoUtils.createCenterLocation import com.kouros.navigation.utils.GeoUtils.createLineStringCollection import com.kouros.navigation.utils.GeoUtils.decodePolyline import com.kouros.navigation.utils.location @@ -14,61 +15,75 @@ import com.kouros.navigation.utils.location class OsrmRoute { fun mapToOsrm(routeJson: OsrmResponse, builder: Route.Builder) { - val waypoints = mutableListOf>() - val summary = Summary() - summary.distance = routeJson.routes.first().distance!! / 1000 - summary.duration = routeJson.routes.first().duration!! / 1000 - val steps = mutableListOf() - var stepIndex = 0 - routeJson.routes.first().legs.first().steps.forEach { - val intersections = mutableListOf() - if (it.maneuver != null) { - val points = decodePolyline(it.geometry!!, 5) - waypoints.addAll(points) - val maneuver = RouteManeuver( - bearingBefore = it.maneuver.bearingBefore ?: 0, - bearingAfter = it.maneuver.bearingAfter ?: 0, - type = convertType(it.maneuver), - waypoints = points, - location = location(it.maneuver.location[0], it.maneuver.location[1]) - ) - it.intersections.forEach { it2 -> - if (it2.location[0] != 0.0) { - val lanes = mutableListOf() - it2.lanes.forEach { it3 -> - if (it3.indications.isNotEmpty() && it3.indications.first() != "none") { - val lane = Lane( - location(it2.location[0], it2.location[1]), - it3.valid, - it3.indications - ) - lanes.add(lane) + + val routes = mutableListOf() + var stepIndex = 0 + routeJson.routes.forEach { route -> + val legs = mutableListOf() + val waypoints = mutableListOf>() + val summary = Summary(route.duration!!, route.distance!! / 1000) + route.legs.forEach { leg -> + val steps = mutableListOf() + leg.steps.forEach { step -> + val intersections = mutableListOf() + if (step.maneuver != null) { + val points = decodePolyline(step.geometry!!, 5) + waypoints.addAll(points) + val maneuver = RouteManeuver( + bearingBefore = step.maneuver.bearingBefore ?: 0, + bearingAfter = step.maneuver.bearingAfter ?: 0, + type = convertType(step.maneuver), + waypoints = points, + location = location( + step.maneuver.location[0], + step.maneuver.location[1] + ) + ) + step.intersections.forEach { it2 -> + if (it2.location[0] != 0.0) { + val lanes = mutableListOf() + it2.lanes.forEach { it3 -> + if (it3.indications.isNotEmpty() && it3.indications.first() != "none") { + val lane = Lane( + location(it2.location[0], it2.location[1]), + it3.valid, + it3.indications + ) + lanes.add(lane) + } + } + intersections.add(Intersection(it2.location, lanes)) } } - intersections.add(Intersection(it2.location, lanes)) + val step = Step( + index = stepIndex, + name = step.name!!, + distance = step.distance!! / 1000, + duration = step.duration!!, + maneuver = maneuver, + intersection = intersections + ) + steps.add(step) + stepIndex += 1 } } - val step = Step( - index = stepIndex, - name = it.name!!, - distance = it.distance!! / 1000, - duration = it.duration!!, - maneuver = maneuver, - intersection = intersections - ) - steps.add(step) - stepIndex += 1 + legs.add(Leg(steps)) } + val routeGeoJson = createLineStringCollection(waypoints) + val centerLocation = createCenterLocation(createLineStringCollection(waypoints)) + val newRoute = com.kouros.navigation.data.route.Routes( + legs, + summary, + routeGeoJson, + centerLocation = centerLocation, + waypoints = waypoints + ) + routes.add(newRoute) } - val leg = Leg(steps) - builder .routeType(1) - .summary(summary) - .routeGeoJson(createLineStringCollection(waypoints)) - .legs(listOf(leg)) - .waypoints(waypoints.toList()) + .routes(routes) } fun convertType(maneuver: Maneuver): Int { @@ -93,12 +108,24 @@ class OsrmRoute { ManeuverType.continue_.value -> { newType = androidx.car.app.navigation.model.Maneuver.TYPE_STRAIGHT + if (maneuver.modifier == "right") { + newType = androidx.car.app.navigation.model.Maneuver.TYPE_TURN_NORMAL_RIGHT + } + if (maneuver.modifier == "left") { + newType = androidx.car.app.navigation.model.Maneuver.TYPE_TURN_NORMAL_LEFT + } } ManeuverType.newName.value -> { if (maneuver.modifier == "straight") { newType = androidx.car.app.navigation.model.Maneuver.TYPE_STRAIGHT } + if (maneuver.modifier == "slight right") { + newType = androidx.car.app.navigation.model.Maneuver.TYPE_TURN_SLIGHT_RIGHT + } + if (maneuver.modifier == "slight left") { + newType = androidx.car.app.navigation.model.Maneuver.TYPE_TURN_SLIGHT_LEFT + } } ManeuverType.turn.value, @@ -110,7 +137,7 @@ class OsrmRoute { newType = androidx.car.app.navigation.model.Maneuver.TYPE_TURN_NORMAL_LEFT } if (maneuver.modifier == "straight") { - newType = androidx.car.app.navigation.model.Maneuver.TYPE_TURN_SLIGHT_RIGHT + newType = androidx.car.app.navigation.model.Maneuver.TYPE_STRAIGHT } } @@ -120,6 +147,12 @@ class OsrmRoute { if (maneuver.modifier == "left") { newType = androidx.car.app.navigation.model.Maneuver.TYPE_TURN_NORMAL_LEFT } + if (maneuver.modifier == "slight right") { + newType = androidx.car.app.navigation.model.Maneuver.TYPE_TURN_SLIGHT_RIGHT + } + if (maneuver.modifier == "slight left") { + newType = androidx.car.app.navigation.model.Maneuver.TYPE_TURN_SLIGHT_LEFT + } } ManeuverType.offRamp.value @@ -127,6 +160,15 @@ class OsrmRoute { if (maneuver.modifier == "slight right") { newType = androidx.car.app.navigation.model.Maneuver.TYPE_TURN_SLIGHT_RIGHT } + if (maneuver.modifier == "right") { + newType = androidx.car.app.navigation.model.Maneuver.TYPE_TURN_NORMAL_RIGHT + } + if (maneuver.modifier == "slight left") { + newType = androidx.car.app.navigation.model.Maneuver.TYPE_TURN_SLIGHT_LEFT + } + if (maneuver.modifier == "left") { + newType = androidx.car.app.navigation.model.Maneuver.TYPE_TURN_NORMAL_LEFT + } } ManeuverType.fork.value @@ -134,10 +176,6 @@ class OsrmRoute { if (maneuver.modifier == "slight left") { newType = androidx.car.app.navigation.model.Maneuver.TYPE_TURN_SLIGHT_LEFT } - } - - ManeuverType.fork.value - -> { if (maneuver.modifier == "slight right") { newType = androidx.car.app.navigation.model.Maneuver.TYPE_TURN_SLIGHT_RIGHT } @@ -148,6 +186,21 @@ class OsrmRoute { if (maneuver.modifier == "slight left") { newType = androidx.car.app.navigation.model.Maneuver.TYPE_TURN_SLIGHT_LEFT } + if (maneuver.modifier == "slight right") { + newType = androidx.car.app.navigation.model.Maneuver.TYPE_TURN_SLIGHT_RIGHT + } + } + ManeuverType.roundAbout.value + -> { + if (maneuver.modifier == "right") { + newType = androidx.car.app.navigation.model.Maneuver.TYPE_ROUNDABOUT_ENTER_AND_EXIT_CCW + } + } + ManeuverType.exitRoundabout.value + -> { + if (maneuver.modifier == "right") { + newType = androidx.car.app.navigation.model.Maneuver.TYPE_ROUNDABOUT_EXIT_CCW + } } } return newType diff --git a/common/data/src/main/java/com/kouros/navigation/data/osrm/osrm_vh.json b/common/data/src/main/java/com/kouros/navigation/data/osrm/osrm_vh.json index 12ce509..18c3e7a 100644 --- a/common/data/src/main/java/com/kouros/navigation/data/osrm/osrm_vh.json +++ b/common/data/src/main/java/com/kouros/navigation/data/osrm/osrm_vh.json @@ -10,8 +10,58 @@ { "out": 0, "entry": [true], - "bearings": [91], - "location": [11.58004, 48.186907] + "bearings": [273], + "location": [11.579345, 48.185544] + } + ], + "driving_side": "right", + "geometry": "sfbeH{qteAAf@Af@?f@Aj@?R", + "maneuver": { + "bearing_after": 273, + "bearing_before": 0, + "location": [11.579345, 48.185544], + "modifier": "right", + "type": "depart" + }, + "name": "Vogelhartstraße", + "mode": "driving", + "weight": 12.6, + "duration": 12.6, + "distance": 68.7 + }, + { + "intersections": [ + { + "out": 0, + "in": 1, + "entry": [true, false, false, true], + "bearings": [0, 90, 195, 270], + "location": [11.578423, 48.185574] + } + ], + "driving_side": "right", + "geometry": "yfbeHclteAk@EYCkAGa@Cc@CC?y@A", + "maneuver": { + "bearing_after": 4, + "bearing_before": 271, + "location": [11.578423, 48.185574], + "modifier": "right", + "type": "turn" + }, + "name": "Silcherstraße", + "mode": "driving", + "weight": 25.2, + "duration": 25.2, + "distance": 154.2 + }, + { + "intersections": [ + { + "out": 0, + "in": 1, + "entry": [true, false, true], + "bearings": [90, 180, 270], + "location": [11.578564, 48.186957] }, { "out": 0, @@ -29,18 +79,19 @@ } ], "driving_side": "right", - "geometry": "eobeHgvteABkE@wA@gDAsB?Y?U?I?q@?_@@g@?IAiAAY", + "geometry": "oobeH_mteA@cADmC@uABkE@wA@gDAsB?Y?U?I?q@?_@@g@?IAiAAY", "maneuver": { "bearing_after": 91, - "bearing_before": 0, - "location": [11.58004, 48.186907], - "type": "depart" + "bearing_before": 1, + "location": [11.578564, 48.186957], + "modifier": "right", + "type": "turn" }, "name": "Schmalkaldener Straße", "mode": "driving", - "weight": 50.5, - "duration": 50.5, - "distance": 322.2 + "weight": 67, + "duration": 67, + "distance": 432.1 }, { "intersections": [ @@ -1008,17 +1059,17 @@ "distance": 0 } ], - "weight": 958.2, + "weight": 1012.5, "summary": "Isarring, Richard-Strauss-Tunnel", - "duration": 958.2, - "distance": 10775.1 + "duration": 1012.5, + "distance": 11107.8 } ], "weight_name": "routability", - "geometry": "eobeHgvteABaZrz@}BN{P~EyTpY_t@xDO`d@bWzLmCvMgWxPiPn\\y_AtFcIlH{C`jA~H`_@gJjh@|Qja@bBAtg@jMr_A|AjJxHG", - "weight": 958.2, - "duration": 958.2, - "distance": 10775.1 + "geometry": "sfbeH{qteAEvDuG[Lic@rz@}BN{P~EyTfZkt@bDC`d@bWtKiB|NkXxPiPt^ccA|MuJ`jA~H`_@gJjh@|Qja@bBAtg@jMr_A|AjJxHG", + "weight": 1012.5, + "duration": 1012.5, + "distance": 11107.8 }, { "legs": [ @@ -1029,98 +1080,182 @@ { "out": 0, "entry": [true], - "bearings": [91], - "location": [11.58004, 48.186907] + "bearings": [273], + "location": [11.579345, 48.185544] }, { - "out": 0, - "in": 2, - "entry": [true, true, false], - "bearings": [90, 195, 270], - "location": [11.58106, 48.18689] - }, - { - "out": 0, - "in": 2, - "entry": [true, true, false], - "bearings": [90, 180, 270], - "location": [11.583158, 48.186877] + "out": 3, + "in": 1, + "entry": [true, false, false, true], + "bearings": [0, 90, 195, 270], + "location": [11.578423, 48.185574] } ], "driving_side": "right", - "geometry": "eobeHgvteABkE@wA@gDAsB?Y?U?I?q@?_@@g@?IAiAAY", + "geometry": "sfbeH{qteAAf@Af@?f@Aj@?RA^A\\?XAf@Ab@?LAb@At@?n@Ad@A`@AZ", "maneuver": { - "bearing_after": 91, + "bearing_after": 273, "bearing_before": 0, - "location": [11.58004, 48.186907], + "location": [11.579345, 48.185544], + "modifier": "right", "type": "depart" }, - "name": "Schmalkaldener Straße", + "name": "Vogelhartstraße", "mode": "driving", - "weight": 50.5, - "duration": 50.5, - "distance": 322.2 + "weight": 33.6, + "duration": 33.6, + "distance": 224.1 }, { "intersections": [ { - "out": 1, - "in": 2, - "entry": [false, true, false], - "bearings": [0, 180, 270], - "location": [11.584371, 48.186885] + "out": 2, + "in": 1, + "entry": [true, false, true], + "bearings": [0, 90, 255], + "location": [11.576336, 48.185655] + } + ], + "driving_side": "right", + "geometry": "kgbeHc_teA@RHJXBX@T@X@f@@b@@d@@X@F@", + "maneuver": { + "bearing_after": 251, + "bearing_before": 272, + "location": [11.576336, 48.185655], + "modifier": "slight left", + "type": "new name" + }, + "name": "Bad-Kreuznacher-Straße", + "mode": "driving", + "weight": 25.2, + "duration": 25.2, + "distance": 152.4 + }, + { + "intersections": [ + { + "out": 3, + "in": 0, + "entry": [false, true, false, true], + "bearings": [0, 90, 180, 270], + "location": [11.576084, 48.184359] }, { "out": 2, "in": 0, - "entry": [false, false, true], - "bearings": [0, 150, 180], - "location": [11.584381, 48.186715] - }, - { - "out": 1, - "in": 0, "entry": [false, true, true], - "bearings": [0, 180, 270], - "location": [11.584506, 48.185225] - }, + "bearings": [90, 180, 270], + "location": [11.575007, 48.184411] + } + ], + "driving_side": "right", + "geometry": "g_beHo}seACbA?N?NA`@AN?NAn@E~CEnCAlA?N?\\", + "maneuver": { + "bearing_after": 272, + "bearing_before": 181, + "location": [11.576084, 48.184359], + "modifier": "right", + "type": "turn" + }, + "name": "Milbertshofener Straße", + "mode": "driving", + "weight": 45.8, + "duration": 45.8, + "distance": 239.3 + }, + { + "intersections": [ { "lanes": [ + { + "valid": true, + "indications": [ + "left" + ] + }, { "valid": false, + "indications": [ + "none" + ] + } + ], + "out": 2, + "in": 1, + "entry": [true, false, true, true], + "bearings": [0, 90, 180, 270], + "location": [11.572872, 48.184483] + }, + { + "out": 2, + "in": 0, + "entry": [false, true, true, true], + "bearings": [0, 90, 180, 255], + "location": [11.572942, 48.183552] + }, + { + "out": 2, + "in": 0, + "entry": [false, true, true, true], + "bearings": [0, 90, 180, 270], + "location": [11.573003, 48.182772] + }, + { + "out": 2, + "in": 0, + "entry": [false, true, true, true], + "bearings": [0, 90, 180, 270], + "location": [11.573079, 48.18177] + }, + { + "out": 2, + "in": 0, + "entry": [false, true, true, false], + "bearings": [0, 90, 180, 270], + "location": [11.573147, 48.180878] + }, + { + "out": 2, + "in": 0, + "entry": [false, false, true, true], + "bearings": [0, 105, 180, 270], + "location": [11.573231, 48.180056] + }, + { + "out": 2, + "in": 0, + "entry": [false, false, true, false], + "bearings": [0, 90, 180, 255], + "location": [11.573286, 48.179045] + } + ], + "driving_side": "right", + "geometry": "_`beHmiseARAH?fAEh@Ch@AzCKnBIJ?r@CD?PARAD?b@AZAvAGlCMTA`BGn@Cv@?TJXDj@JLBNBf@LFBPDHF", + "maneuver": { + "bearing_after": 175, + "bearing_before": 271, + "location": [11.572872, 48.184483], + "modifier": "left", + "type": "turn" + }, + "name": "Knorrstraße", + "mode": "driving", + "weight": 68.5, + "duration": 68.5, + "distance": 718.2 + }, + { + "intersections": [ + { + "lanes": [ + { + "valid": true, "indications": [ "left" ] }, { "valid": true, - "indications": [ - "straight" - ] - }, - { - "valid": true, - "indications": [ - "straight" - ] - }, - { - "valid": false, - "indications": [ - "right" - ] - } - ], - "out": 2, - "in": 0, - "entry": [false, true, true, true], - "bearings": [0, 75, 180, 270], - "location": [11.58458, 48.184313] - }, - { - "lanes": [ - { - "valid": false, "indications": [ "left" ] @@ -1141,10 +1276,159 @@ ], "out": 2, "in": 0, + "entry": [false, false, true, true], + "bearings": [15, 75, 195, 255], + "location": [11.572944, 48.17806] + }, + { + "lanes": [ + { + "valid": false, + "indications": [ + "left" + ] + }, + { + "valid": false, + "indications": [ + "left" + ] + }, + { + "valid": true, + "indications": [ + "straight" + ] + }, + { + "valid": true, + "indications": [ + "straight" + ] + } + ], + "out": 2, + "in": 0, + "entry": [false, true, true, false], + "bearings": [15, 90, 195, 270], + "location": [11.572835, 48.177874] + }, + { + "out": 2, + "in": 0, + "entry": [false, true, true], + "bearings": [15, 90, 180], + "location": [11.572602, 48.177193] + }, + { + "out": 2, + "in": 0, + "entry": [false, false, true], + "bearings": [0, 90, 180], + "location": [11.572588, 48.177029] + }, + { + "out": 2, + "in": 0, + "entry": [false, false, true], + "bearings": [0, 45, 180], + "location": [11.573155, 48.172476] + }, + { + "out": 2, + "in": 0, + "entry": [false, true, true], + "bearings": [0, 90, 180], + "location": [11.573465, 48.170274] + }, + { + "lanes": [ + { + "valid": true, + "indications": [ + "none" + ] + }, + { + "valid": false, + "indications": [ + "right" + ] + } + ], + "out": 2, + "in": 0, "entry": [false, true, true, true], "bearings": [0, 90, 180, 270], - "location": [11.584821, 48.181732] + "location": [11.573891, 48.167151] }, + { + "out": 1, + "in": 3, + "entry": [true, true, true, true], + "bearings": [90, 180, 285, 345], + "location": [11.574364, 48.1645] + }, + { + "out": 2, + "in": 0, + "entry": [false, true, true, true], + "bearings": [0, 105, 180, 285], + "location": [11.574558, 48.163462] + }, + { + "out": 2, + "in": 0, + "entry": [false, true, true, true], + "bearings": [0, 90, 180, 285], + "location": [11.574729, 48.162487] + }, + { + "out": 2, + "in": 0, + "entry": [false, true, true], + "bearings": [0, 90, 180], + "location": [11.574842, 48.161829] + }, + { + "out": 2, + "in": 0, + "entry": [false, true, true, true], + "bearings": [0, 90, 180, 255], + "location": [11.574958, 48.161138] + }, + { + "out": 3, + "in": 0, + "entry": [false, false, false, true, false, true], + "bearings": [0, 105, 135, 225, 255, 285], + "location": [11.575051, 48.160346] + }, + { + "out": 1, + "in": 0, + "entry": [false, true, false], + "bearings": [45, 195, 315], + "location": [11.574875, 48.160201] + } + ], + "driving_side": "right", + "geometry": "{w`eH{iseAd@RPHPFTFND`@HZDRBJAp@AxAG~BMH?b@CLAVApBKVC~BS|AM`CS`@E`@EPANAZCnAKpAIn@Eh@GN?dAID?DAPCJAPA@?z@KfEY~Fc@L?f@CDAF?RANAJAZAbAI\\Gp@EX@PA`@IfE[`@IHKBCZEd@GtBUVCNCzBS^ETCRAVCvAOhCW`@EtAMBAD?B?B?F@J@@@BFDD@BBBBDFBDBFBF@JBL@J@F?F@NA", + "maneuver": { + "bearing_after": 201, + "bearing_before": 194, + "location": [11.572944, 48.17806], + "modifier": "straight", + "type": "new name" + }, + "name": "Belgradstraße", + "mode": "driving", + "weight": 205.5, + "duration": 205.5, + "distance": 2058 + }, + { + "intersections": [ { "lanes": [ { @@ -1153,6 +1437,238 @@ "left" ] }, + { + "valid": true, + "indications": [ + "none" + ] + } + ], + "out": 2, + "in": 0, + "entry": [false, true, true], + "bearings": [0, 135, 180], + "location": [11.574788, 48.15974] + } + ], + "driving_side": "right", + "geometry": "ke}dHmuseAj@CPA", + "maneuver": { + "bearing_after": 175, + "bearing_before": 177, + "location": [11.574788, 48.15974], + "modifier": "straight", + "type": "continue" + }, + "name": "Kurfürstenplatz", + "mode": "driving", + "weight": 3.1, + "duration": 3.1, + "distance": 34.1 + }, + { + "intersections": [ + { + "out": 2, + "in": 0, + "entry": [false, true, true], + "bearings": [0, 30, 180], + "location": [11.574816, 48.159434] + }, + { + "out": 1, + "in": 0, + "entry": [false, true, true], + "bearings": [0, 180, 270], + "location": [11.574864, 48.158798] + }, + { + "out": 2, + "in": 0, + "entry": [false, false, true, true], + "bearings": [0, 90, 180, 270], + "location": [11.574991, 48.157644] + } + ], + "driving_side": "right", + "geometry": "mc}dHsuseAJ?j@CF?D?B?r@Cx@E|@ED?FAPAXCRARALALAHA^CdAGTCf@GdCSnBMLAPCD?XC", + "maneuver": { + "bearing_after": 177, + "bearing_before": 175, + "location": [11.574816, 48.159434], + "modifier": "straight", + "type": "turn" + }, + "name": "Nordendstraße", + "mode": "driving", + "weight": 49.7, + "duration": 49.7, + "distance": 477.9 + }, + { + "intersections": [ + { + "out": 1, + "in": 0, + "entry": [false, true, false, true], + "bearings": [0, 105, 180, 300], + "location": [11.575353, 48.155152] + } + ], + "driving_side": "right", + "geometry": "uh|dH}xseA?EBOTaC?K", + "maneuver": { + "bearing_after": 104, + "bearing_before": 172, + "location": [11.575353, 48.155152], + "modifier": "left", + "type": "turn" + }, + "name": "Georgenstraße", + "mode": "driving", + "weight": 12.1, + "duration": 12.1, + "distance": 62.7 + }, + { + "intersections": [ + { + "out": 2, + "in": 3, + "entry": [true, true, true, false], + "bearings": [0, 105, 180, 285], + "location": [11.576172, 48.155019] + } + ], + "driving_side": "right", + "geometry": "{g|dHa~seAJ?|BWz@ILA", + "maneuver": { + "bearing_after": 172, + "bearing_before": 102, + "location": [11.576172, 48.155019], + "modifier": "right", + "type": "turn" + }, + "name": "Kurfürstenstraße", + "mode": "driving", + "weight": 20.6, + "duration": 20.6, + "distance": 118.5 + }, + { + "intersections": [ + { + "out": 1, + "in": 0, + "entry": [false, true, true], + "bearings": [0, 105, 180], + "location": [11.576346, 48.153961] + } + ], + "driving_side": "right", + "geometry": "ga|dHe_teAVqDP_CBW?IB[", + "maneuver": { + "bearing_after": 101, + "bearing_before": 172, + "location": [11.576346, 48.153961], + "modifier": "left", + "type": "turn" + }, + "name": "Rambergstraße", + "mode": "driving", + "weight": 24.3, + "duration": 24.3, + "distance": 140 + }, + { + "intersections": [ + { + "out": 1, + "in": 2, + "entry": [true, true, false], + "bearings": [30, 210, 285], + "location": [11.578189, 48.153706] + } + ], + "driving_side": "right", + "geometry": "u_|dHujteArBfA", + "maneuver": { + "bearing_after": 202, + "bearing_before": 101, + "location": [11.578189, 48.153706], + "modifier": "right", + "type": "turn" + }, + "name": "Türkenstraße", + "mode": "driving", + "weight": 16.3, + "duration": 16.3, + "distance": 69.9 + }, + { + "intersections": [ + { + "out": 1, + "in": 0, + "entry": [false, true, false], + "bearings": [30, 105, 210], + "location": [11.577828, 48.153126] + }, + { + "out": 0, + "in": 2, + "entry": [true, true, false], + "bearings": [105, 210, 285], + "location": [11.579981, 48.152661] + } + ], + "driving_side": "right", + "geometry": "a|{dHmhteADS|@_HXyB@M\\iCd@wDB_@@Q", + "maneuver": { + "bearing_after": 106, + "bearing_before": 202, + "location": [11.577828, 48.153126], + "modifier": "left", + "type": "turn" + }, + "name": "Akademiestraße", + "mode": "driving", + "weight": 29.7, + "duration": 29.7, + "distance": 317.5 + }, + { + "intersections": [ + { + "out": 2, + "in": 3, + "entry": [false, true, true, false], + "bearings": [0, 135, 180, 285], + "location": [11.581905, 48.152284] + }, + { + "out": 2, + "in": 0, + "entry": [false, true, true, false], + "bearings": [15, 105, 195, 300], + "location": [11.581605, 48.151325] + }, + { + "out": 2, + "in": 0, + "entry": [false, true, true, true], + "bearings": [15, 105, 195, 285], + "location": [11.581491, 48.15108] + }, + { + "out": 2, + "in": 0, + "entry": [false, true, true, true], + "bearings": [15, 105, 195, 300], + "location": [11.581094, 48.150116] + }, + { + "lanes": [ { "valid": true, "indications": [ @@ -1164,21 +1680,53 @@ "indications": [ "straight" ] + }, + { + "valid": true, + "indications": [ + "straight", + "right" + ] } ], - "out": 2, - "in": 0, - "entry": [false, true, true], - "bearings": [0, 90, 180], - "location": [11.584973, 48.18015] - }, - { "out": 1, "in": 0, - "entry": [false, true, false], - "bearings": [0, 180, 270], - "location": [11.585106, 48.178587] + "entry": [false, true, true], + "bearings": [15, 195, 285], + "location": [11.580564, 48.148984] }, + { + "out": 2, + "in": 0, + "entry": [false, true, true, true], + "bearings": [15, 105, 195, 285], + "location": [11.579556, 48.146828] + }, + { + "out": 2, + "in": 0, + "entry": [false, true, true, false], + "bearings": [15, 105, 195, 285], + "location": [11.579183, 48.146027] + } + ], + "driving_side": "right", + "geometry": "wv{dH}aueAXAR?L@JDj@Rl@TZJVJLDJDnAf@b@BjAb@zAh@FBZJ\\Lr@XPFPFVJf@Pz@Z~Aj@z@ZfBp@FBRFVJFBjAb@r@Vt@Vn@TVHFB", + "maneuver": { + "bearing_after": 175, + "bearing_before": 98, + "location": [11.581905, 48.152284], + "modifier": "right", + "type": "turn" + }, + "name": "Ludwigstraße", + "mode": "driving", + "weight": 78.2, + "duration": 78.2, + "distance": 804.2 + }, + { + "intersections": [ { "lanes": [ { @@ -1190,7 +1738,6 @@ { "valid": true, "indications": [ - "straight", "left" ] }, @@ -1211,389 +1758,766 @@ "out": 2, "in": 0, "entry": [false, false, true, true], - "bearings": [15, 90, 195, 270], - "location": [11.585104, 48.177692] - } - ], - "driving_side": "right", - "maneuver": { - "bearing_after": 177, - "bearing_before": 87, - "location": [11.584371, 48.186885], - "modifier": "right", - "type": "end of road" - }, - "geometry": "aobeHiqueA`@A\\ChDMd@Az@ElCIHA^A^Cp@CF?fFUz@EhBIF?RANAh@CbCMbAETAJAV?lCIhDQ`AE\\C\\AZ@F@HDFBJDJBXDPB", - "ref": "B 13", - "name": "Ingolstädter Straße", - "mode": "driving", - "weight": 112.1, - "duration": 112.1, - "distance": 1063.9 - }, - { - "intersections": [ - { - "out": 2, - "in": 0, - "entry": [false, true, true, true, false], - "bearings": [15, 75, 90, 180, 270], - "location": [11.585001, 48.177346] + "bearings": [15, 105, 195, 285], + "location": [11.578883, 48.145359] }, { "lanes": [ { "valid": true, "indications": [ - "straight" + "left" ] }, { "valid": true, + "indications": [ + "left" + ] + }, + { + "valid": false, + "indications": [ + "straight" + ] + }, + { + "valid": false, "indications": [ "straight" ] } ], "out": 1, - "in": 3, - "entry": [false, true, false, false], - "bearings": [15, 75, 180, 270], - "location": [11.585474, 48.177353] + "in": 0, + "entry": [false, true, true, false], + "bearings": [15, 105, 195, 285], + "location": [11.57884, 48.145266] }, { - "out": 0, - "in": 1, - "entry": [true, false, false], - "bearings": [90, 255, 315], - "location": [11.586131, 48.177456] - }, - { - "out": 0, - "classes": [ - "tunnel" - ], - "in": 1, - "entry": [true, false], - "bearings": [105, 285], - "location": [11.58707, 48.17739] - }, - { - "out": 0, - "in": 1, - "entry": [true, false], - "bearings": [120, 300], - "location": [11.589463, 48.176823] + "out": 1, + "in": 2, + "entry": [false, true, false], + "bearings": [30, 105, 285], + "location": [11.580835, 48.144831] } ], "driving_side": "right", - "geometry": "ms`eHguueAD]?O?OE_@Kk@Ca@Eu@D_BF{AHkALqALgAPgAHe@Ha@Ps@Rs@Jc@J_@", + "geometry": "okzdH_oteAF@HDDWRyAt@wFFe@TqBl@gFBK@M?G?G@G@w@?K?I@KBOL_A@MFc@BG@GBEDGFIBEFCDEHCDARE", "maneuver": { - "bearing_after": 90, - "bearing_before": 191, - "location": [11.585001, 48.177346], + "bearing_after": 196, + "bearing_before": 195, + "location": [11.578883, 48.145359], "modifier": "left", - "type": "on ramp" + "type": "turn" }, - "name": "Schenkendorfstraße", + "name": "Von-der-Tann-Straße", "mode": "driving", - "weight": 35.8, - "duration": 35.8, - "distance": 375.2 + "weight": 48.2, + "duration": 48.2, + "distance": 457.3 }, { "intersections": [ { "lanes": [ { - "valid": true, + "valid": false, "indications": [ - "straight" + "left" ] }, { "valid": false, + "indications": [ + "left" + ] + }, + { + "valid": true, "indications": [ "slight right" ] } ], - "out": 0, + "out": 1, "in": 2, - "entry": [true, true, false], - "bearings": [120, 135, 300], - "location": [11.589803, 48.176704] - } - ], - "driving_side": "right", - "geometry": "ko`eHgsveAF[XaAZiA^mALe@@Y", - "maneuver": { - "bearing_after": 118, - "bearing_before": 116, - "location": [11.589803, 48.176704], - "modifier": "slight left", - "type": "fork" - }, - "name": "Schenkendorfstraße", - "mode": "driving", - "weight": 11.8, - "duration": 11.8, - "distance": 131.4 - }, - { - "intersections": [ - { - "out": 0, - "in": 1, - "entry": [true, false, false], - "bearings": [122, 297, 302], - "location": [11.591352, 48.176148] - }, - { - "out": 0, - "in": 2, - "entry": [true, false, false], - "bearings": [120, 285, 300], - "location": [11.592029, 48.17586] + "entry": [false, true, false], + "bearings": [60, 180, 345], + "location": [11.584255, 48.143901] }, { "lanes": [ { - "valid": true, + "valid": false, "indications": [ - "straight" - ] - }, - { - "valid": true, - "indications": [ - "straight" + "left" ] }, { "valid": false, "indications": [ - "slight right" + "left" + ] + }, + { + "valid": true, + "indications": [ + "straight" ] } ], - "out": 0, - "in": 2, - "entry": [true, true, false], - "bearings": [120, 135, 300], - "location": [11.594022, 48.174977] - }, - { - "out": 0, - "classes": [ - "tunnel" - ], - "in": 1, - "entry": [true, false], - "bearings": [120, 315], - "location": [11.596646, 48.173717] - }, - { - "out": 0, - "in": 1, - "entry": [true, false], - "bearings": [120, 300], - "location": [11.597609, 48.173233] + "out": 2, + "in": 0, + "entry": [false, true, true], + "bearings": [0, 105, 195], + "location": [11.584265, 48.143795] }, { "out": 2, - "in": 1, + "in": 0, "entry": [false, false, true], - "bearings": [14, 21, 205], - "location": [11.599736, 48.170666] + "bearings": [15, 180, 210], + "location": [11.583243, 48.141711] + } + ], + "driving_side": "right", + "geometry": "kbzdHspueAF?D?DATHd@RxBz@^NjEbBRPPH^NLDJDFBHD", + "maneuver": { + "bearing_after": 175, + "bearing_before": 170, + "location": [11.584255, 48.143901], + "modifier": "straight", + "type": "new name" + }, + "name": "Franz-Josef-Strauß-Ring", + "mode": "driving", + "weight": 33.4, + "duration": 33.4, + "distance": 323.9 + }, + { + "intersections": [ + { + "out": 2, + "in": 0, + "entry": [false, false, true, false, false], + "bearings": [15, 90, 165, 285, 345], + "location": [11.582909, 48.141144] + }, + { + "out": 0, + "in": 2, + "entry": [true, false, false], + "bearings": [150, 240, 330], + "location": [11.584163, 48.139822] + }, + { + "out": 1, + "in": 2, + "entry": [false, true, false], + "bearings": [90, 180, 345], + "location": [11.584713, 48.139135] + } + ], + "driving_side": "right", + "geometry": "cqydHehueAPENGLIRS|AeBdBgBnAsAFIDAJELEFAF?P?n@N~@THBB@\\B@?", + "maneuver": { + "bearing_after": 165, + "bearing_before": 198, + "location": [11.582909, 48.141144], + "modifier": "slight left", + "type": "new name" + }, + "name": "Karl-Scharnagl-Ring", + "mode": "driving", + "weight": 36.7, + "duration": 36.7, + "distance": 362.9 + }, + { + "intersections": [ + { + "lanes": [ + { + "valid": false, + "indications": [ + "left" + ] + }, + { + "valid": false, + "indications": [ + "left" + ] + }, + { + "valid": true, + "indications": [ + "straight" + ] + }, + { + "valid": true, + "indications": [ + "straight" + ] + }, + { + "valid": false, + "indications": [ + "right" + ] + } + ], + "out": 2, + "in": 0, + "entry": [false, true, true, true], + "bearings": [0, 105, 195, 285], + "location": [11.584468, 48.138257] + }, + { + "lanes": [ + { + "valid": false, + "indications": [ + "left" + ] + }, + { + "valid": true, + "indications": [ + "none" + ] + }, + { + "valid": true, + "indications": [ + "none" + ] + } + ], + "out": 2, + "in": 0, + "entry": [false, true, true], + "bearings": [15, 105, 195], + "location": [11.584335, 48.137682] }, { "out": 1, "in": 0, "entry": [false, true, true], - "bearings": [30, 210, 225], - "location": [11.598911, 48.169478] + "bearings": [15, 195, 285], + "location": [11.584247, 48.137292] }, { "out": 2, - "in": 1, + "in": 0, "entry": [false, false, true], - "bearings": [15, 30, 210], - "location": [11.597915, 48.168028] + "bearings": [45, 150, 225], + "location": [11.583118, 48.135491] + }, + { + "lanes": [ + { + "valid": true, + "indications": [ + "left" + ] + }, + { + "valid": true, + "indications": [ + "left" + ] + }, + { + "valid": true, + "indications": [ + "straight" + ] + }, + { + "valid": true, + "indications": [ + "straight" + ] + }, + { + "valid": false, + "indications": [ + "right" + ] + } + ], + "out": 2, + "in": 0, + "entry": [false, false, true, true], + "bearings": [60, 165, 240, 315], + "location": [11.582272, 48.13505] + } + ], + "driving_side": "right", + "geometry": "c_ydH}queAB?^DPB|@N`@FL@\\FXFL@^Hh@Nf@N`@Pb@TRJPLVRPNJLFDRZDFHNR^f@bANd@HX@DXz@", + "maneuver": { + "bearing_after": 188, + "bearing_before": 185, + "location": [11.584468, 48.138257], + "modifier": "straight", + "type": "new name" + }, + "name": "Thomas-Wimmer-Ring", + "mode": "driving", + "weight": 43.6, + "duration": 43.6, + "distance": 436.2 + }, + { + "intersections": [ + { + "lanes": [ + { + "valid": true, + "indications": [ + "left" + ] + }, + { + "valid": true, + "indications": [ + "left" + ] + }, + { + "valid": false, + "indications": [ + "straight" + ] + }, + { + "valid": false, + "indications": [ + "straight" + ] + } + ], + "out": 1, + "in": 0, + "entry": [false, true, true], + "bearings": [60, 195, 240], + "location": [11.581974, 48.134923] + }, + { + "lanes": [ + { + "valid": true, + "indications": [ + "left" + ] + }, + { + "valid": true, + "indications": [ + "left" + ] + } + ], + "out": 2, + "in": 0, + "entry": [false, false, true, false, false], + "bearings": [15, 60, 120, 255, 300], + "location": [11.581908, 48.134752] + } + ], + "driving_side": "right", + "geometry": "gjxdHibueAHFHBL?HSFQPUHINMv@k@ZUHENI@A", + "maneuver": { + "bearing_after": 194, + "bearing_before": 236, + "location": [11.581974, 48.134923], + "modifier": "left", + "type": "turn" + }, + "name": "Isartorplatz", + "mode": "driving", + "weight": 16.8, + "duration": 16.8, + "distance": 137.6 + }, + { + "intersections": [ + { + "lanes": [ + { + "valid": false, + "indications": [ + "left" + ] + }, + { + "valid": true, + "indications": [ + "straight" + ] + }, + { + "valid": true, + "indications": [ + "straight", + "right" + ] + } + ], + "out": 1, + "in": 3, + "entry": [true, true, true, false], + "bearings": [60, 150, 240, 330], + "location": [11.582753, 48.133875] + }, + { + "out": 0, + "in": 2, + "entry": [true, true, false], + "bearings": [135, 210, 330], + "location": [11.583437, 48.132997] + } + ], + "driving_side": "right", + "geometry": "wcxdHegueABA@AFEd@[jBqAHGDITa@Vk@nAcDDKH[", + "maneuver": { + "bearing_after": 153, + "bearing_before": 151, + "location": [11.582753, 48.133875], + "modifier": "straight", + "type": "new name" + }, + "name": "Zweibrückenstraße", + "mode": "driving", + "weight": 30.5, + "duration": 30.5, + "distance": 242.1 + }, + { + "intersections": [ + { + "lanes": [ + { + "valid": false, + "indications": [ + "straight" + ] + }, + { + "valid": true, + "indications": [ + "right" + ] + } + ], + "out": 2, + "in": 3, + "entry": [false, true, true, false], + "bearings": [30, 120, 225, 300], + "location": [11.58485, 48.132287] + }, + { + "lanes": [ + { + "valid": true, + "indications": [ + "none" + ] + }, + { + "valid": true, + "indications": [ + "straight", + "right" + ] + } + ], + "out": 2, + "in": 0, + "entry": [false, true, true, true], + "bearings": [60, 150, 225, 315], + "location": [11.582394, 48.130967] + } + ], + "driving_side": "right", + "geometry": "yywdHitueAHHFLfA|AR^`@z@z@bCn@rBBLFRLX^t@HPR\\\\v@dCbG~@|BJTBFLV", + "maneuver": { + "bearing_after": 220, + "bearing_before": 123, + "location": [11.58485, 48.132287], + "modifier": "right", + "type": "turn" + }, + "name": "Erhardtstraße", + "mode": "driving", + "weight": 57.5, + "duration": 57.5, + "distance": 533.7 + }, + { + "intersections": [ + { + "lanes": [ + { + "valid": true, + "indications": [ + "left" + ] + }, + { + "valid": false, + "indications": [ + "straight" + ] + }, + { + "valid": false, + "indications": [ + "none" + ] + } + ], + "out": 1, + "in": 0, + "entry": [false, true, true, false], + "bearings": [45, 135, 240, 315], + "location": [11.579267, 48.129304] + } + ], + "driving_side": "right", + "geometry": "cgwdHmqteANQFKLO|@gA@ANQNQ@ApBgC`@g@HO", + "maneuver": { + "bearing_after": 140, + "bearing_before": 232, + "location": [11.579267, 48.129304], + "modifier": "left", + "type": "turn" + }, + "name": "Corneliusbrücke", + "mode": "driving", + "weight": 20.9, + "duration": 20.9, + "distance": 210 + }, + { + "intersections": [ + { + "lanes": [ + { + "valid": true, + "indications": [ + "straight", + "right" + ] + } + ], + "out": 1, + "in": 3, + "entry": [false, true, true, false], + "bearings": [75, 135, 240, 315], + "location": [11.581024, 48.127827] }, { "out": 1, - "classes": [ - "tunnel" + "in": 3, + "entry": [true, true, true, false], + "bearings": [45, 120, 225, 315], + "location": [11.582517, 48.126939] + } + ], + "driving_side": "right", + "geometry": "}}vdHk|teANSVc@Ve@JS\\s@h@iAN[L_@HSDQDMBIV_AFU@GPm@", + "maneuver": { + "bearing_after": 135, + "bearing_before": 136, + "location": [11.581024, 48.127827], + "modifier": "straight", + "type": "new name" + }, + "name": "Schweigerstraße", + "mode": "driving", + "weight": 26.7, + "duration": 26.7, + "distance": 236 + }, + { + "intersections": [ + { + "lanes": [ + { + "valid": false, + "indications": [ + "left" + ] + }, + { + "valid": false, + "indications": [ + "straight" + ] + }, + { + "valid": true, + "indications": [ + "right" + ] + } ], - "in": 0, - "entry": [false, true], - "bearings": [30, 210], - "location": [11.59692, 48.166605] + "out": 2, + "in": 3, + "entry": [true, true, true, false], + "bearings": [60, 120, 225, 300], + "location": [11.583528, 48.126548] }, + { + "out": 1, + "in": 0, + "entry": [false, true, true], + "bearings": [30, 210, 315], + "location": [11.582694, 48.125792] + }, + { + "out": 2, + "in": 0, + "entry": [false, true, true], + "bearings": [30, 120, 210], + "location": [11.581824, 48.124994] + } + ], + "driving_side": "right", + "geometry": "}uvdHalueAT^JJ|@~@v@z@jCvCRTr@v@PRNRDNHLHN", + "maneuver": { + "bearing_after": 220, + "bearing_before": 118, + "location": [11.583528, 48.126548], + "modifier": "right", + "type": "turn" + }, + "name": "Mariahilfplatz", + "mode": "driving", + "weight": 28.8, + "duration": 28.8, + "distance": 297.7 + }, + { + "intersections": [ + { + "out": 2, + "in": 0, + "entry": [false, false, true, true], + "bearings": [45, 135, 225, 315], + "location": [11.58111, 48.124427] + }, + { + "out": 1, + "in": 0, + "entry": [false, true, true, false], + "bearings": [45, 150, 225, 330], + "location": [11.580961, 48.124328] + }, + { + "lanes": [ + { + "valid": false, + "indications": [ + "left" + ] + }, + { + "valid": true, + "indications": [ + "none" + ] + } + ], + "out": 1, + "in": 3, + "entry": [true, true, false, false], + "bearings": [45, 150, 225, 330], + "location": [11.581024, 48.124247] + } + ], + "driving_side": "right", + "geometry": "uhvdH}|teAHL@BFJNKPMJIPOJIRQJMNSZUb@Yx@e@LMDCTMLGRGTAJAH@", + "maneuver": { + "bearing_after": 225, + "bearing_before": 229, + "location": [11.58111, 48.124427], + "modifier": "left", + "type": "turn" + }, + "name": "Ohlmüllerstraße", + "mode": "driving", + "weight": 24.7, + "duration": 24.7, + "distance": 242.7 + }, + { + "intersections": [ + { + "out": 1, + "in": 0, + "entry": [false, true, true], + "bearings": [0, 195, 270], + "location": [11.582208, 48.122495] + }, + { + "out": 1, + "in": 0, + "entry": [false, true, true], + "bearings": [30, 210, 255], + "location": [11.581825, 48.121758] + }, + { + "out": 1, + "in": 2, + "entry": [true, true, true], + "bearings": [45, 150, 330], + "location": [11.581815, 48.120441] + }, + { + "out": 1, + "in": 2, + "entry": [false, true, false], + "bearings": [75, 165, 345], + "location": [11.582101, 48.12006] + } + ], + "driving_side": "right", + "geometry": "s|udHycueAF@F?F@D@HBFBFBD@HDHB`@V^Tf@\\RLJDHDFDHBJBHBH?J@H?HAJAHAHEHCHEHGHGFGHIBEDKHIDGDCBCDEFEDCFCHCJELCr@U", + "maneuver": { + "bearing_after": 191, + "bearing_before": 181, + "location": [11.582208, 48.122495], + "modifier": "straight", + "type": "new name" + }, + "name": "Am Nockherberg", + "mode": "driving", + "weight": 29.9, + "duration": 29.9, + "distance": 332.5 + }, + { + "intersections": [ { "out": 0, "in": 1, "entry": [true, false], "bearings": [165, 345], - "location": [11.596001, 48.163978] - }, - { - "out": 0, - "in": 2, - "entry": [true, false, false], - "bearings": [135, 300, 315], - "location": [11.597365, 48.162396] + "location": [11.582225, 48.119731] }, { "out": 0, "in": 2, "entry": [true, true, false], - "bearings": [135, 150, 315], - "location": [11.599799, 48.161034] + "bearings": [135, 210, 330], + "location": [11.58229, 48.119635] }, - { - "out": 0, - "in": 2, - "entry": [true, false, false], - "bearings": [135, 240, 315], - "location": [11.600215, 48.160767] - } - ], - "driving_side": "right", - "maneuver": { - "bearing_after": 122, - "bearing_before": 115, - "location": [11.591352, 48.176148], - "modifier": "slight left", - "type": "merge" - }, - "geometry": "}k`eH}|veAx@gCfAcDrA{DRm@Pw@l@aBdAkCz@uBx@qBjAsCTk@jCuG^w@Ve@JOHKNOLMPMTKNGXINAPAP?N@VB\\Jz@`@v@f@~A~@tA|@r@`@LHNJnElChFbDp@b@rC`BdDjA~ATvAEZEREf@Mh@Wb@Wv@o@d@c@d@q@l@gAhAaC~AsDfBoDr@sA|@sA\\a@Z_@p@q@HIbAu@rBwAd@[`Ay@b@a@X[TYLQ", - "ref": "B 2R", - "name": "Schenkendorfstraße", - "mode": "driving", - "weight": 204.3, - "duration": 204.3, - "distance": 2597.8 - }, - { - "intersections": [ - { - "out": 1, - "in": 2, - "entry": [true, true, false], - "bearings": [135, 165, 330], - "location": [11.602935, 48.15794] - } - ], - "driving_side": "right", - "geometry": "cz|dHkeyeA^On@i@RKVIRCP?Z@", - "maneuver": { - "bearing_after": 160, - "bearing_before": 143, - "location": [11.602935, 48.15794], - "modifier": "slight right", - "type": "off ramp" - }, - "name": "", - "mode": "driving", - "weight": 10.2, - "duration": 10.2, - "distance": 112.4 - }, - { - "intersections": [ - { - "out": 1, - "in": 0, - "entry": [false, true], - "bearings": [0, 195], - "location": [11.603349, 48.15699] - }, - { - "out": 2, - "in": 1, - "entry": [false, false, true], - "bearings": [15, 30, 210], - "location": [11.602462, 48.15569] - }, - { - "lanes": [ - { - "valid": true, - "indications": [ - "straight" - ] - }, - { - "valid": true, - "indications": [ - "straight" - ] - }, - { - "valid": false, - "indications": [ - "right" - ] - } - ], - "out": 2, - "in": 0, - "entry": [false, false, true, true], - "bearings": [30, 120, 210, 300], - "location": [11.600841, 48.153617] - }, - { - "out": 2, - "in": 0, - "entry": [false, true, true, false], - "bearings": [30, 120, 210, 300], - "location": [11.600753, 48.153505] - } - ], - "driving_side": "right", - "geometry": "et|dH}gyeAt@TdAn@fCjBxCvBvDnCNJf@^RNTPVPtCrBrCvB", - "maneuver": { - "bearing_after": 194, - "bearing_before": 182, - "location": [11.603349, 48.15699], - "modifier": "straight", - "type": "new name" - }, - "name": "Ifflandstraße", - "mode": "driving", - "weight": 59.3, - "duration": 59.3, - "distance": 636.4 - }, - { - "intersections": [ - { - "out": 2, - "in": 0, - "entry": [false, true, true], - "bearings": [28, 208, 216], - "location": [11.599475, 48.151895] - } - ], - "driving_side": "right", - "geometry": "kt{dHwoxeAf@j@nAnAz@v@fB|Ah@d@zAtADDJHB@", - "maneuver": { - "bearing_after": 215, - "bearing_before": 208, - "location": [11.599475, 48.151895], - "modifier": "slight right", - "type": "continue" - }, - "name": "Ifflandstraße", - "mode": "driving", - "weight": 32.8, - "duration": 32.8, - "distance": 288.7 - }, - { - "intersections": [ { "lanes": [ { @@ -1604,12 +2528,6 @@ }, { "valid": true, - "indications": [ - "left" - ] - }, - { - "valid": false, "indications": [ "straight", "right" @@ -1617,10 +2535,10 @@ } ], "out": 1, - "in": 0, - "entry": [false, true, true, true], - "bearings": [30, 120, 210, 315], - "location": [11.597403, 48.149701] + "in": 3, + "entry": [false, true, true, false], + "bearings": [45, 120, 225, 300], + "location": [11.583557, 48.119082] }, { "lanes": [ @@ -1630,12 +2548,6 @@ "left" ] }, - { - "valid": true, - "indications": [ - "straight" - ] - }, { "valid": true, "indications": [ @@ -1646,409 +2558,57 @@ "out": 1, "in": 3, "entry": [true, true, false, false], - "bearings": [30, 120, 210, 300], - "location": [11.597669, 48.149574] - }, - { - "out": 0, - "in": 1, - "entry": [true, false], - "bearings": [120, 300], - "location": [11.598155, 48.149349] - } - ], - "driving_side": "right", - "geometry": "sf{dHwbxeAFQPc@DMBI`@iArAyD", - "maneuver": { - "bearing_after": 125, - "bearing_before": 210, - "location": [11.597403, 48.149701], - "modifier": "left", - "type": "turn" - }, - "name": "Tivolistraße", - "mode": "driving", - "weight": 15.7, - "duration": 15.7, - "distance": 151.7 - }, - { - "intersections": [ - { - "out": 0, - "in": 1, - "entry": [true, false], - "bearings": [120, 300], - "location": [11.599088, 48.148934] + "bearings": [45, 135, 210, 300], + "location": [11.583658, 48.118975] }, { "out": 0, "in": 2, "entry": [true, true, false], - "bearings": [90, 210, 300], - "location": [11.599395, 48.148828] - }, + "bearings": [105, 210, 300], + "location": [11.585411, 48.118397] + } + ], + "driving_side": "right", + "geometry": "ikudH}cueADADCDEFIDEBEBIBGXkABMH]FQJW@EJW@A@CFOBCBCBCFGFIBGHYZ_BRiARaAXeALm@BSRm@\\gAL]N_@h@oAt@cB", + "maneuver": { + "bearing_after": 163, + "bearing_before": 164, + "location": [11.582225, 48.119731], + "modifier": "straight", + "type": "new name" + }, + "name": "Sankt-Bonifatius-Straße", + "mode": "driving", + "weight": 45.2, + "duration": 45.2, + "distance": 477.6 + }, + { + "intersections": [ { "out": 1, "in": 2, "entry": [false, true, false], - "bearings": [15, 90, 270], - "location": [11.599725, 48.148802] - }, - { - "out": 1, - "in": 2, - "entry": [true, true, false], - "bearings": [0, 90, 270], - "location": [11.599901, 48.148804] - }, - { - "out": 0, - "in": 2, - "entry": [true, true, false], - "bearings": [90, 165, 270], - "location": [11.600968, 48.148838] - } - ], - "driving_side": "right", - "geometry": "ya{dHimxeAL_@D]@K@K?I@I?U?a@AY?K?]AM?k@Ac@As@?YAS?UAO?K?IAI?MAMAOAMAMG}@", - "maneuver": { - "bearing_after": 122, - "bearing_before": 122, - "location": [11.599088, 48.148934], - "modifier": "slight left", - "type": "turn" - }, - "name": "Montgelasstraße", - "mode": "driving", - "weight": 25.2, - "duration": 25.2, - "distance": 237.6 - }, - { - "intersections": [ - { - "out": 1, - "in": 2, - "entry": [true, true, false, false], - "bearings": [75, 165, 255, 345], - "location": [11.60222, 48.148954] - }, - { - "out": 2, - "in": 0, - "entry": [false, true, true, true], - "bearings": [15, 30, 195, 300], - "location": [11.602633, 48.147147] - } - ], - "driving_side": "right", - "geometry": "}a{dH{`yeA@?FCHCFCJEJGb@a@LKZYRMHGRCJAj@Bh@HpA\\THp@^", - "maneuver": { - "bearing_after": 165, - "bearing_before": 77, - "location": [11.60222, 48.148954], - "modifier": "right", - "type": "turn" - }, - "name": "Möhlstraße", - "mode": "driving", - "weight": 25.5, - "duration": 25.5, - "distance": 256.2 - }, - { - "intersections": [ - { - "out": 1, - "in": 0, - "entry": [false, true, true], - "bearings": [30, 165, 210], - "location": [11.602419, 48.146794] - } - ], - "driving_side": "right", - "geometry": "mtzdHcbyeAHCJKv@}BFQFKDCLIDABA", - "maneuver": { - "bearing_after": 158, - "bearing_before": 202, - "location": [11.602419, 48.146794], - "modifier": "left", - "type": "turn" - }, - "name": "Hompeschstraße", - "mode": "driving", - "weight": 11.4, - "duration": 11.4, - "distance": 102.7 - }, - { - "intersections": [ - { - "out": 1, - "in": 3, - "entry": [false, true, true, false], - "bearings": [45, 165, 225, 345], - "location": [11.603366, 48.146173] - }, - { - "out": 0, - "in": 2, - "entry": [true, true, false], - "bearings": [120, 210, 315], - "location": [11.604399, 48.145437] + "bearings": [120, 135, 315], + "location": [11.58754, 48.117431] }, { "out": 0, "in": 2, "entry": [true, true, false], "bearings": [105, 195, 300], - "location": [11.605643, 48.145061] - } - ], - "driving_side": "right", - "geometry": "qpzdHahyeA@?FCLENQXa@P[|@sB^yAPcATmABKBSZwBDWLUXW", - "maneuver": { - "bearing_after": 161, - "bearing_before": 158, - "location": [11.603366, 48.146173], - "modifier": "straight", - "type": "new name" - }, - "name": "Sternwartstraße", - "mode": "driving", - "weight": 29.9, - "duration": 29.9, - "distance": 308.6 - }, - { - "intersections": [ - { - "out": 2, - "in": 3, - "entry": [false, true, true, false], - "bearings": [60, 120, 195, 330], - "location": [11.606691, 48.144671] - }, - { - "out": 1, - "in": 0, - "entry": [true, true], - "bearings": [15, 180], - "location": [11.606642, 48.144416] - }, - { - "out": 1, - "in": 0, - "entry": [false, true, true], - "bearings": [0, 180, 270], - "location": [11.606673, 48.143122] - }, - { - "out": 2, - "in": 0, - "entry": [false, true, true], - "bearings": [0, 90, 180], - "location": [11.606676, 48.143071] - }, - { - "out": 1, - "in": 0, - "entry": [false, true, true], - "bearings": [0, 180, 270], - "location": [11.606669, 48.142263] - }, - { - "out": 2, - "in": 0, - "entry": [false, true, true], - "bearings": [0, 90, 180], - "location": [11.606666, 48.142107] - }, - { - "out": 1, - "in": 0, - "entry": [false, true, false], - "bearings": [0, 180, 270], - "location": [11.606637, 48.140947] - }, - { - "out": 2, - "in": 0, - "entry": [false, true, true], - "bearings": [0, 90, 180], - "location": [11.606636, 48.140896] - } - ], - "driving_side": "right", - "geometry": "egzdHy|yeADFHBN@PCZ?X?lEEHAvC@H?P?J?J?pEDH?H?J@tEDH?HBDB", - "maneuver": { - "bearing_after": 201, - "bearing_before": 146, - "location": [11.606691, 48.144671], - "modifier": "slight right", - "type": "turn" - }, - "name": "Possartstraße", - "mode": "driving", - "weight": 52.6, - "duration": 52.6, - "distance": 561.5 - }, - { - "intersections": [ - { - "out": 2, - "in": 0, - "entry": [false, false, true, true], - "bearings": [15, 120, 210, 285], - "location": [11.606562, 48.13964] - }, - { - "out": 1, - "in": 0, - "entry": [false, true, false], - "bearings": [30, 135, 285], - "location": [11.606489, 48.139545] - }, - { - "out": 1, - "in": 2, - "entry": [true, true, false], - "bearings": [45, 135, 315], - "location": [11.606953, 48.139269] - } - ], - "driving_side": "right", - "geometry": "wgydH_|yeAPLBIBKBC@GDGBG^i@R[PYFKBC@C@E?C@C?K@U@S", - "maneuver": { - "bearing_after": 206, - "bearing_before": 195, - "location": [11.606562, 48.13964], - "modifier": "left", - "type": "end of road" - }, - "name": "Prinzregentenstraße", - "mode": "driving", - "weight": 16.6, - "duration": 16.6, - "distance": 123.7 - }, - { - "intersections": [ - { - "lanes": [ - { - "valid": false, - "indications": [ - "straight" - ] - }, - { - "valid": false, - "indications": [ - "straight" - ] - }, - { - "valid": true, - "indications": [ - "right" - ] - } - ], - "out": 1, - "in": 2, - "entry": [true, true, false], - "bearings": [105, 165, 285], - "location": [11.607658, 48.13897] + "location": [11.587974, 48.117196] }, { "out": 1, "in": 3, "entry": [true, true, true, false], - "bearings": [75, 150, 255, 345], - "location": [11.608134, 48.137694] - }, - { - "out": 1, - "in": 2, - "entry": [false, true, false], - "bearings": [60, 150, 330], - "location": [11.60851, 48.137161] + "bearings": [0, 90, 195, 285], + "location": [11.588754, 48.117105] }, { "lanes": [ - { - "valid": true, - "indications": [ - "straight", - "right" - ] - } - ], - "out": 1, - "in": 3, - "entry": [false, true, true, false], - "bearings": [75, 150, 240, 345], - "location": [11.60899, 48.136367] - }, - { - "lanes": [ - { - "valid": true, - "indications": [ - "straight", - "right" - ] - } - ], - "out": 1, - "in": 3, - "entry": [false, true, false, false], - "bearings": [75, 150, 255, 330], - "location": [11.609081, 48.136222] - }, - { - "out": 0, - "in": 2, - "entry": [true, true, false], - "bearings": [150, 240, 330], - "location": [11.609655, 48.135327] - }, - { - "out": 0, - "in": 2, - "entry": [true, true, false], - "bearings": [165, 255, 345], - "location": [11.610205, 48.134226] - } - ], - "driving_side": "right", - "geometry": "qcydH{bzeATCPCRCLCf@KZIFCZKLEVKZOJEFGhAs@VOp@c@h@a@h@OFCNEJG@?BAFEBADCXOxAy@h@YLKJGPKDCVM\\QNKJELE\\KXG^IVCPCPATAN?N?H@H?JBZBf@DVDXFXJPFD@VL", - "maneuver": { - "bearing_after": 171, - "bearing_before": 105, - "location": [11.607658, 48.13897], - "modifier": "right", - "type": "turn" - }, - "name": "Grillparzerstraße", - "mode": "driving", - "weight": 75.3, - "duration": 75.3, - "distance": 754.5 - }, - { - "intersections": [ - { - "lanes": [ - { - "valid": true, - "indications": [ - "left" - ] - }, { "valid": true, "indications": [ @@ -2058,184 +2618,31 @@ { "valid": false, "indications": [ - "straight", - "right" - ] - } - ], - "out": 1, - "in": 0, - "entry": [false, true, true, true], - "bearings": [15, 150, 195, 285], - "location": [11.609943, 48.132537] - }, - { - "out": 1, - "in": 3, - "entry": [false, true, false, false], - "bearings": [105, 135, 225, 330], - "location": [11.61, 48.132481] - }, - { - "lanes": [ - { - "valid": true, - "indications": [ - "left" - ] - }, - { - "valid": true, - "indications": [ - "left" + "straight" ] } ], "out": 0, "in": 2, "entry": [true, false, false], - "bearings": [120, 210, 345], - "location": [11.610169, 48.132366] - }, - { - "out": 0, - "classes": [ - "tunnel" - ], - "in": 1, - "entry": [true, false], - "bearings": [120, 300], - "location": [11.61093, 48.132044] - }, - { - "out": 0, - "in": 1, - "entry": [true, false], - "bearings": [120, 300], - "location": [11.611773, 48.131666] + "bearings": [105, 180, 285], + "location": [11.589582, 48.117035] } ], "driving_side": "right", + "geometry": "}|tdHceveALSHOJYDKBKBQDs@Bq@@I@Y?YJiB@W?IDo@?G", "maneuver": { - "bearing_after": 144, - "bearing_before": 195, - "location": [11.609943, 48.132537], - "modifier": "left", - "type": "turn" + "bearing_after": 135, + "bearing_before": 127, + "location": [11.58754, 48.117431], + "modifier": "straight", + "type": "new name" }, - "geometry": "k{wdHcqzeAJKBE@C@ADEFOFU@Av@_ChAgDHY", - "ref": "B 304", - "name": "Berg-am-Laim-Straße", + "name": "Sankt-Martins-Platz", "mode": "driving", - "weight": 16.8, - "duration": 16.8, - "distance": 178.8 - }, - { - "intersections": [ - { - "out": 1, - "in": 2, - "entry": [true, true, false], - "bearings": [120, 180, 300], - "location": [11.611895, 48.131615] - }, - { - "out": 2, - "in": 0, - "entry": [false, true, true], - "bearings": [0, 60, 210], - "location": [11.611904, 48.131429] - }, - { - "out": 2, - "in": 0, - "entry": [false, true, true], - "bearings": [30, 135, 210], - "location": [11.610881, 48.13037] - }, - { - "out": 2, - "in": 0, - "entry": [false, true, true], - "bearings": [30, 135, 210], - "location": [11.610244, 48.129688] - }, - { - "out": 2, - "in": 0, - "entry": [false, true, true], - "bearings": [30, 135, 210], - "location": [11.609659, 48.129088] - }, - { - "out": 2, - "in": 0, - "entry": [false, true, true], - "bearings": [45, 135, 225], - "location": [11.607306, 48.127343] - }, - { - "out": 2, - "in": 0, - "entry": [false, true, true], - "bearings": [45, 135, 225], - "location": [11.605645, 48.126239] - }, - { - "out": 2, - "in": 0, - "entry": [false, true, true], - "bearings": [45, 135, 225], - "location": [11.604985, 48.1258] - } - ], - "driving_side": "right", - "geometry": "suwdHk}zeAJAN?H@tBrB|AvAfC~BvBrBLLXX\\\\@@LLRTDFPRBFXf@LTNV`@p@NVPZ^n@JRJNFLJN@DLPFLPZBBXh@T\\n@fA@@tA`CDHFLnAtB~@~A`@r@DFrA|B@DLPBFDDdAhB\\l@FJh@|@NVHJ", - "maneuver": { - "bearing_after": 177, - "bearing_before": 120, - "location": [11.611895, 48.131615], - "modifier": "right", - "type": "turn" - }, - "name": "Friedenstraße", - "mode": "driving", - "weight": 142.3, - "duration": 142.3, - "distance": 1142 - }, - { - "intersections": [ - { - "out": 1, - "in": 0, - "entry": [false, true, true, true], - "bearings": [45, 135, 225, 315], - "location": [11.602079, 48.123854] - }, - { - "out": 0, - "in": 2, - "entry": [true, true, false], - "bearings": [150, 240, 330], - "location": [11.60428, 48.122223] - } - ], - "driving_side": "right", - "geometry": "aevdH_`yeAPMDEx@aB`AkBl@eAZc@Z_@PSx@w@Z_@`CcC", - "maneuver": { - "bearing_after": 130, - "bearing_before": 223, - "location": [11.602079, 48.123854], - "modifier": "left", - "type": "turn" - }, - "name": "Rosenheimer Straße", - "mode": "driving", - "weight": 31.8, - "duration": 31.8, - "distance": 353.4 + "weight": 23, + "duration": 23, + "distance": 184.1 }, { "intersections": [ @@ -2244,49 +2651,21 @@ { "valid": true, "indications": [ - "right" + "left" ] }, { - "valid": true, + "valid": false, "indications": [ - "right" + "straight" ] } ], - "out": 1, + "out": 0, "in": 2, "entry": [true, true, false], - "bearings": [135, 165, 330], - "location": [11.605099, 48.121429] - }, - { - "lanes": [ - { - "valid": true, - "indications": [ - "right" - ] - }, - { - "valid": true, - "indications": [ - "right" - ] - } - ], - "out": 2, - "in": 0, - "entry": [false, false, true], - "bearings": [45, 60, 240], - "location": [11.605401, 48.120687] - }, - { - "out": 1, - "in": 0, - "entry": [false, true, true], - "bearings": [75, 255, 345], - "location": [11.602518, 48.120034] + "bearings": [60, 105, 285], + "location": [11.589863, 48.117007] }, { "lanes": [ @@ -2299,53 +2678,52 @@ { "valid": true, "indications": [ - "straight", - "right" + "straight" ] } ], - "out": 2, - "in": 0, - "entry": [false, true, true, true], - "bearings": [75, 165, 255, 345], - "location": [11.60013, 48.119533] + "out": 0, + "in": 3, + "entry": [true, false, false, false, false], + "bearings": [30, 120, 165, 240, 285], + "location": [11.590072, 48.117089] }, { - "out": 2, - "in": 0, - "entry": [false, true, true], + "out": 0, + "in": 2, + "entry": [true, true, false], "bearings": [75, 165, 255], - "location": [11.598066, 48.119071] + "location": [11.591309, 48.117459] }, { - "out": 3, - "in": 1, - "entry": [true, false, true, true], - "bearings": [15, 75, 165, 240], - "location": [11.595294, 48.118425] + "out": 0, + "in": 2, + "entry": [true, true, false], + "bearings": [75, 165, 255], + "location": [11.592971, 48.117844] } ], "driving_side": "right", - "geometry": "}uudH{ryeAh@YbAs@JC@AFBDBHNR~@Tv@Hr@Hp@DZJbARdBVtB?HFZ@LBN?F^tCHn@Fd@Hf@D^DZJx@BRDXD^@NLz@BTL~@VdBFb@Hf@Hf@Jp@DVDVHr@Lx@l@lENfAPdAXvA`@dC", + "geometry": "iztdHssveAESAIGKIGGGCEEYKq@E][wBeAmHE]EYG[k@{D", "maneuver": { - "bearing_after": 157, - "bearing_before": 144, - "location": [11.605099, 48.121429], - "modifier": "right", + "bearing_after": 59, + "bearing_before": 98, + "location": [11.589863, 48.117007], + "modifier": "left", "type": "turn" }, "name": "Sankt-Martin-Straße", "mode": "driving", - "weight": 97.5, - "duration": 97.5, - "distance": 976.1 + "weight": 34.4, + "duration": 34.4, + "distance": 347.9 }, { "intersections": [ { "out": 1, - "in": 0, - "entry": [false, true, true], + "in": 2, + "entry": [true, true, false], "bearings": [75, 165, 255], "location": [11.594178, 48.118127] } @@ -2354,9 +2732,9 @@ "geometry": "iaudHsnweAPCJCRETELCh@Al@Bp@DxAF", "maneuver": { "bearing_after": 168, - "bearing_before": 247, + "bearing_before": 70, "location": [11.594178, 48.118127], - "modifier": "left", + "modifier": "right", "type": "turn" }, "name": "Hohenwaldeckstraße", @@ -2390,25 +2768,1933 @@ "distance": 0 } ], - "weight": 1083.7, - "summary": "Isarring, Friedenstraße", - "duration": 1083.7, - "distance": 10850.7 + "weight": 1139.2, + "summary": "Belgradstraße, Ludwigstraße", + "duration": 1139.2, + "distance": 10414.8 } ], "weight_name": "routability", - "geometry": "eobeHgvteABaZrz@}BN{P~EyTfZkt@~E\\~\\tSxJtAfFwCpOiYzR{Mpl@dd@nD{KYgP~D}BxFpA|KqY~^f@rBiF`YsMbMJvDgKzRfQt[bj@lRgThOreAxHG", - "weight": 1083.7, - "duration": 1083.7, - "distance": 10850.7 + "geometry": "sfbeH{qteAUjR`G^W`S|`@sAfKlCbhCiPXcDrEc@p@oJrBfAhDoXxj@dRbEw^tAcA~OlG`LgJ~PvDzGvJvIgHrCcHtQza@dPsYzL`O`IwFxItClGgDjNac@`@gJ_F_ZxHG", + "weight": 1139.2, + "duration": 1139.2, + "distance": 10414.8 + }, + { + "legs": [ + { + "steps": [ + { + "intersections": [ + { + "out": 0, + "entry": [true], + "bearings": [273], + "location": [11.579345, 48.185544] + }, + { + "out": 3, + "in": 1, + "entry": [true, false, false, true], + "bearings": [0, 90, 195, 270], + "location": [11.578423, 48.185574] + } + ], + "driving_side": "right", + "geometry": "sfbeH{qteAAf@Af@?f@Aj@?RA^A\\?XAf@Ab@?LAb@At@?n@Ad@A`@AZ", + "maneuver": { + "bearing_after": 273, + "bearing_before": 0, + "location": [11.579345, 48.185544], + "modifier": "right", + "type": "depart" + }, + "name": "Vogelhartstraße", + "mode": "driving", + "weight": 33.6, + "duration": 33.6, + "distance": 224.1 + }, + { + "intersections": [ + { + "out": 2, + "in": 1, + "entry": [true, false, true], + "bearings": [0, 90, 255], + "location": [11.576336, 48.185655] + } + ], + "driving_side": "right", + "geometry": "kgbeHc_teA@RHJXBX@T@X@f@@b@@d@@X@F@", + "maneuver": { + "bearing_after": 251, + "bearing_before": 272, + "location": [11.576336, 48.185655], + "modifier": "slight left", + "type": "new name" + }, + "name": "Bad-Kreuznacher-Straße", + "mode": "driving", + "weight": 25.2, + "duration": 25.2, + "distance": 152.4 + }, + { + "intersections": [ + { + "out": 3, + "in": 0, + "entry": [false, true, false, true], + "bearings": [0, 90, 180, 270], + "location": [11.576084, 48.184359] + }, + { + "out": 2, + "in": 0, + "entry": [false, true, true], + "bearings": [90, 180, 270], + "location": [11.575007, 48.184411] + } + ], + "driving_side": "right", + "geometry": "g_beHo}seACbA?N?NA`@AN?NAn@E~CEnCAlA?N?\\", + "maneuver": { + "bearing_after": 272, + "bearing_before": 181, + "location": [11.576084, 48.184359], + "modifier": "right", + "type": "turn" + }, + "name": "Milbertshofener Straße", + "mode": "driving", + "weight": 45.8, + "duration": 45.8, + "distance": 239.3 + }, + { + "intersections": [ + { + "lanes": [ + { + "valid": true, + "indications": [ + "left" + ] + }, + { + "valid": false, + "indications": [ + "none" + ] + } + ], + "out": 2, + "in": 1, + "entry": [true, false, true, true], + "bearings": [0, 90, 180, 270], + "location": [11.572872, 48.184483] + }, + { + "out": 2, + "in": 0, + "entry": [false, true, true, true], + "bearings": [0, 90, 180, 255], + "location": [11.572942, 48.183552] + }, + { + "out": 2, + "in": 0, + "entry": [false, true, true, true], + "bearings": [0, 90, 180, 270], + "location": [11.573003, 48.182772] + }, + { + "out": 2, + "in": 0, + "entry": [false, true, true, true], + "bearings": [0, 90, 180, 270], + "location": [11.573079, 48.18177] + }, + { + "out": 2, + "in": 0, + "entry": [false, true, true, false], + "bearings": [0, 90, 180, 270], + "location": [11.573147, 48.180878] + }, + { + "out": 2, + "in": 0, + "entry": [false, false, true, true], + "bearings": [0, 105, 180, 270], + "location": [11.573231, 48.180056] + }, + { + "out": 2, + "in": 0, + "entry": [false, false, true, false], + "bearings": [0, 90, 180, 255], + "location": [11.573286, 48.179045] + } + ], + "driving_side": "right", + "geometry": "_`beHmiseARAH?fAEh@Ch@AzCKnBIJ?r@CD?PARAD?b@AZAvAGlCMTA`BGn@Cv@?TJXDj@JLBNBf@LFBPDHF", + "maneuver": { + "bearing_after": 175, + "bearing_before": 271, + "location": [11.572872, 48.184483], + "modifier": "left", + "type": "turn" + }, + "name": "Knorrstraße", + "mode": "driving", + "weight": 68.9, + "duration": 68.9, + "distance": 718.2 + }, + { + "intersections": [ + { + "lanes": [ + { + "valid": false, + "indications": [ + "left" + ] + }, + { + "valid": false, + "indications": [ + "left" + ] + }, + { + "valid": false, + "indications": [ + "straight" + ] + }, + { + "valid": true, + "indications": [ + "straight", + "right" + ] + } + ], + "out": 3, + "in": 0, + "entry": [false, false, true, true], + "bearings": [15, 75, 195, 255], + "location": [11.572944, 48.17806] + }, + { + "out": 1, + "in": 0, + "entry": [false, true, true], + "bearings": [75, 255, 345], + "location": [11.570791, 48.177581] + }, + { + "out": 1, + "in": 0, + "entry": [false, true, true], + "bearings": [60, 240, 345], + "location": [11.569266, 48.177158] + } + ], + "driving_side": "right", + "geometry": "{w`eH{iseABf@D`@Bd@Fp@Hn@FZHp@Ll@Jf@FTBFFXDXLt@TnAFX`@tBFVLv@T|A\\fB?HDZ", + "maneuver": { + "bearing_after": 258, + "bearing_before": 194, + "location": [11.572944, 48.17806], + "modifier": "right", + "type": "turn" + }, + "name": "Petuelring", + "mode": "driving", + "weight": 39.6, + "duration": 39.6, + "distance": 418.4 + }, + { + "intersections": [ + { + "lanes": [ + { + "valid": true, + "indications": [ + "left" + ] + }, + { + "valid": true, + "indications": [ + "left" + ] + }, + { + "valid": false, + "indications": [ + "straight" + ] + }, + { + "valid": false, + "indications": [ + "straight", + "right" + ] + } + ], + "out": 2, + "in": 0, + "entry": [false, false, true, true], + "bearings": [75, 180, 255, 345], + "location": [11.567687, 48.176755] + }, + { + "lanes": [ + { + "valid": true, + "indications": [ + "left" + ] + }, + { + "valid": true, + "indications": [ + "left" + ] + }, + { + "valid": false, + "indications": [ + "straight" + ] + }, + { + "valid": false, + "indications": [ + "straight", + "right" + ] + } + ], + "out": 2, + "in": 1, + "entry": [false, false, true, true], + "bearings": [0, 75, 180, 255], + "location": [11.567535, 48.176724] + }, + { + "lanes": [ + { + "valid": false, + "indications": [ + "left" + ] + }, + { + "valid": true, + "indications": [ + "straight" + ] + }, + { + "valid": true, + "indications": [ + "straight", + "right" + ] + } + ], + "out": 2, + "in": 0, + "entry": [false, true, true, false], + "bearings": [0, 60, 180, 240], + "location": [11.567504, 48.176486] + }, + { + "out": 1, + "in": 0, + "entry": [false, true, false], + "bearings": [15, 240, 345], + "location": [11.567362, 48.176127] + }, + { + "out": 2, + "in": 0, + "entry": [false, true, true], + "bearings": [60, 180, 240], + "location": [11.567021, 48.175947] + }, + { + "out": 2, + "in": 0, + "entry": [false, false, true], + "bearings": [60, 120, 240], + "location": [11.566812, 48.175877] + }, + { + "out": 1, + "in": 0, + "entry": [false, true, true], + "bearings": [60, 225, 330], + "location": [11.566441, 48.175733] + }, + { + "out": 1, + "in": 0, + "entry": [false, true, true], + "bearings": [15, 195, 300], + "location": [11.565936, 48.174978] + }, + { + "out": 1, + "in": 0, + "entry": [false, true, true], + "bearings": [15, 195, 285], + "location": [11.564908, 48.17243] + }, + { + "out": 1, + "in": 0, + "entry": [false, true, true], + "bearings": [0, 180, 225], + "location": [11.564413, 48.170856] + }, + { + "out": 2, + "in": 0, + "entry": [false, false, true, false], + "bearings": [0, 135, 165, 315], + "location": [11.56443, 48.170396] + }, + { + "out": 0, + "in": 2, + "entry": [true, false, false], + "bearings": [165, 330, 345], + "location": [11.564542, 48.169944] + }, + { + "lanes": [ + { + "valid": true, + "indications": [ + "left" + ] + }, + { + "valid": true, + "indications": [ + "straight" + ] + }, + { + "valid": true, + "indications": [ + "straight", + "right" + ] + } + ], + "out": 2, + "in": 0, + "entry": [false, false, true, true], + "bearings": [0, 120, 180, 285], + "location": [11.564803, 48.16798] + }, + { + "lanes": [ + { + "valid": false, + "indications": [ + "left" + ] + }, + { + "valid": true, + "indications": [ + "straight" + ] + }, + { + "valid": true, + "indications": [ + "straight", + "right" + ] + } + ], + "out": 2, + "in": 0, + "entry": [false, true, true, false], + "bearings": [0, 90, 180, 285], + "location": [11.564794, 48.167888] + }, + { + "out": 1, + "in": 0, + "entry": [false, true, false], + "bearings": [0, 180, 270], + "location": [11.564681, 48.166381] + }, + { + "out": 2, + "in": 0, + "entry": [false, true, true, false], + "bearings": [15, 120, 195, 270], + "location": [11.564397, 48.164558] + }, + { + "out": 2, + "in": 0, + "entry": [false, true, true, true], + "bearings": [15, 105, 195, 285], + "location": [11.564079, 48.163493] + }, + { + "out": 1, + "in": 0, + "entry": [false, true, true], + "bearings": [15, 195, 285], + "location": [11.563644, 48.161933] + }, + { + "lanes": [ + { + "valid": true, + "indications": [ + "straight" + ] + }, + { + "valid": false, + "indications": [ + "straight", + "right" + ] + } + ], + "out": 2, + "in": 0, + "entry": [false, false, true, true], + "bearings": [15, 105, 180, 285], + "location": [11.563352, 48.160984] + }, + { + "out": 2, + "in": 0, + "entry": [false, true, true, false], + "bearings": [0, 105, 195, 285], + "location": [11.563342, 48.160869] + }, + { + "lanes": [ + { + "valid": false, + "indications": [ + "left" + ] + }, + { + "valid": true, + "indications": [ + "straight" + ] + }, + { + "valid": false, + "indications": [ + "right" + ] + } + ], + "out": 2, + "in": 0, + "entry": [false, true, true, true], + "bearings": [15, 105, 195, 285], + "location": [11.563042, 48.159811] + }, + { + "out": 1, + "in": 0, + "entry": [false, true, true], + "bearings": [15, 195, 285], + "location": [11.56285, 48.159053] + }, + { + "out": 2, + "in": 0, + "entry": [false, true, true, true], + "bearings": [15, 105, 195, 285], + "location": [11.562633, 48.158358] + }, + { + "out": 2, + "in": 0, + "entry": [false, false, true], + "bearings": [15, 105, 195], + "location": [11.562463, 48.157828] + }, + { + "out": 2, + "in": 0, + "entry": [false, true, true, true], + "bearings": [15, 105, 195, 285], + "location": [11.56224, 48.157186] + }, + { + "out": 2, + "in": 0, + "entry": [false, true, true, true], + "bearings": [15, 120, 195, 285], + "location": [11.561858, 48.156099] + }, + { + "lanes": [ + { + "valid": false, + "indications": [ + "left" + ] + }, + { + "valid": true, + "indications": [ + "none" + ] + } + ], + "out": 2, + "in": 0, + "entry": [false, true, true, true], + "bearings": [15, 120, 195, 300], + "location": [11.561224, 48.154438] + }, + { + "out": 2, + "in": 0, + "entry": [false, false, true, false], + "bearings": [15, 120, 195, 300], + "location": [11.56083, 48.153389] + } + ], + "driving_side": "right", + "geometry": "wo`eHaireAF\\l@FVBZFRNLNN\\DTLh@Lf@BHHR@BHNNPFJNHDB\\L~@Xt@Tf@NhA\\|Ab@fA\\nDfAh@NJB`Bb@l@PVFZFd@DXBV?X?J?@?ZCRCLCx@MzCk@z@KhACjADF?F?H@P@T?z@Df@ArBHn@DN@d@@z@Dl@DvBTtAPL@LBhDr@JBPBPB|@NVBn@LjCj@RDZHv@Nz@RF@TDJ@B@B?D?@?B?D@P@H@r@L`B^HBVDPBF@F?N?n@Nt@Nf@LvAXHBJB|A\\lBd@PDRDjBf@`ATD@PDTDD@tDdAXHrA`@JDhEjAF@JBLBvA^n@J`AVB@H@", + "maneuver": { + "bearing_after": 251, + "bearing_before": 248, + "location": [11.567687, 48.176755], + "modifier": "left", + "type": "turn" + }, + "name": "Schleißheimer Straße", + "mode": "driving", + "weight": 288.7, + "duration": 288.7, + "distance": 2841.3 + }, + { + "intersections": [ + { + "lanes": [ + { + "valid": true, + "indications": [ + "right" + ] + }, + { + "valid": true, + "indications": [ + "right" + ] + } + ], + "out": 3, + "in": 0, + "entry": [false, false, false, true], + "bearings": [15, 105, 195, 240], + "location": [11.560431, 48.152182] + }, + { + "out": 2, + "in": 0, + "entry": [false, false, true], + "bearings": [60, 135, 240], + "location": [11.560143, 48.152095] + } + ], + "driving_side": "right", + "geometry": "cv{dHu{peA?B?D?B@B?B@B@DHXb@dAN^n@~ANZf@fAHRj@rAFLFP", + "maneuver": { + "bearing_after": 239, + "bearing_before": 192, + "location": [11.560431, 48.152182], + "modifier": "right", + "type": "turn" + }, + "name": "Maßmannstraße", + "mode": "driving", + "weight": 22.5, + "duration": 22.5, + "distance": 228.1 + }, + { + "intersections": [ + { + "lanes": [ + { + "valid": true, + "indications": [ + "left" + ] + }, + { + "valid": true, + "indications": [ + "straight" + ] + }, + { + "valid": false, + "indications": [ + "right" + ] + } + ], + "out": 2, + "in": 0, + "entry": [false, false, true, true], + "bearings": [45, 150, 240, 315], + "location": [11.557973, 48.15097] + }, + { + "lanes": [ + { + "valid": true, + "indications": [ + "left" + ] + }, + { + "valid": false, + "indications": [ + "straight" + ] + }, + { + "valid": false, + "indications": [ + "right" + ] + } + ], + "out": 1, + "in": 0, + "entry": [false, true, true, false], + "bearings": [60, 165, 225, 330], + "location": [11.557789, 48.150883] + }, + { + "lanes": [ + { + "valid": true, + "indications": [ + "straight" + ] + }, + { + "valid": true, + "indications": [ + "straight" + ] + } + ], + "out": 1, + "in": 3, + "entry": [false, true, false, false], + "bearings": [90, 165, 255, 345], + "location": [11.558123, 48.150258] + } + ], + "driving_side": "right", + "geometry": "qn{dHilpeAFN@DFLPM\\OVM\\MDANENEFADAx@SrEw@@AhB]bAQV@H?XD", + "maneuver": { + "bearing_after": 233, + "bearing_before": 232, + "location": [11.557973, 48.15097], + "modifier": "left", + "type": "turn" + }, + "name": "Dachauer Straße", + "mode": "driving", + "weight": 42.5, + "duration": 42.5, + "distance": 393.6 + }, + { + "intersections": [ + { + "lanes": [ + { + "valid": false, + "indications": [ + "left" + ] + }, + { + "valid": true, + "indications": [ + "straight" + ] + }, + { + "valid": true, + "indications": [ + "straight", + "right" + ] + } + ], + "out": 2, + "in": 0, + "entry": [false, true, true, true], + "bearings": [0, 105, 195, 285], + "location": [11.558761, 48.147579] + }, + { + "out": 2, + "in": 0, + "entry": [false, false, true], + "bearings": [15, 135, 195], + "location": [11.558501, 48.146756] + }, + { + "lanes": [ + { + "valid": false, + "indications": [ + "left" + ] + }, + { + "valid": true, + "indications": [ + "straight" + ] + }, + { + "valid": true, + "indications": [ + "straight", + "right" + ] + } + ], + "out": 2, + "in": 0, + "entry": [false, true, true, true], + "bearings": [15, 120, 195, 300], + "location": [11.557898, 48.145593] + } + ], + "driving_side": "right", + "geometry": "kyzdHgqpeAXFfAT`ATZDPDHBZRzBdAHDNFTJlClAj@VbC`AHDNH", + "maneuver": { + "bearing_after": 191, + "bearing_before": 185, + "location": [11.558761, 48.147579], + "modifier": "straight", + "type": "new name" + }, + "name": "Seidlstraße", + "mode": "driving", + "weight": 44.4, + "duration": 44.4, + "distance": 447.7 + }, + { + "intersections": [ + { + "lanes": [ + { + "valid": true, + "indications": [ + "left" + ] + }, + { + "valid": false, + "indications": [ + "straight" + ] + }, + { + "valid": false, + "indications": [ + "straight", + "right" + ] + } + ], + "out": 2, + "in": 0, + "entry": [false, false, true, true], + "bearings": [15, 120, 210, 300], + "location": [11.556923, 48.143756] + }, + { + "lanes": [ + { + "valid": true, + "indications": [ + "left" + ] + }, + { + "valid": false, + "indications": [ + "straight" + ] + }, + { + "valid": false, + "indications": [ + "straight", + "right" + ] + } + ], + "out": 1, + "in": 0, + "entry": [false, true, true, false], + "bearings": [30, 105, 195, 300], + "location": [11.55685, 48.143647] + }, + { + "out": 1, + "in": 3, + "entry": [false, true, false, false], + "bearings": [30, 105, 195, 285], + "location": [11.557019, 48.143602] + }, + { + "out": 0, + "in": 2, + "entry": [true, true, false], + "bearings": [120, 210, 300], + "location": [11.559488, 48.142814] + } + ], + "driving_side": "right", + "geometry": "oazdHwepeATLHa@Hc@J_ABKBKRw@BMBODQ\\wAXgAVaALg@TgATo@L]@C", + "maneuver": { + "bearing_after": 203, + "bearing_before": 198, + "location": [11.556923, 48.143756], + "modifier": "left", + "type": "turn" + }, + "name": "Marsstraße", + "mode": "driving", + "weight": 34.6, + "duration": 34.6, + "distance": 298 + }, + { + "intersections": [ + { + "out": 0, + "in": 2, + "entry": [true, true, false, true], + "bearings": [120, 165, 300, 345], + "location": [11.560258, 48.142505] + }, + { + "lanes": [ + { + "valid": true, + "indications": [ + "left" + ] + }, + { + "valid": true, + "indications": [ + "straight" + ] + }, + { + "valid": true, + "indications": [ + "straight" + ] + }, + { + "valid": false, + "indications": [ + "right" + ] + } + ], + "out": 1, + "in": 3, + "entry": [false, true, true, false], + "bearings": [15, 120, 195, 300], + "location": [11.5614, 48.142051] + }, + { + "lanes": [ + { + "valid": false, + "indications": [ + "left" + ] + }, + { + "valid": true, + "indications": [ + "straight" + ] + }, + { + "valid": true, + "indications": [ + "straight" + ] + }, + { + "valid": false, + "indications": [ + "right" + ] + } + ], + "out": 1, + "in": 3, + "entry": [true, true, false, false], + "bearings": [15, 120, 195, 300], + "location": [11.561532, 48.142] + }, + { + "out": 0, + "in": 2, + "entry": [true, false, false], + "bearings": [120, 255, 300], + "location": [11.561926, 48.141892] + }, + { + "out": 0, + "in": 2, + "entry": [true, true, false], + "bearings": [120, 210, 300], + "location": [11.563118, 48.141511] + } + ], + "driving_side": "right", + "geometry": "uyydHszpeABEDMLe@HUBKZgAPk@FSHYDUHi@DOR{@r@eDBKVkATkA@Gb@sB\\cB\\}APy@T{@BI@G@G@EB]", + "maneuver": { + "bearing_after": 120, + "bearing_before": 125, + "location": [11.560258, 48.142505], + "modifier": "straight", + "type": "new name" + }, + "name": "Elisenstraße", + "mode": "driving", + "weight": 50.7, + "duration": 50.7, + "distance": 506.3 + }, + { + "intersections": [ + { + "out": 2, + "in": 3, + "entry": [false, true, true, false], + "bearings": [0, 105, 195, 285], + "location": [11.566365, 48.140518] + }, + { + "lanes": [ + { + "valid": true, + "indications": [ + "none" + ] + }, + { + "valid": true, + "indications": [ + "none" + ] + }, + { + "valid": true, + "indications": [ + "none" + ] + }, + { + "valid": false, + "indications": [ + "right" + ] + } + ], + "out": 1, + "in": 0, + "entry": [false, true, true], + "bearings": [45, 210, 300], + "location": [11.565433, 48.139736] + }, + { + "out": 2, + "in": 0, + "entry": [false, false, true, false], + "bearings": [15, 120, 195, 270], + "location": [11.565126, 48.13931] + } + ], + "driving_side": "right", + "geometry": "gmydHy`reADBDBFDDBFFz@lAl@z@BFFHBDDBJJDBHHDDFDDBHBTHJDFBD@F@FBJ@", + "maneuver": { + "bearing_after": 201, + "bearing_before": 102, + "location": [11.566365, 48.140518], + "modifier": "right", + "type": "turn" + }, + "name": "Karlsplatz (Stachus)", + "mode": "driving", + "weight": 21.6, + "duration": 21.6, + "distance": 195.9 + }, + { + "intersections": [ + { + "out": 1, + "in": 0, + "entry": [false, true], + "bearings": [15, 180], + "location": [11.56503, 48.139038] + }, + { + "out": 1, + "in": 0, + "entry": [false, true, false], + "bearings": [0, 180, 270], + "location": [11.564903, 48.138331] + }, + { + "out": 1, + "in": 0, + "entry": [false, true, true], + "bearings": [0, 180, 270], + "location": [11.564849, 48.138035] + }, + { + "lanes": [ + { + "valid": false, + "indications": [ + "left" + ] + }, + { + "valid": false, + "indications": [ + "left" + ] + }, + { + "valid": true, + "indications": [ + "straight" + ] + }, + { + "valid": true, + "indications": [ + "straight" + ] + }, + { + "valid": false, + "indications": [ + "right" + ] + } + ], + "out": 2, + "in": 0, + "entry": [false, true, true, true], + "bearings": [0, 75, 180, 270], + "location": [11.564729, 48.137396] + }, + { + "lanes": [ + { + "valid": true, + "indications": [ + "straight" + ] + }, + { + "valid": true, + "indications": [ + "straight" + ] + }, + { + "valid": true, + "indications": [ + "straight" + ] + }, + { + "valid": false, + "indications": [ + "right" + ] + } + ], + "out": 2, + "in": 0, + "entry": [false, false, true, true], + "bearings": [0, 60, 165, 270], + "location": [11.564634, 48.136378] + }, + { + "lanes": [ + { + "valid": true, + "indications": [ + "straight" + ] + }, + { + "valid": true, + "indications": [ + "straight" + ] + }, + { + "valid": false, + "indications": [ + "right" + ] + } + ], + "out": 0, + "in": 2, + "entry": [true, true, false], + "bearings": [135, 195, 330], + "location": [11.565817, 48.13443] + } + ], + "driving_side": "right", + "geometry": "_dydHmxqeAD?B@PB@?f@DfALx@H\\Dx@Hf@FJ@TBp@J`AFH?H?JALCF?VId@Qb@YhB_AJGFCnAo@NG`@UTODCBEBCHKFIFGFKFIFGLKROh@[n@]NIFC", + "maneuver": { + "bearing_after": 185, + "bearing_before": 187, + "location": [11.56503, 48.139038], + "modifier": "straight", + "type": "new name" + }, + "name": "Sonnenstraße", + "mode": "driving", + "weight": 69.4, + "duration": 69.4, + "distance": 658.8 + }, + { + "intersections": [ + { + "lanes": [ + { + "valid": true, + "indications": [ + "straight" + ] + }, + { + "valid": true, + "indications": [ + "straight" + ] + }, + { + "valid": false, + "indications": [ + "right" + ] + } + ], + "out": 1, + "in": 3, + "entry": [false, true, true, false], + "bearings": [60, 165, 240, 330], + "location": [11.56662, 48.133436] + }, + { + "lanes": [ + { + "valid": true, + "indications": [ + "straight" + ] + }, + { + "valid": true, + "indications": [ + "straight" + ] + }, + { + "valid": false, + "indications": [ + "right" + ] + } + ], + "out": 1, + "in": 3, + "entry": [false, true, false, false], + "bearings": [60, 165, 240, 345], + "location": [11.566661, 48.13336] + }, + { + "out": 0, + "in": 2, + "entry": [true, false, false], + "bearings": [150, 300, 345], + "location": [11.56683, 48.133073] + }, + { + "out": 0, + "in": 2, + "entry": [true, false, false], + "bearings": [90, 180, 300], + "location": [11.567408, 48.132615] + }, + { + "lanes": [ + { + "valid": false, + "indications": [ + "left" + ] + }, + { + "valid": true, + "indications": [ + "straight" + ] + }, + { + "valid": true, + "indications": [ + "straight", + "right" + ] + } + ], + "out": 1, + "in": 3, + "entry": [true, true, true, false], + "bearings": [45, 135, 270, 300], + "location": [11.568512, 48.132534] + }, + { + "lanes": [ + { + "valid": false, + "indications": [ + "straight" + ] + }, + { + "valid": true, + "indications": [ + "straight", + "right" + ] + } + ], + "out": 0, + "in": 2, + "entry": [true, true, false], + "bearings": [75, 195, 270], + "location": [11.570352, 48.131826] + } + ], + "driving_side": "right", + "geometry": "_axdHkbreANGNIFC`@St@e@DCBC@ABC@CBC@C@E@GBG@I@I?I@G?M?K?[Ak@?[@S@a@DOFOLWJOP[DIHUl@{BT{@F[@W@M?QCc@?EE[Ia@", + "maneuver": { + "bearing_after": 158, + "bearing_before": 156, + "location": [11.56662, 48.133436], + "modifier": "straight", + "type": "new name" + }, + "name": "Blumenstraße", + "mode": "driving", + "weight": 57.6, + "duration": 57.6, + "distance": 399.3 + }, + { + "intersections": [ + { + "lanes": [ + { + "valid": false, + "indications": [ + "straight" + ] + }, + { + "valid": false, + "indications": [ + "straight" + ] + }, + { + "valid": true, + "indications": [ + "right" + ] + } + ], + "out": 1, + "in": 2, + "entry": [true, true, false, false], + "bearings": [45, 135, 255, 315], + "location": [11.570866, 48.131925] + } + ], + "driving_side": "right", + "geometry": "qwwdH}|reAZ_@j@q@PSJOFIBC", + "maneuver": { + "bearing_after": 140, + "bearing_before": 75, + "location": [11.570866, 48.131925], + "modifier": "right", + "type": "turn" + }, + "name": "Papa-Schmid-Straße", + "mode": "driving", + "weight": 9.2, + "duration": 9.2, + "distance": 79.6 + }, + { + "intersections": [ + { + "lanes": [ + { + "valid": true, + "indications": [ + "straight" + ] + } + ], + "out": 1, + "in": 3, + "entry": [false, true, false, false], + "bearings": [45, 135, 240, 315], + "location": [11.571525, 48.131361] + }, + { + "out": 0, + "in": 2, + "entry": [true, false, false], + "bearings": [135, 225, 315], + "location": [11.572586, 48.130564] + }, + { + "out": 1, + "in": 3, + "entry": [false, true, true, false], + "bearings": [45, 135, 225, 315], + "location": [11.573322, 48.130019] + }, + { + "out": 1, + "in": 3, + "entry": [false, true, true, false], + "bearings": [30, 135, 210, 315], + "location": [11.575519, 48.128354] + } + ], + "driving_side": "right", + "geometry": "_twdHaaseA??HK@CLMhAeBz@oAnAmBHKDGJOHMDGbAyADIjBqCZc@`@m@p@eAVSLS`AwABEPS", + "maneuver": { + "bearing_after": 137, + "bearing_before": 142, + "location": [11.571525, 48.131361], + "modifier": "straight", + "type": "new name" + }, + "name": "Fraunhoferstraße", + "mode": "driving", + "weight": 66.9, + "duration": 66.9, + "distance": 523.5 + }, + { + "intersections": [ + { + "lanes": [ + { + "valid": true, + "indications": [ + "straight" + ] + }, + { + "valid": true, + "indications": [ + "straight", + "right" + ] + } + ], + "out": 1, + "in": 3, + "entry": [false, true, true, false], + "bearings": [60, 135, 225, 315], + "location": [11.576191, 48.127843] + } + ], + "driving_side": "right", + "geometry": "_~vdHe~seAPWPU~@wAv@iAv@gAJOT]\\g@DW@G", + "maneuver": { + "bearing_after": 137, + "bearing_before": 137, + "location": [11.576191, 48.127843], + "modifier": "straight", + "type": "new name" + }, + "name": "Reichenbachbrücke", + "mode": "driving", + "weight": 21.6, + "duration": 21.6, + "distance": 218 + }, + { + "intersections": [ + { + "out": 1, + "in": 3, + "entry": [false, true, true, true], + "bearings": [45, 135, 225, 315], + "location": [11.578177, 48.126419] + }, + { + "out": 0, + "in": 2, + "entry": [true, false, false], + "bearings": [135, 225, 315], + "location": [11.579122, 48.125729] + }, + { + "out": 1, + "in": 3, + "entry": [false, true, true, false], + "bearings": [45, 135, 225, 315], + "location": [11.579891, 48.125174] + }, + { + "out": 0, + "in": 2, + "entry": [true, true, false], + "bearings": [135, 225, 315], + "location": [11.580354, 48.124813] + }, + { + "out": 1, + "in": 3, + "entry": [false, true, true, false], + "bearings": [45, 150, 225, 330], + "location": [11.580961, 48.124328] + }, + { + "lanes": [ + { + "valid": false, + "indications": [ + "left" + ] + }, + { + "valid": true, + "indications": [ + "none" + ] + } + ], + "out": 1, + "in": 3, + "entry": [true, true, false, false], + "bearings": [45, 150, 225, 330], + "location": [11.581024, 48.124247] + } + ], + "driving_side": "right", + "geometry": "cuvdHsjteADGDGx@oAHKh@y@NUFIl@_A^i@JSLQDCHI\\m@X_@`@q@NSDGNSJMJINKPMJIPOJIRQJMNSZUb@Yx@e@LMDCTMLGRGTAJAH@", + "maneuver": { + "bearing_after": 136, + "bearing_before": 132, + "location": [11.578177, 48.126419], + "modifier": "straight", + "type": "new name" + }, + "name": "Ohlmüllerstraße", + "mode": "driving", + "weight": 52.4, + "duration": 52.4, + "distance": 539.2 + }, + { + "intersections": [ + { + "out": 1, + "in": 0, + "entry": [false, true, true], + "bearings": [0, 195, 270], + "location": [11.582208, 48.122495] + }, + { + "out": 1, + "in": 0, + "entry": [false, true, true], + "bearings": [30, 210, 255], + "location": [11.581825, 48.121758] + }, + { + "out": 1, + "in": 2, + "entry": [true, true, true], + "bearings": [45, 150, 330], + "location": [11.581815, 48.120441] + }, + { + "out": 1, + "in": 2, + "entry": [false, true, false], + "bearings": [75, 165, 345], + "location": [11.582101, 48.12006] + } + ], + "driving_side": "right", + "geometry": "s|udHycueAF@F?F@D@HBFBFBD@HDHB`@V^Tf@\\RLJDHDFDHBJBHBH?J@H?HAJAHAHEHCHEHGHGFGHIBEDKHIDGDCBCDEFEDCFCHCJELCr@U", + "maneuver": { + "bearing_after": 191, + "bearing_before": 181, + "location": [11.582208, 48.122495], + "modifier": "straight", + "type": "new name" + }, + "name": "Am Nockherberg", + "mode": "driving", + "weight": 29.9, + "duration": 29.9, + "distance": 332.5 + }, + { + "intersections": [ + { + "out": 0, + "in": 1, + "entry": [true, false], + "bearings": [165, 345], + "location": [11.582225, 48.119731] + }, + { + "out": 0, + "in": 2, + "entry": [true, true, false], + "bearings": [135, 210, 330], + "location": [11.58229, 48.119635] + }, + { + "lanes": [ + { + "valid": true, + "indications": [ + "left" + ] + }, + { + "valid": true, + "indications": [ + "straight", + "right" + ] + } + ], + "out": 1, + "in": 3, + "entry": [false, true, true, false], + "bearings": [45, 120, 225, 300], + "location": [11.583557, 48.119082] + }, + { + "lanes": [ + { + "valid": false, + "indications": [ + "left" + ] + }, + { + "valid": true, + "indications": [ + "straight" + ] + } + ], + "out": 1, + "in": 3, + "entry": [true, true, false, false], + "bearings": [45, 135, 210, 300], + "location": [11.583658, 48.118975] + }, + { + "out": 0, + "in": 2, + "entry": [true, true, false], + "bearings": [105, 210, 300], + "location": [11.585411, 48.118397] + } + ], + "driving_side": "right", + "geometry": "ikudH}cueADADCDEFIDEBEBIBGXkABMH]FQJW@EJW@A@CFOBCBCBCFGFIBGHYZ_BRiARaAXeALm@BSRm@\\gAL]N_@h@oAt@cB", + "maneuver": { + "bearing_after": 163, + "bearing_before": 164, + "location": [11.582225, 48.119731], + "modifier": "straight", + "type": "new name" + }, + "name": "Sankt-Bonifatius-Straße", + "mode": "driving", + "weight": 45.2, + "duration": 45.2, + "distance": 477.6 + }, + { + "intersections": [ + { + "out": 1, + "in": 2, + "entry": [false, true, false], + "bearings": [120, 135, 315], + "location": [11.58754, 48.117431] + }, + { + "out": 0, + "in": 2, + "entry": [true, true, false], + "bearings": [105, 195, 300], + "location": [11.587974, 48.117196] + }, + { + "out": 1, + "in": 3, + "entry": [true, true, true, false], + "bearings": [0, 90, 195, 285], + "location": [11.588754, 48.117105] + }, + { + "lanes": [ + { + "valid": true, + "indications": [ + "left" + ] + }, + { + "valid": false, + "indications": [ + "straight" + ] + } + ], + "out": 0, + "in": 2, + "entry": [true, false, false], + "bearings": [105, 180, 285], + "location": [11.589582, 48.117035] + } + ], + "driving_side": "right", + "geometry": "}|tdHceveALSHOJYDKBKBQDs@Bq@@I@Y?YJiB@W?IDo@?G", + "maneuver": { + "bearing_after": 135, + "bearing_before": 127, + "location": [11.58754, 48.117431], + "modifier": "straight", + "type": "new name" + }, + "name": "Sankt-Martins-Platz", + "mode": "driving", + "weight": 23, + "duration": 23, + "distance": 184.1 + }, + { + "intersections": [ + { + "lanes": [ + { + "valid": true, + "indications": [ + "left" + ] + }, + { + "valid": false, + "indications": [ + "straight" + ] + } + ], + "out": 0, + "in": 2, + "entry": [true, true, false], + "bearings": [60, 105, 285], + "location": [11.589863, 48.117007] + }, + { + "lanes": [ + { + "valid": false, + "indications": [ + "left" + ] + }, + { + "valid": true, + "indications": [ + "straight" + ] + } + ], + "out": 0, + "in": 3, + "entry": [true, false, false, false, false], + "bearings": [30, 120, 165, 240, 285], + "location": [11.590072, 48.117089] + }, + { + "out": 0, + "in": 2, + "entry": [true, true, false], + "bearings": [75, 165, 255], + "location": [11.591309, 48.117459] + }, + { + "out": 0, + "in": 2, + "entry": [true, true, false], + "bearings": [75, 165, 255], + "location": [11.592971, 48.117844] + } + ], + "driving_side": "right", + "geometry": "iztdHssveAESAIGKIGGGCEEYKq@E][wBeAmHE]EYG[k@{D", + "maneuver": { + "bearing_after": 59, + "bearing_before": 98, + "location": [11.589863, 48.117007], + "modifier": "left", + "type": "turn" + }, + "name": "Sankt-Martin-Straße", + "mode": "driving", + "weight": 34.4, + "duration": 34.4, + "distance": 347.9 + }, + { + "intersections": [ + { + "out": 1, + "in": 2, + "entry": [true, true, false], + "bearings": [75, 165, 255], + "location": [11.594178, 48.118127] + } + ], + "driving_side": "right", + "geometry": "iaudHsnweAPCJCRETELCh@Al@Bp@DxAF", + "maneuver": { + "bearing_after": 168, + "bearing_before": 70, + "location": [11.594178, 48.118127], + "modifier": "right", + "type": "turn" + }, + "name": "Hohenwaldeckstraße", + "mode": "driving", + "weight": 26.3, + "duration": 26.3, + "distance": 175.9 + }, + { + "intersections": [ + { + "in": 0, + "entry": [true], + "bearings": [4], + "location": [11.594221, 48.116555] + } + ], + "driving_side": "right", + "geometry": "owtdH{nweA", + "maneuver": { + "bearing_after": 0, + "bearing_before": 184, + "location": [11.594221, 48.116555], + "modifier": "left", + "type": "arrive" + }, + "name": "Hohenwaldeckstraße", + "mode": "driving", + "weight": 0, + "duration": 0, + "distance": 0 + } + ], + "weight": 1154, + "summary": "Schleißheimer Straße, Sonnenstraße", + "duration": 1154, + "distance": 10599.8 + } + ], + "weight_name": "routability", + "geometry": "sfbeH{qteAUjR`G^W`Sbg@MjGv`@|FvGtYnI``@c@pf@dIbm@bObGnOnRgEtXbKpRoz@zElFrPrBvVcNlDaWvm@i}@xIoGxItCzGwDbNed@ZsH_F_ZxHG", + "weight": 1154, + "duration": 1154, + "distance": 10599.8 } ], "waypoints": [ { - "hint": "Tru6gOK7uoByAAAAAAAAAAAAAAAwAAAAasSXQgAAAAAAAAAAUWQAQnIAAAAAAAAAAAAAADAAAACYEgAAiLKwABtG3wKIsrAAHkbfAgAA_xAAAAAA", - "location": [11.58004, 48.186907], - "name": "Schmalkaldener Straße", - "distance": 0.3335811771 + "hint": "77u6gP___38JAAAACgAAACAAAABmAAAAgHXWQKxQmD1w-qdBPiiJQgkAAAAKAAAAIAAAAGYAAACYEgAA0a-wAMhA3wLir7AAqkHfAgYADxEAAAAA", + "location": [11.579345, 48.185544], + "name": "Vogelhartstraße", + "distance": 25.16156763 }, { "hint": "hL-3gP___39MAAAAXAAAALsAAAAlAAAAEo1MQj_NJUG7evlCiIDIQUwAAABcAAAAuwAAACUAAACYEgAA7emwAEsz3gL66rAAQDPeAhAAfwsAAAAA", diff --git a/common/data/src/main/java/com/kouros/navigation/data/route/Routes.kt b/common/data/src/main/java/com/kouros/navigation/data/route/Routes.kt index af72cd1..86e63bf 100644 --- a/common/data/src/main/java/com/kouros/navigation/data/route/Routes.kt +++ b/common/data/src/main/java/com/kouros/navigation/data/route/Routes.kt @@ -1,5 +1,12 @@ package com.kouros.navigation.data.route -class Routes ( - var legs : List = arrayListOf() +import android.location.Location +import com.kouros.navigation.utils.location + +class Routes( + val legs: List = arrayListOf(), + val summary: Summary, + val routeGeoJson: String, + val centerLocation: Location = location(0.0, 0.0), + val waypoints: List>, ) \ No newline at end of file diff --git a/common/data/src/main/java/com/kouros/navigation/data/route/Summary.kt b/common/data/src/main/java/com/kouros/navigation/data/route/Summary.kt index c8c5a1b..31cee4c 100644 --- a/common/data/src/main/java/com/kouros/navigation/data/route/Summary.kt +++ b/common/data/src/main/java/com/kouros/navigation/data/route/Summary.kt @@ -1,6 +1,8 @@ package com.kouros.navigation.data.route data class Summary( + // sec var duration : Double = 0.0, + // km var distance : Double = 0.0, ) \ No newline at end of file diff --git a/common/data/src/main/java/com/kouros/navigation/data/valhalla/ValhallaRoute.kt b/common/data/src/main/java/com/kouros/navigation/data/valhalla/ValhallaRoute.kt index 298ffc3..1169f69 100644 --- a/common/data/src/main/java/com/kouros/navigation/data/valhalla/ValhallaRoute.kt +++ b/common/data/src/main/java/com/kouros/navigation/data/valhalla/ValhallaRoute.kt @@ -15,9 +15,7 @@ class ValhallaRoute { fun mapJsonToValhalla(routeJson: ValhallaResponse, builder: Route.Builder) { val waypoints = decodePolyline(routeJson.legs[0].shape) - val summary = Summary() - summary.distance = routeJson.summaryValhalla.length - summary.duration = routeJson.summaryValhalla.time + val summary = Summary(routeJson.summaryValhalla.time, routeJson.summaryValhalla.length) val steps = mutableListOf() var stepIndex = 0 routeJson.legs[0].maneuvers.forEach { @@ -39,13 +37,13 @@ class ValhallaRoute { steps.add(step) stepIndex += 1 } - val leg = Leg(steps) builder .routeType(1) - .summary(summary) - .routeGeoJson(createLineStringCollection(waypoints)) - .legs(listOf(leg)) - .waypoints(waypoints) + // TODO + .routes(emptyList()) + //.summary(summary) + //.routeGeoJson(createLineStringCollection(waypoints)) + //.waypoints(waypoints) } fun convertType(maneuver: Maneuvers): Int { diff --git a/common/data/src/main/java/com/kouros/navigation/model/RouteModel.kt b/common/data/src/main/java/com/kouros/navigation/model/RouteModel.kt index 92cd089..9b68718 100644 --- a/common/data/src/main/java/com/kouros/navigation/model/RouteModel.kt +++ b/common/data/src/main/java/com/kouros/navigation/model/RouteModel.kt @@ -19,8 +19,8 @@ import com.kouros.navigation.data.StepData import com.kouros.navigation.data.route.Intersection import com.kouros.navigation.data.route.Lane import com.kouros.navigation.data.route.Leg +import com.kouros.navigation.data.route.Routes import com.kouros.navigation.data.valhalla.ManeuverType -import com.kouros.navigation.utils.GeoUtils.createCenterLocation import com.kouros.navigation.utils.NavigationUtils.getIntKeyValue import com.kouros.navigation.utils.location import kotlinx.coroutines.CoroutineScope @@ -48,9 +48,12 @@ open class RouteModel() { var lastLocation: Location = location(0.0, 0.0) var bearing: Float = 0F + var currentRouteIndex = 0 + val curRoute: Routes + get() = route.routes[currentRouteIndex] - val legs: Leg - get() = route.legs!!.first() + val curLeg: Leg + get() = route.routes[currentRouteIndex].legs.first() fun startNavigation(routeString: String, context: Context) { val routeEngine = getIntKeyValue(context = context, ROUTING_ENGINE) @@ -58,8 +61,6 @@ open class RouteModel() { .routeEngine(routeEngine) .route(routeString) .build() - // TODO: - route = route.copy(centerLocation = createCenterLocation(route.routeGeoJson)) navigating = true } @@ -67,7 +68,7 @@ open class RouteModel() { route = Route.Builder().buildEmpty() navigating = false arrived = false - maneuverType = 0 + maneuverType = Maneuver.TYPE_UNKNOWN } @@ -80,7 +81,7 @@ open class RouteModel() { private fun findStep(location: Location) { var nearestDistance = 100000.0f - for ((index, step) in legs.steps.withIndex()) { + for ((index, step) in curLeg.steps.withIndex()) { if (index >= route.currentStep) { for ((wayIndex, waypoint) in step.maneuver.waypoints.withIndex()) { if (wayIndex >= step.waypointIndex) { @@ -149,7 +150,7 @@ open class RouteModel() { val distanceToNextStep = leftStepDistance() val isNearNextManeuver = distanceToNextStep in 0.0..NEXT_STEP_THRESHOLD val shouldAdvance = - isNearNextManeuver && route.currentStep < (route.legs!!.first().steps.size) + isNearNextManeuver && route.currentStep < (route.legs.first().steps.size) // Determine the maneuver type and corresponding icon var curManeuverType = if (hasArrived(currentStep.maneuver.type)) { @@ -221,8 +222,8 @@ open class RouteModel() { fun travelLeftTime(): Double { var timeLeft = 0.0 // time for next step until end step - for (i in route.currentStep + 1.. 16.5 else -> 16.0 } - return zoom.toDouble() + return zoom } fun previewZoom(previewDistance: Double): Double { when (previewDistance) { - in 0.0..10.0 -> return 13.0 - in 10.0..20.0 -> return 11.0 - in 20.0..30.0 -> return 10.0 + in 0.0..10.0 -> return 13.5 + in 10.0..20.0 -> return 11.5 + in 20.0..30.0 -> return 10.5 } - return 9.0 + return 9.5 } fun calculateTilt(newZoom: Double, tilt: Double): Double = diff --git a/common/data/src/main/res/values-de/strings.xml b/common/data/src/main/res/values-de/strings.xml index 8a38e4b..d6b2ee6 100644 --- a/common/data/src/main/res/values-de/strings.xml +++ b/common/data/src/main/res/values-de/strings.xml @@ -47,6 +47,6 @@ Apotheke Ladestation Speed camera - Auto Location verwenden + Auto GPS verwenden diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index ffc0e93..ae54b42 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,7 +1,7 @@ [versions] -agp = "8.13.2" +agp = "9.0.0" androidSdkTurf = "6.0.1" -gradle = "8.13.2" +gradle = "9.0.0" koinAndroid = "4.1.1" koinAndroidxCompose = "4.1.1" koinComposeViewmodel = "4.1.1"