From e22865bd731e66c5a5d1434be7255dde7689f911 Mon Sep 17 00:00:00 2001 From: Dimitris Date: Mon, 12 Jan 2026 13:12:22 +0100 Subject: [PATCH] Lanes --- .../com/kouros/navigation/ui/MainActivity.kt | 45 +- .../com/kouros/navigation/ui/SearchSheet.kt | 6 +- .../navigation/car/NavigationSession.kt | 20 +- .../kouros/navigation/car/SurfaceRenderer.kt | 4 +- .../com/kouros/navigation/car/map/MapView.kt | 13 +- .../car/navigation/RouteCarModel.kt | 14 +- .../navigation/car/screen/CategoriesScreen.kt | 5 +- .../navigation/car/screen/CategoryScreen.kt | 30 +- .../navigation/car/screen/NavigationScreen.kt | 36 +- .../navigation/car/screen/PlaceListScreen.kt | 20 +- .../car/screen/RoutePreviewScreen.kt | 10 +- .../navigation/car/screen/SearchScreen.kt | 10 +- .../navigation/data/NavigationRepository.kt | 6 +- .../java/com/kouros/navigation/data/Route.kt | 1 - .../navigation/data/osrm/OsrmRepository.kt | 3 +- .../kouros/navigation/data/osrm/OsrmRoute.kt | 1 + .../data/osrm/{osrm.json => osrm_hv.json} | 1874 +++++++------ .../kouros/navigation/data/osrm/osrm_vh.json | 2420 +++++++++++++++++ .../kouros/navigation/data/route/Routes.kt | 5 + .../data/valhalla/ValhallaRepository.kt | 13 +- .../com/kouros/navigation/model/RouteModel.kt | 19 +- .../com/kouros/navigation/model/ViewModel.kt | 21 +- .../src/main/res/drawable/ev_station_24px.xml | 10 - .../src/main/res/drawable/ev_station_48px.xml | 2 +- 24 files changed, 3670 insertions(+), 918 deletions(-) rename common/data/src/main/java/com/kouros/navigation/data/osrm/{osrm.json => osrm_hv.json} (52%) create mode 100644 common/data/src/main/java/com/kouros/navigation/data/osrm/osrm_vh.json create mode 100644 common/data/src/main/java/com/kouros/navigation/data/route/Routes.kt delete mode 100644 common/data/src/main/res/drawable/ev_station_24px.xml 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 483e183..c99ff1e 100644 --- a/app/src/main/java/com/kouros/navigation/ui/MainActivity.kt +++ b/app/src/main/java/com/kouros/navigation/ui/MainActivity.kt @@ -43,6 +43,7 @@ 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.StepData import com.kouros.navigation.model.BaseStyleModel @@ -61,6 +62,7 @@ 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 @@ -76,7 +78,7 @@ class MainActivity : ComponentActivity() { val routeModel = RouteModel() var tilt = 50.0 - val useMock = true + val useMock = false val stepData: MutableLiveData by lazy { MutableLiveData() } @@ -90,7 +92,7 @@ class MainActivity : ComponentActivity() { routeData.value = routeModel.route.routeGeoJson simulate() //test() - //gpx(applicationContext) + ///gpx(applicationContext) } } val cameraPosition = MutableLiveData( @@ -130,8 +132,8 @@ class MainActivity : ComponentActivity() { if (useMock) { mock = MockLocation(locationManager) mock.setMockLocation( - location?.latitude ?: homeLocation.latitude, - location?.longitude ?: homeLocation.longitude + home2Location.latitude, + home2Location.longitude ) } } @@ -153,6 +155,10 @@ class MainActivity : ComponentActivity() { requiredPermissions = listOf(permissions.first()), onGranted = { Content() + // auto navigate + if (useMock) { + //navigationViewModel.loadRoute(applicationContext, homeLocation, home2Location, 0F) + } }, ) } @@ -172,7 +178,7 @@ class MainActivity : ComponentActivity() { ) val userLocationState = rememberUserLocationState(locationProvider) val locationState = locationProvider.location.collectAsState() - updateLocation(locationState.value) + updateLocation(locationState.value) var latitude by remember { mutableDoubleStateOf(0.0) } if (locationState.value != null) { latitude = locationState.value!!.position.latitude @@ -271,7 +277,7 @@ class MainActivity : ComponentActivity() { ) lastLocation = currentLocation if (!loadRecentPlaces) { - navigationViewModel.loadRecentPlaces(applicationContext, lastLocation) + navigationViewModel.loadRecentPlaces(applicationContext, lastLocation, 0F) loadRecentPlaces = true } } @@ -333,21 +339,34 @@ class MainActivity : ComponentActivity() { fun test() { for ((index, step) in routeModel.legs.steps.withIndex()) { - for ((windex, waypoint) in step.maneuver.waypoints.withIndex()) { - routeModel.updateLocation(location(waypoint[0], waypoint[1]), navigationViewModel) - val step = routeModel.currentStep() - println("Street: ${step.instruction} Dist: ${step.leftStepDistance} ${step.currentManeuverType}") - if (index + 1 <= routeModel.legs.steps.size) { - //nextStepData.value = routeModel.nextStep() + if (index in 3..3) { + for ((windex, waypoint) in step.maneuver.waypoints.withIndex()) { + routeModel.updateLocation( + location(waypoint[0], waypoint[1]), + navigationViewModel + ) + val step = routeModel.currentStep() + if (step.leftStepDistance == 70.0) { + println("") + } + if (index + 1 <= routeModel.legs.steps.size) { + //nextStepData.value = routeModel.nextStep() + } } } } } + fun test2() { + CoroutineScope(Dispatchers.IO).launch { + // Balanstr. + mock.setMockLocation( 48.119357, 11.599130) + } + } fun gpx(context: Context) { CoroutineScope(Dispatchers.IO).launch { val parser = GPXParser() - val input = context.resources.openRawResource(R.raw.vh) + val input = context.resources.openRawResource(R.raw.hv) val parsedGpx: Gpx? = parser.parse(input) // consider using a background thread parsedGpx?.let { val tracks = parsedGpx.tracks diff --git a/app/src/main/java/com/kouros/navigation/ui/SearchSheet.kt b/app/src/main/java/com/kouros/navigation/ui/SearchSheet.kt index 981633f..e0e137b 100644 --- a/app/src/main/java/com/kouros/navigation/ui/SearchSheet.kt +++ b/app/src/main/java/com/kouros/navigation/ui/SearchSheet.kt @@ -96,7 +96,7 @@ fun Home( Button(onClick = { val places = viewModel.loadRecentPlace() val toLocation = location(places.first()!!.longitude, places.first()!!.latitude) - viewModel.loadRoute(applicationContext, location, toLocation) + viewModel.loadRoute(applicationContext, location, toLocation, 0F) closeSheet() }) { Icon( @@ -207,7 +207,7 @@ private fun SearchPlaces( viewModel.saveRecent(pl) val toLocation = location(place.lon.toDouble(), place.lat.toDouble()) - viewModel.loadRoute(context, location, toLocation) + viewModel.loadRoute(context, location, toLocation, 0F) closeSheet() } .fillMaxWidth() @@ -245,7 +245,7 @@ private fun RecentPlaces( modifier = Modifier .clickable { val toLocation = location(place.longitude, place.latitude) - viewModel.loadRoute(context, location, toLocation) + viewModel.loadRoute(context, location, toLocation, 0F) closeSheet() } .fillMaxWidth() 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 fc38880..2350c8d 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 @@ -18,6 +18,7 @@ import androidx.car.app.hardware.common.CarValue import androidx.car.app.hardware.common.OnCarDataAvailableListener import androidx.car.app.hardware.info.CarHardwareLocation import androidx.car.app.hardware.info.CarSensors +import androidx.car.app.hardware.info.Compass import androidx.car.app.hardware.info.Speed import androidx.core.location.LocationListenerCompat import androidx.core.net.toUri @@ -104,6 +105,17 @@ class NavigationSession : Session(), NavigationScreen.Listener { } } + val carCompassListener: OnCarDataAvailableListener = + OnCarDataAvailableListener { data -> + if (data.orientations.status == CarValue.STATUS_SUCCESS) { + val orientation = data.orientations.value + if (orientation != null) { + surfaceRenderer.carOrientation = orientation[0] + } + } + } + + val carSpeedListener = OnCarDataAvailableListener { data -> if (data.displaySpeedMetersPerSecond.status == CarValue.STATUS_SUCCESS) { val speed = data.displaySpeedMetersPerSecond.value @@ -172,6 +184,9 @@ 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, + carContext.mainExecutor, + carCompassListener) carSensors.addCarHardwareLocationListener( CarSensors.UPDATE_RATE_FASTEST, carContext.mainExecutor, @@ -191,8 +206,7 @@ class NavigationSession : Session(), NavigationScreen.Listener { SearchScreen( carContext, surfaceRenderer, - location, - navigationViewModel, + navigationViewModel // TODO: Uri ) ) { obj: Any? -> @@ -229,7 +243,7 @@ class NavigationSession : Session(), NavigationScreen.Listener { carContext.getSystemService(Context.LOCATION_SERVICE) as LocationManager val location = locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER) if (location != null) { - navigationViewModel.loadRecentPlace(location = location, carContext) + navigationViewModel.loadRecentPlace(location = location, surfaceRenderer.carOrientation, carContext) updateLocation(location) locationManager.requestLocationUpdates( LocationManager.GPS_PROVIDER, 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 80f601f..34425c5 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 @@ -54,6 +54,8 @@ class SurfaceRenderer( ) : DefaultLifecycleObserver { var lastLocation = location(0.0, 0.0) + + var carOrientation = 0F private val cameraPosition = MutableLiveData( CameraPosition( zoom = 15.0, @@ -303,7 +305,7 @@ class SurfaceRenderer( routeData.value = route updateCameraPosition( 0.0, - 12.0, + 14.0, target = Position(location.longitude, location.latitude) ) } 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 5fd0206..eb0416d 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 @@ -160,8 +160,10 @@ 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.Green) + const(Color.Black) } val routes = rememberGeoJsonSource(GeoJsonData.JsonString(routeData)) SymbolLayer( @@ -169,6 +171,7 @@ fun AmenityLayer(routeData: String?) { source = routes, iconImage = image(painterResource(R.drawable.ev_station_48px), drawAsSdf = true), iconColor = color, + iconOpacity = const(2.0f), iconSize = const(3.0f), ) } @@ -188,10 +191,10 @@ fun SpeedCameraLayer(speedCameras: String?) { interpolate( type = exponential(1.2f), input = zoom(), - 5 to const(0.4f), - 6 to const(0.7f), - 7 to const(1.75f), - 20 to const(3f), + 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/navigation/RouteCarModel.kt b/common/car/src/main/java/com/kouros/navigation/car/navigation/RouteCarModel.kt index 7f53857..d7fbf10 100644 --- a/common/car/src/main/java/com/kouros/navigation/car/navigation/RouteCarModel.kt +++ b/common/car/src/main/java/com/kouros/navigation/car/navigation/RouteCarModel.kt @@ -58,7 +58,9 @@ class RouteCarModel() : RouteModel() { .setIcon(createCarIcon(carContext, stepData.icon)) .build() ) - .setRoad(destination.street!!) + if (destination.street != null) { + step.setRoad(destination.street!!) + } if (stepData.lane.isNotEmpty()) { addLanes(carContext, step, stepData) } @@ -222,13 +224,17 @@ class RouteCarModel() : RouteModel() { fun showSpeedCamera(carContext: CarContext, distance: Double, maxSpeed: String?) { carContext.getCarService(AppManager::class.java) - .showAlert(createAlert(carContext, distance, maxSpeed)) + .showAlert(createAlert(carContext, distance, maxSpeed, createCarIcon(carContext, R.drawable.speed_camera_24px))) } - fun createAlert(carContext: CarContext, distance: Double, maxSpeed: String?): Alert { + fun createAlert( + carContext: CarContext, + distance: Double, + maxSpeed: String?, + icon: CarIcon + ): Alert { val title = createCarText(carContext, R.string.speed_camera) val subtitle = CarText.create(maxSpeed!!) - val icon = CarIcon.ALERT val dismissAction: Action = createToastAction( carContext, diff --git a/common/car/src/main/java/com/kouros/navigation/car/screen/CategoriesScreen.kt b/common/car/src/main/java/com/kouros/navigation/car/screen/CategoriesScreen.kt index 4499695..eab6cd5 100644 --- a/common/car/src/main/java/com/kouros/navigation/car/screen/CategoriesScreen.kt +++ b/common/car/src/main/java/com/kouros/navigation/car/screen/CategoriesScreen.kt @@ -14,6 +14,7 @@ import androidx.core.graphics.drawable.IconCompat import com.kouros.data.R import com.kouros.navigation.car.SurfaceRenderer import com.kouros.navigation.car.ViewStyle +import com.kouros.navigation.car.navigation.RouteCarModel import com.kouros.navigation.data.Category import com.kouros.navigation.data.Constants.CHARGING_STATION import com.kouros.navigation.data.Constants.FUEL_STATION @@ -23,8 +24,7 @@ import com.kouros.navigation.model.ViewModel class CategoriesScreen( private val carContext: CarContext, private val surfaceRenderer: SurfaceRenderer, - private val location: Location, - private val viewModel: ViewModel + private val viewModel: ViewModel, ) : Screen(carContext) { var categories: List = listOf( @@ -47,7 +47,6 @@ class CategoriesScreen( CategoryScreen( carContext, surfaceRenderer, - location, it.id, viewModel ) diff --git a/common/car/src/main/java/com/kouros/navigation/car/screen/CategoryScreen.kt b/common/car/src/main/java/com/kouros/navigation/car/screen/CategoryScreen.kt index 3831baf..fb2223d 100644 --- a/common/car/src/main/java/com/kouros/navigation/car/screen/CategoryScreen.kt +++ b/common/car/src/main/java/com/kouros/navigation/car/screen/CategoryScreen.kt @@ -19,8 +19,9 @@ 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.Constants -import com.kouros.navigation.data.NavigationRepository +import com.kouros.navigation.data.Place import com.kouros.navigation.data.overpass.Elements import com.kouros.navigation.model.ViewModel import com.kouros.navigation.utils.GeoUtils.createPointCollection @@ -31,9 +32,8 @@ import kotlin.math.min class CategoryScreen( private val carContext: CarContext, private val surfaceRenderer: SurfaceRenderer, - location: Location, private val category: String, - private val viewModel: ViewModel + private val viewModel: ViewModel, ) : Screen(carContext) { var elements = listOf() @@ -58,7 +58,7 @@ class CategoryScreen( init { viewModel.elements.observe(this, observer) - viewModel.getAmenities(category, location) + viewModel.getAmenities(category, surfaceRenderer.lastLocation) } @@ -126,6 +126,28 @@ class CategoryScreen( } else { row.addText(carText("${it.tags.openingHours}")) } + val navigationMessage = NavigationMessage(carContext) + row.addAction( + Action.Builder() + .setOnClickListener { + viewModel.loadRoute( + carContext, + currentLocation = surfaceRenderer.lastLocation, + location(it.lon!!, it.lat!!), + surfaceRenderer.carOrientation + ) + setResult( + Place( + name = name, + category = Constants.CHARGING_STATION, + latitude = it.lat!!, + longitude = it.lon!! + ) + ) + finish() + } + .setIcon(navigationMessage.createCarIcon(R.drawable.navigation_48px)) + .build()) return row.build() } 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 dbcdd15..1da09ce 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 @@ -98,6 +98,7 @@ class NavigationScreen( surfaceRenderer.speedCamerasData.value = speedData } + init { viewModel.route.observe(this, observer) viewModel.recentPlace.observe(this, recentObserver) @@ -297,7 +298,12 @@ class NavigationScreen( ) .setOnClickListener { val navigateTo = location(recentPlace.longitude, recentPlace.latitude) - viewModel.loadRoute(carContext, surfaceRenderer.lastLocation, navigateTo) + viewModel.loadRoute( + carContext, + surfaceRenderer.lastLocation, + navigateTo, + surfaceRenderer.carOrientation + ) routeModel.destination = recentPlace } .build() @@ -394,7 +400,11 @@ class NavigationScreen( private fun startSearchScreen() { screenManager .pushForResult( - SearchScreen(carContext, surfaceRenderer, surfaceRenderer.lastLocation, viewModel) + SearchScreen( + carContext, + surfaceRenderer, + viewModel + ) ) { obj: Any? -> if (obj != null) { val place = obj as Place @@ -416,7 +426,12 @@ class NavigationScreen( val location = location(place.longitude, place.latitude) viewModel.saveRecent(place) currentNavigationLocation = location - viewModel.loadRoute(carContext, surfaceRenderer.lastLocation, location) + viewModel.loadRoute( + carContext, + surfaceRenderer.lastLocation, + location, + surfaceRenderer.carOrientation + ) routeModel.destination = place invalidate() } @@ -447,7 +462,12 @@ class NavigationScreen( fun reRoute(destination: Place) { val dest = location(destination.longitude, destination.latitude) - viewModel.loadRoute(carContext, surfaceRenderer.lastLocation, dest) + viewModel.loadRoute( + carContext, + surfaceRenderer.lastLocation, + dest, + surfaceRenderer.carOrientation + ) } fun updateTrip(location: Location) { @@ -495,10 +515,10 @@ class NavigationScreen( val bearingSpeedCamera = location.bearingTo(location(camera.lon!!, camera.lat!!)) val bearingRoute = surfaceRenderer.lastLocation.bearingTo(location) - if (camera.distance < 80 - && (bearingSpeedCamera.absoluteValue - bearingRoute.absoluteValue).absoluteValue < 15.0 - ) { - routeModel.showSpeedCamera(carContext, camera.distance, camera.tags.maxspeed) + if (camera.distance < 80) { + if ((bearingSpeedCamera.absoluteValue - bearingRoute.absoluteValue).absoluteValue < 20.0) { + routeModel.showSpeedCamera(carContext, camera.distance, camera.tags.maxspeed) + } } } } diff --git a/common/car/src/main/java/com/kouros/navigation/car/screen/PlaceListScreen.kt b/common/car/src/main/java/com/kouros/navigation/car/screen/PlaceListScreen.kt index 5a783cf..07e2283 100644 --- a/common/car/src/main/java/com/kouros/navigation/car/screen/PlaceListScreen.kt +++ b/common/car/src/main/java/com/kouros/navigation/car/screen/PlaceListScreen.kt @@ -31,7 +31,6 @@ import com.kouros.navigation.model.ViewModel class PlaceListScreen( private val carContext: CarContext, private val surfaceRenderer: SurfaceRenderer, - private val location: Location, private val category: String, private val viewModel: ViewModel ) : Screen(carContext) { @@ -63,13 +62,21 @@ class PlaceListScreen( fun loadPlaces() { if (category == RECENT) { - viewModel.loadRecentPlaces(carContext, location) + viewModel.loadRecentPlaces( + carContext, + surfaceRenderer.lastLocation, + surfaceRenderer.carOrientation + ) } if (category == CONTACTS) { viewModel.loadContacts(carContext) } if (category == FAVORITES) { - viewModel.loadFavorites(carContext, location) + viewModel.loadFavorites( + carContext, + surfaceRenderer.lastLocation, + surfaceRenderer.carOrientation + ) } } @@ -77,9 +84,14 @@ class PlaceListScreen( val itemListBuilder = ItemList.Builder() .setNoItemsMessage(carContext.getString(R.string.no_places)) places.forEach { + val street = if (it.street != null) { + it.street + } else { + "" + } val row = Row.Builder() .setImage(contactIcon(it.avatar, it.category)) - .setTitle("${it.street!!} ${it.city}") + .setTitle("$street ${it.city}") .setOnClickListener { val place = Place( 0, 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 7a2db84..3c6a2fb 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 @@ -61,7 +61,12 @@ class RoutePreviewScreen( init { viewModel.previewRoute.observe(this, observer) val location = location(destination.longitude, destination.latitude) - viewModel.loadPreviewRoute(carContext, surfaceRenderer.lastLocation, location) + viewModel.loadPreviewRoute( + carContext, + surfaceRenderer.lastLocation, + location, + surfaceRenderer.carOrientation + ) } override fun onGetTemplate(): Template { @@ -173,7 +178,8 @@ class RoutePreviewScreen( private fun createRouteText(): CarText { val time = routeModel.route.summary!!.duration - val length = BigDecimal(routeModel.route.summary!!.distance).setScale(1, RoundingMode.HALF_EVEN) + val length = + BigDecimal(routeModel.route.summary!!.distance).setScale(1, RoundingMode.HALF_EVEN) val firstRoute = SpannableString(" \u00b7 $length km") firstRoute.setSpan( DurationSpan.create(time.toLong()), 0, 1, 0 diff --git a/common/car/src/main/java/com/kouros/navigation/car/screen/SearchScreen.kt b/common/car/src/main/java/com/kouros/navigation/car/screen/SearchScreen.kt index d3313fb..43e30b7 100644 --- a/common/car/src/main/java/com/kouros/navigation/car/screen/SearchScreen.kt +++ b/common/car/src/main/java/com/kouros/navigation/car/screen/SearchScreen.kt @@ -2,7 +2,6 @@ package com.kouros.navigation.car.screen import android.annotation.SuppressLint import android.location.Location -import android.net.Uri import androidx.car.app.CarContext import androidx.car.app.Screen import androidx.car.app.model.Action @@ -17,9 +16,9 @@ import androidx.lifecycle.Observer import com.kouros.data.R import com.kouros.navigation.car.SurfaceRenderer import com.kouros.navigation.car.ViewStyle +import com.kouros.navigation.car.navigation.RouteCarModel import com.kouros.navigation.data.Category import com.kouros.navigation.data.Constants -import com.kouros.navigation.data.NavigationRepository import com.kouros.navigation.data.Place import com.kouros.navigation.data.nominatim.SearchResult import com.kouros.navigation.model.ViewModel @@ -28,8 +27,7 @@ import com.kouros.navigation.model.ViewModel class SearchScreen( carContext: CarContext, private var surfaceRenderer: SurfaceRenderer, - private var location: Location, - private val viewModel: ViewModel + private val viewModel: ViewModel, ) : Screen(carContext) { var isSearchComplete: Boolean = false @@ -73,7 +71,6 @@ class SearchScreen( CategoriesScreen( carContext, surfaceRenderer, - location, viewModel ) ) { obj: Any? -> @@ -89,7 +86,6 @@ class SearchScreen( PlaceListScreen( carContext, surfaceRenderer, - location, it.id, viewModel ) @@ -119,7 +115,7 @@ class SearchScreen( object : SearchCallback { override fun onSearchSubmitted(searchTerm: String) { isSearchComplete = true - viewModel.searchPlaces(searchTerm, location) + viewModel.searchPlaces(searchTerm, surfaceRenderer.lastLocation) } }) .setHeaderAction(Action.BACK) 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 8dcb311..fbf5d14 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 @@ -37,10 +37,10 @@ abstract class NavigationRepository { private val nominatimUrl = "https://kouros-online.de/nominatim/" - abstract fun getRoute(currentLocation: Location, location: Location, searchFilter: SearchFilter): String + abstract fun getRoute(currentLocation: Location, location: Location, carOrientation: Float, searchFilter: SearchFilter): String - fun getRouteDistance(currentLocation: Location, location: Location, searchFilter: SearchFilter, context: Context): Double { - val route = getRoute(currentLocation, location, searchFilter) + fun getRouteDistance(currentLocation: Location, location: Location, carOrientation : Float, searchFilter: SearchFilter, context: Context): Double { + val route = getRoute(currentLocation, location, carOrientation, searchFilter) val routeModel = RouteModel() routeModel.startNavigation(route, context) return routeModel.route.summary!!.distance 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 5b16fc2..4fbb7df 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 @@ -46,7 +46,6 @@ data class Route( this.routeGeoJson = routeGeoJson centerLocation = createCenterLocation(routeGeoJson) } - fun routeEngine(routeEngine: Int) = apply { this.routeEngine = routeEngine } fun waypoints(waypoints: List>) = apply { this.waypoints = waypoints } fun route(route: String) = apply { 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 64dfdf7..8ae9a8d 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 @@ -10,6 +10,7 @@ class OsrmRepository : NavigationRepository() { override fun getRoute( currentLocation: Location, location: Location, + carOrientation: Float, searchFilter: SearchFilter ): String { @@ -20,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" + val routeLocation = "${currentLocation.longitude},${currentLocation.latitude};${location.longitude},${location.latitude}?steps=true&alternatives=2" 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 527efe9..bcaa04d 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 @@ -62,6 +62,7 @@ class OsrmRoute { } } val leg = Leg(steps) + builder .routeType(1) .summary(summary) diff --git a/common/data/src/main/java/com/kouros/navigation/data/osrm/osrm.json b/common/data/src/main/java/com/kouros/navigation/data/osrm/osrm_hv.json similarity index 52% rename from common/data/src/main/java/com/kouros/navigation/data/osrm/osrm.json rename to common/data/src/main/java/com/kouros/navigation/data/osrm/osrm_hv.json index 63f8212..c5629d4 100644 --- a/common/data/src/main/java/com/kouros/navigation/data/osrm/osrm.json +++ b/common/data/src/main/java/com/kouros/navigation/data/osrm/osrm_hv.json @@ -10,49 +10,73 @@ { "out": 0, "entry": [true], - "bearings": [275], - "location": [11.57936, 48.185543] + "bearings": [183], + "location": [11.594216, 48.116506] } ], "driving_side": "right", - "geometry": "sfbeH_rteA?BAf@Af@?f@Aj@?R", + "geometry": "ewtdH{nweAH@H?`@B", "maneuver": { - "bearing_after": 275, + "bearing_after": 183, "bearing_before": 0, - "location": [11.57936, 48.185543], - "modifier": "right", + "location": [11.594216, 48.116506], "type": "depart" }, - "name": "Vogelhartstraße", + "name": "Hohenwaldeckstraße", "mode": "driving", - "weight": 12.7, - "duration": 12.7, - "distance": 69.8 + "weight": 6.5, + "duration": 6.5, + "distance": 30 + }, + { + "intersections": [ + { + "out": 2, + "in": 0, + "entry": [false, true, true], + "bearings": [0, 180, 270], + "location": [11.594192, 48.116237] + } + ], + "driving_side": "right", + "geometry": "outdHunweAClCCfB?P", + "maneuver": { + "bearing_after": 271, + "bearing_before": 182, + "location": [11.594192, 48.116237], + "modifier": "right", + "type": "turn" + }, + "name": "Maxlrainstraße", + "mode": "driving", + "weight": 17, + "duration": 17, + "distance": 98.8 }, { "intersections": [ { "out": 0, "in": 1, - "entry": [true, false, false, true], - "bearings": [0, 90, 195, 270], - "location": [11.578423, 48.185574] + "entry": [true, false, true, true], + "bearings": [0, 90, 180, 270], + "location": [11.592867, 48.11628] } ], "driving_side": "right", - "geometry": "yfbeHclteAk@EYCkAGa@Cc@CC?y@A", + "geometry": "wutdHmfweAuG_@I@I@MF", "maneuver": { "bearing_after": 4, - "bearing_before": 271, - "location": [11.578423, 48.185574], + "bearing_before": 272, + "location": [11.592867, 48.11628], "modifier": "right", "type": "turn" }, - "name": "Silcherstraße", + "name": "Schlierseestraße", "mode": "driving", - "weight": 25.2, - "duration": 25.2, - "distance": 154.2 + "weight": 28.2, + "duration": 28.2, + "distance": 175 }, { "intersections": [ @@ -60,61 +84,108 @@ "out": 0, "in": 1, "entry": [true, false, true], - "bearings": [90, 180, 270], - "location": [11.578564, 48.186957] + "bearings": [75, 165, 255], + "location": [11.592971, 48.117844] }, { "out": 0, "in": 2, "entry": [true, true, false], - "bearings": [90, 195, 270], - "location": [11.58106, 48.18689] + "bearings": [75, 165, 255], + "location": [11.594178, 48.118127] + }, + { + "out": 1, + "in": 3, + "entry": [true, true, true, false], + "bearings": [15, 75, 165, 240], + "location": [11.595294, 48.118425] }, { "out": 0, "in": 2, "entry": [true, true, false], - "bearings": [90, 180, 270], - "location": [11.583158, 48.186877] + "bearings": [75, 165, 255], + "location": [11.598066, 48.119071] + }, + { + "lanes": [ + { + "valid": true, + "indications": [ + "straight" + ] + }, + { + "valid": false, + "indications": [ + "right" + ] + } + ], + "out": 0, + "in": 2, + "entry": [true, true, false, false], + "bearings": [75, 165, 255, 345], + "location": [11.60013, 48.119533] + }, + { + "out": 0, + "in": 1, + "entry": [true, false, true], + "bearings": [75, 255, 345], + "location": [11.602518, 48.120034] } ], "driving_side": "right", - "geometry": "oobeH_mteA@cADmC@uABkE@wA@gDAsB?Y?U?I?q@?_@@g@?IAiAAY", + "geometry": "o_udHagweAEYG[k@{Da@eCYwAQeAOgAm@mEMy@Is@EWEWKq@Ig@Ig@Gc@WeBM_ACUM{@AOE_@EYCSKy@E[E_@Ig@Ge@Io@_@uC?GCOAMG[?IWuBSeBKcAE[Iq@Is@EeAUmBCUEe@", "maneuver": { - "bearing_after": 91, - "bearing_before": 1, - "location": [11.578564, 48.186957], + "bearing_after": 70, + "bearing_before": 340, + "location": [11.592971, 48.117844], "modifier": "right", "type": "turn" }, - "name": "Schmalkaldener Straße", + "name": "Sankt-Martin-Straße", "mode": "driving", - "weight": 67, - "duration": 67, - "distance": 432.1 + "weight": 103.6, + "duration": 103.6, + "distance": 1020.3 }, { "intersections": [ { - "out": 1, + "lanes": [ + { + "valid": true, + "indications": [ + "left" + ] + }, + { + "valid": true, + "indications": [ + "straight" + ] + }, + { + "valid": true, + "indications": [ + "straight" + ] + }, + { + "valid": false, + "indications": [ + "right" + ] + } + ], + "out": 0, "in": 2, - "entry": [false, true, false], - "bearings": [0, 180, 270], - "location": [11.584371, 48.186885] - }, - { - "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] + "entry": [true, true, false, false], + "bearings": [75, 150, 255, 330], + "location": [11.605995, 48.120672] }, { "lanes": [ @@ -143,202 +214,88 @@ ] } ], - "out": 2, - "in": 0, - "entry": [false, true, true, true], - "bearings": [0, 75, 180, 270], - "location": [11.58458, 48.184313] + "out": 0, + "in": 2, + "entry": [true, false, false, true], + "bearings": [75, 135, 255, 315], + "location": [11.606356, 48.12074] }, { - "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, 90, 180, 270], - "location": [11.584821, 48.181732] + "out": 0, + "in": 2, + "entry": [true, true, false], + "bearings": [90, 180, 270], + "location": [11.608668, 48.120937] }, { - "lanes": [ - { - "valid": false, - "indications": [ - "left" - ] - }, - { - "valid": true, - "indications": [ - "straight" - ] - }, - { - "valid": true, - "indications": [ - "straight" - ] - } - ], - "out": 2, - "in": 0, - "entry": [false, true, true], - "bearings": [0, 90, 180], - "location": [11.584973, 48.18015] + "out": 0, + "in": 2, + "entry": [true, false, false], + "bearings": [90, 180, 270], + "location": [11.610114, 48.120959] }, { - "out": 1, - "in": 0, - "entry": [false, true, false], - "bearings": [0, 180, 270], - "location": [11.585106, 48.178587] - }, - { - "lanes": [ - { - "valid": true, - "indications": [ - "left" - ] - }, - { - "valid": true, - "indications": [ - "straight", - "left" - ] - }, - { - "valid": true, - "indications": [ - "straight" - ] - }, - { - "valid": true, - "indications": [ - "straight", - "right" - ] - } - ], - "out": 2, - "in": 0, - "entry": [false, false, true, true], - "bearings": [15, 90, 195, 270], - "location": [11.585104, 48.177692] + "out": 0, + "in": 2, + "entry": [true, true, false], + "bearings": [90, 180, 270], + "location": [11.611401, 48.120909] } ], "driving_side": "right", + "geometry": "equdHoxyeAIo@CWE[CSGy@CkAGgBEcBCkA?SCkB?_D?]BuBDmBBy@FyAFsA@S@c@", "maneuver": { - "bearing_after": 177, - "bearing_before": 87, - "location": [11.584371, 48.186885], - "modifier": "right", - "type": "end of road" + "bearing_after": 73, + "bearing_before": 73, + "location": [11.605995, 48.120672], + "modifier": "straight", + "type": "new name" }, - "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", + "name": "Anzinger Straße", "mode": "driving", - "weight": 112.1, - "duration": 112.1, - "distance": 1063.9 + "weight": 48.1, + "duration": 48.1, + "distance": 513.7 }, { "intersections": [ - { - "out": 2, - "in": 0, - "entry": [false, true, true, true, false], - "bearings": [15, 75, 90, 180, 270], - "location": [11.585001, 48.177346] - }, { "lanes": [ { "valid": true, + "indications": [ + "left" + ] + }, + { + "valid": false, "indications": [ "straight" ] }, { - "valid": true, + "valid": false, "indications": [ - "straight" + "none" ] } ], "out": 1, "in": 3, - "entry": [false, true, false, false], - "bearings": [15, 75, 180, 270], - "location": [11.585474, 48.177353] + "entry": [false, true, true, false], + "bearings": [0, 90, 180, 285], + "location": [11.612843, 48.120788] }, - { - "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] - } - ], - "driving_side": "right", - "geometry": "ms`eHguueAD]?O?OE_@Kk@Ca@Eu@D_BF{AHkALqALgAPgAHe@Ha@Ps@Rs@Jc@J_@", - "maneuver": { - "bearing_after": 90, - "bearing_before": 191, - "location": [11.585001, 48.177346], - "modifier": "left", - "type": "on ramp" - }, - "name": "Schenkendorfstraße", - "mode": "driving", - "weight": 35.8, - "duration": 35.8, - "distance": 375.2 - }, - { - "intersections": [ { "lanes": [ { "valid": true, + "indications": [ + "left" + ] + }, + { + "valid": false, "indications": [ "straight" ] @@ -346,483 +303,106 @@ { "valid": false, "indications": [ - "slight right" + "none" ] } ], "out": 0, - "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] - }, - { - "lanes": [ - { - "valid": true, - "indications": [ - "straight" - ] - }, - { - "valid": true, - "indications": [ - "straight" - ] - }, - { - "valid": false, - "indications": [ - "slight right" - ] - } - ], - "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": 1, - "entry": [false, false, true], - "bearings": [14, 21, 205], - "location": [11.599736, 48.170666] - }, - { - "out": 1, - "in": 0, - "entry": [false, true, true], - "bearings": [30, 210, 225], - "location": [11.598911, 48.169478] - }, - { - "out": 2, - "in": 1, - "entry": [false, false, true], - "bearings": [15, 30, 210], - "location": [11.597915, 48.168028] - }, - { - "out": 1, - "classes": [ - "tunnel" - ], - "in": 0, - "entry": [false, true], - "bearings": [30, 210], - "location": [11.59692, 48.166605] - }, - { - "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] - }, - { - "out": 0, - "in": 2, - "entry": [true, true, false], - "bearings": [135, 150, 315], - "location": [11.599799, 48.161034] - }, - { - "out": 0, - "in": 2, - "entry": [true, false, false], - "bearings": [135, 240, 315], - "location": [11.600215, 48.160767] - }, - { - "out": 0, - "in": 2, - "entry": [true, true, false], - "bearings": [135, 165, 330], - "location": [11.602935, 48.15794] - }, - { - "out": 0, - "in": 2, - "entry": [true, false, false], - "bearings": [120, 285, 300], - "location": [11.60442, 48.157119] - }, - { - "out": 0, - "in": 2, - "entry": [true, true, false], - "bearings": [120, 135, 300], - "location": [11.611708, 48.154071] - }, - { - "out": 0, - "classes": [ - "tunnel" - ], - "in": 1, - "entry": [true, false], - "bearings": [135, 315], - "location": [11.613781, 48.152885] - } - ], - "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[TYLQRWNW\\m@Xo@^}@Xy@La@FSL_@xBoHz@qCZaALa@`AeDb@wA\\kAx@oCb@qA\\cAt@sBt@sBfAoCh@iAl@mAjAuBdAiBz@uA", - "ref": "B 2R", - "name": "Schenkendorfstraße", - "mode": "driving", - "weight": 285.8, - "duration": 285.8, - "distance": 3685.4 - }, - { - "intersections": [ - { - "out": 0, - "in": 1, - "entry": [true, false], - "bearings": [135, 315], - "location": [11.614743, 48.152244] - }, - { - "out": 0, - "in": 2, - "entry": [true, false, false], - "bearings": [165, 330, 345], - "location": [11.615995, 48.150723] - } - ], - "driving_side": "right", - "maneuver": { - "bearing_after": 135, - "bearing_before": 135, - "location": [11.614743, 48.152244], - "modifier": "straight", - "type": "new name" - }, - "geometry": "ov{dHco{eAHONULQLONQLM^[j@e@XQ\\QZQ\\M\\MXKf@Kn@Kd@E^E", - "ref": "B 2R", - "name": "Richard-Strauss-Straße", - "mode": "driving", - "weight": 22.3, - "duration": 22.3, - "distance": 299.5 - }, - { - "intersections": [ - { - "out": 1, - "classes": [ - "tunnel" - ], - "in": 0, - "entry": [false, true], - "bearings": [0, 180], - "location": [11.61624, 48.1498] - }, - { - "out": 1, - "classes": [ - "tunnel" - ], - "in": 0, - "entry": [false, true, true], - "bearings": [0, 165, 180], - "location": [11.614595, 48.137999] - }, - { - "out": 0, - "in": 1, - "entry": [true, false], - "bearings": [165, 345], - "location": [11.614951, 48.136421] - } - ], - "driving_side": "right", - "maneuver": { - "bearing_after": 180, - "bearing_before": 172, - "location": [11.61624, 48.1498], - "modifier": "straight", - "type": "new name" - }, - "geometry": "gg{dHox{eA`@?rA?~@@X?T?Z@lADfCTjJdA|@Jj@DfBPp[rCjDXnAJvBFZCzHeAxA_@l@Qt@[pAi@", - "ref": "B 2R", - "name": "Richard-Strauss-Tunnel", - "mode": "driving", - "weight": 124.1, - "duration": 124.1, - "distance": 1653.9 - }, - { - "intersections": [ - { - "out": 0, - "in": 2, - "entry": [true, false, false], - "bearings": [165, 315, 345], - "location": [11.615548, 48.135064] - }, - { - "out": 0, - "classes": [ - "tunnel" - ], - "in": 1, - "entry": [true, false], - "bearings": [165, 345], - "location": [11.615591, 48.134991] - }, - { - "out": 0, - "in": 1, - "entry": [true, false], - "bearings": [165, 345], - "location": [11.616284, 48.13357] - }, - { - "out": 0, - "in": 2, - "entry": [true, true, false], - "bearings": [180, 195, 345], - "location": [11.616365, 48.133153] - }, - { - "out": 1, - "in": 0, - "entry": [false, true], - "bearings": [15, 195], - "location": [11.615923, 48.131602] - } - ], - "driving_side": "right", - "maneuver": { - "bearing_after": 157, - "bearing_before": 160, - "location": [11.615548, 48.135064], - "modifier": "straight", - "type": "new name" - }, - "geometry": "ckxdHet{eALGzGiCRGVERCR?TAD?`@BH@xBh@rBj@lA^", - "ref": "B 2R", - "name": "Leuchtenbergring", - "mode": "driving", - "weight": 33.4, - "duration": 33.4, - "distance": 443.8 - }, - { - "intersections": [ - { - "out": 1, - "classes": [ - "tunnel" - ], - "in": 0, - "entry": [false, true], - "bearings": [15, 195], - "location": [11.615761, 48.131208] - } - ], - "driving_side": "right", - "maneuver": { - "bearing_after": 194, - "bearing_before": 194, - "location": [11.615761, 48.131208], - "modifier": "straight", - "type": "new name" - }, - "geometry": "aswdHou{eA|ErAf@J", - "ref": "B 2R", - "name": "Innsbrucker-Ring-Tunnel", - "mode": "driving", - "weight": 11.2, - "duration": 11.2, - "distance": 149.6 - }, - { - "intersections": [ - { - "out": 2, - "classes": [ - "tunnel" - ], - "in": 0, - "entry": [false, true, true], - "bearings": [15, 180, 210], - "location": [11.615282, 48.129902] - }, - { - "out": 1, - "in": 0, - "entry": [false, true], - "bearings": [30, 210], - "location": [11.614931, 48.129418] - } - ], - "driving_side": "right", - "geometry": "{jwdHor{eA~AdAhCvAnCxA`Ab@t@X", - "maneuver": { - "bearing_after": 205, - "bearing_before": 192, - "location": [11.615282, 48.129902], - "modifier": "slight right", - "type": "off ramp" - }, - "name": "", - "mode": "driving", - "weight": 27, - "duration": 27, - "distance": 300.1 - }, - { - "intersections": [ - { - "out": 2, - "in": 1, - "entry": [false, false, true], - "bearings": [0, 15, 195], - "location": [11.613727, 48.127414] - }, - { - "out": 2, - "in": 0, - "entry": [false, true, true, true], - "bearings": [15, 105, 195, 285], - "location": [11.613613, 48.127108] - } - ], - "driving_side": "right", - "geometry": "i{vdHyh{eA^JD@JDHBJBD@d@NvA\\|@Lf@FF@\\Bh@Dh@BtAHJ@P@", - "maneuver": { - "bearing_after": 194, - "bearing_before": 198, - "location": [11.613727, 48.127414], - "modifier": "straight", - "type": "turn" - }, - "name": "Ampfingstraße", - "mode": "driving", - "weight": 31.4, - "duration": 31.4, - "distance": 307.5 - }, - { - "intersections": [ - { - "out": 2, - "in": 0, - "entry": [false, true, true, true], + "in": 3, + "entry": [true, true, false, false], "bearings": [0, 90, 180, 270], - "location": [11.613091, 48.124689] + "location": [11.613019, 48.120777] }, { - "out": 2, - "in": 0, - "entry": [false, true, true], + "lanes": [ + { + "valid": false, + "indications": [ + "left" + ] + }, + { + "valid": true, + "indications": [ + "straight" + ] + }, + { + "valid": true, + "indications": [ + "straight" + ] + } + ], + "out": 0, + "in": 2, + "entry": [true, false, false, true], + "bearings": [0, 90, 180, 270], + "location": [11.613021, 48.120881] + }, + { + "out": 0, + "in": 2, + "entry": [true, false, false], "bearings": [0, 105, 180], - "location": [11.612954, 48.123397] + "location": [11.613013, 48.121358] }, { - "out": 1, - "in": 0, - "entry": [false, true, true], + "lanes": [ + { + "valid": false, + "indications": [ + "left" + ] + }, + { + "valid": true, + "indications": [ + "straight" + ] + }, + { + "valid": true, + "indications": [ + "straight" + ] + } + ], + "out": 0, + "in": 1, + "entry": [true, false, true], "bearings": [0, 180, 270], - "location": [11.612939, 48.123269] + "location": [11.613011, 48.122299] }, { - "out": 2, - "in": 0, - "entry": [false, true, true, true], + "out": 0, + "in": 2, + "entry": [true, true, false, true], "bearings": [0, 90, 180, 270], - "location": [11.612878, 48.122584] + "location": [11.613026, 48.122579] }, { - "out": 2, - "in": 0, - "entry": [false, true, true, true], - "bearings": [0, 90, 180, 270], - "location": [11.612861, 48.122308] + "out": 0, + "in": 2, + "entry": [true, false, false, true], + "bearings": [0, 90, 180, 285], + "location": [11.613096, 48.123372] } ], "driving_side": "right", - "geometry": "ijvdHyd{eAJ@r@B`ETX@P@t@D`ABX@Z@\\?b@?b@Ad@@T?z@?T?L?X@", + "geometry": "}qudHgc{eA@c@S?W?gA@c@?M?c@?gA@]Aw@CsAEa@Cg@CkCOwAIE?OAKA", "maneuver": { - "bearing_after": 182, - "bearing_before": 184, - "location": [11.613091, 48.124689], - "modifier": "straight", - "type": "new name" + "bearing_after": 94, + "bearing_before": 97, + "location": [11.612843, 48.120788], + "modifier": "left", + "type": "turn" }, "name": "Aschheimer Straße", "mode": "driving", - "weight": 44.9, - "duration": 44.9, - "distance": 422.8 + "weight": 48.1, + "duration": 48.1, + "distance": 448 }, { "intersections": [ @@ -834,63 +414,6 @@ "left" ] }, - { - "valid": false, - "indications": [ - "straight" - ] - }, - { - "valid": false, - "indications": [ - "none" - ] - }, - { - "valid": true, - "indications": [ - "none" - ] - } - ], - "out": 3, - "in": 0, - "entry": [false, false, true, true], - "bearings": [0, 90, 180, 285], - "location": [11.612849, 48.120892] - } - ], - "driving_side": "right", - "geometry": "qrudHic{eAC`@IhBGvBGfCC`C?ZAfBB~CJbEFvBFnC@VD^", - "maneuver": { - "bearing_after": 277, - "bearing_before": 180, - "location": [11.612849, 48.120892], - "modifier": "right", - "type": "turn" - }, - "name": "Anzinger Straße", - "mode": "driving", - "weight": 46.8, - "duration": 46.8, - "distance": 498.3 - }, - { - "intersections": [ - { - "lanes": [ - { - "valid": true, - "indications": [ - "left" - ] - }, - { - "valid": true, - "indications": [ - "straight" - ] - }, { "valid": true, "indications": [ @@ -904,58 +427,90 @@ ] } ], - "out": 2, - "in": 0, - "entry": [false, false, true, true], - "bearings": [90, 135, 255, 315], - "location": [11.606184, 48.120874] + "out": 0, + "in": 2, + "entry": [true, true, false, true], + "bearings": [0, 90, 180, 270], + "location": [11.613248, 48.124682] }, { - "lanes": [ - { - "valid": false, - "indications": [ - "left" - ] - }, - { - "valid": true, - "indications": [ - "straight" - ] - }, - { - "valid": true, - "indications": [ - "straight" - ] - }, - { - "valid": false, - "indications": [ - "right" - ] - } - ], - "out": 2, - "in": 0, - "entry": [false, true, true, false], - "bearings": [75, 150, 240, 315], - "location": [11.605843, 48.120813] + "out": 0, + "in": 2, + "entry": [true, true, false, true], + "bearings": [15, 105, 195, 285], + "location": [11.61377, 48.127083] }, { - "out": 2, - "in": 1, - "entry": [false, false, true], - "bearings": [45, 60, 240], - "location": [11.605401, 48.120687] + "out": 0, + "in": 2, + "entry": [true, true, false], + "bearings": [15, 105, 210], + "location": [11.614651, 48.128776] }, { "out": 1, - "in": 0, - "entry": [false, true, true], - "bearings": [75, 255, 345], - "location": [11.602518, 48.120034] + "in": 3, + "entry": [false, true, true, false], + "bearings": [0, 30, 165, 210], + "location": [11.615108, 48.129439] + }, + { + "out": 0, + "in": 2, + "entry": [true, false, false], + "bearings": [15, 180, 195], + "location": [11.615514, 48.130011] + } + ], + "driving_side": "right", + "geometry": "gjvdHye{eAQAoDWoAO{@OaAQOCe@MICICEAOEGA[Iq@Qe@Qg@U_DcBm@[u@e@WQGGw@m@y@a@k@QWGq@S[KKCKC", + "maneuver": { + "bearing_after": 4, + "bearing_before": 4, + "location": [11.613248, 48.124682], + "modifier": "straight", + "type": "new name" + }, + "name": "Ampfingstraße", + "mode": "driving", + "weight": 68.5, + "duration": 68.5, + "distance": 719.1 + }, + { + "intersections": [ + { + "lanes": [ + { + "valid": false, + "indications": [ + "left" + ] + }, + { + "valid": true, + "indications": [ + "straight" + ] + }, + { + "valid": true, + "indications": [ + "straight" + ] + }, + { + "valid": false, + "indications": [ + "right" + ] + } + ], + "out": 0, + "in": 2, + "entry": [true, true, false, false], + "bearings": [15, 105, 195, 285], + "location": [11.615844, 48.130857] }, { "lanes": [ @@ -965,6 +520,202 @@ "left" ] }, + { + "valid": true, + "indications": [ + "straight" + ] + }, + { + "valid": true, + "indications": [ + "straight" + ] + } + ], + "out": 0, + "in": 2, + "entry": [true, false, false, true], + "bearings": [15, 105, 195, 285], + "location": [11.61591, 48.131023] + } + ], + "driving_side": "right", + "geometry": "{pwdH_v{eAKEEAMEIC]KkEoAaB_@]C", + "maneuver": { + "bearing_after": 14, + "bearing_before": 14, + "location": [11.615844, 48.130857], + "modifier": "straight", + "type": "new name" + }, + "name": "Leuchtenbergring", + "mode": "driving", + "weight": 20.9, + "duration": 20.9, + "distance": 231.3 + }, + { + "intersections": [ + { + "out": 0, + "in": 1, + "entry": [true, false], + "bearings": [0, 180], + "location": [11.616572, 48.132878] + } + ], + "driving_side": "right", + "geometry": "o}wdHqz{eAQCS?SBSH", + "maneuver": { + "bearing_after": 5, + "bearing_before": 5, + "location": [11.616572, 48.132878], + "modifier": "straight", + "type": "on ramp" + }, + "name": "Leuchtenbergring", + "mode": "driving", + "weight": 4, + "duration": 4, + "distance": 44.6 + }, + { + "intersections": [ + { + "out": 2, + "in": 0, + "entry": [false, false, true], + "bearings": [165, 180, 345], + "location": [11.616516, 48.133271] + }, + { + "out": 1, + "classes": [ + "tunnel" + ], + "in": 0, + "entry": [false, true], + "bearings": [165, 345], + "location": [11.61641, 48.133598] + } + ], + "driving_side": "right", + "maneuver": { + "bearing_after": 347, + "bearing_before": 351, + "location": [11.616516, 48.133271], + "modifier": "slight left", + "type": "merge" + }, + "geometry": "}_xdHgz{eA]Fc@LyGlC", + "ref": "B 2R", + "name": "Leuchtenbergring", + "mode": "driving", + "weight": 15.2, + "duration": 15.2, + "distance": 202.3 + }, + { + "intersections": [ + { + "out": 1, + "in": 0, + "entry": [false, true], + "bearings": [165, 345], + "location": [11.615702, 48.135005] + }, + { + "lanes": [ + { + "valid": true, + "indications": [ + "straight" + ] + }, + { + "valid": true, + "indications": [ + "straight" + ] + }, + { + "valid": false, + "indications": [ + "slight right" + ] + } + ], + "out": 2, + "in": 1, + "entry": [true, false, true], + "bearings": [0, 165, 345], + "location": [11.615677, 48.135053] + }, + { + "out": 1, + "classes": [ + "tunnel" + ], + "in": 0, + "entry": [false, true], + "bearings": [165, 345], + "location": [11.615072, 48.136438] + }, + { + "out": 0, + "classes": [ + "tunnel" + ], + "in": 1, + "entry": [true, false, false], + "bearings": [0, 165, 180], + "location": [11.614753, 48.137979] + }, + { + "out": 0, + "classes": [ + "tunnel" + ], + "in": 2, + "entry": [true, true, false], + "bearings": [0, 15, 195], + "location": [11.615982, 48.146211] + } + ], + "driving_side": "right", + "maneuver": { + "bearing_after": 340, + "bearing_before": 340, + "location": [11.615702, 48.135005], + "modifier": "straight", + "type": "new name" + }, + "geometry": "yjxdHcu{eAGBcA`@SJw@Xk@RyA\\kARq@J[DyCXuCIcAIia@gDiBOi@E}@KwBWmGs@sCW_CGkC@S?O@", + "ref": "B 2R", + "name": "Richard-Strauss-Tunnel", + "mode": "driving", + "weight": 124.7, + "duration": 124.7, + "distance": 1662.2 + }, + { + "intersections": [ + { + "out": 0, + "in": 1, + "entry": [true, false], + "bearings": [0, 180], + "location": [11.616382, 48.149817] + }, + { + "lanes": [ + { + "valid": true, + "indications": [ + "straight" + ] + }, { "valid": true, "indications": [ @@ -973,117 +724,590 @@ ] } ], - "out": 2, - "in": 0, - "entry": [false, true, true, true], - "bearings": [75, 165, 255, 345], - "location": [11.60013, 48.119533] - }, - { - "out": 2, + "out": 1, "in": 0, "entry": [false, true, true], - "bearings": [75, 165, 255], - "location": [11.598066, 48.119071] + "bearings": [165, 330, 345], + "location": [11.616037, 48.150923] }, { - "out": 3, - "in": 1, - "entry": [true, false, true, true], - "bearings": [15, 75, 165, 240], - "location": [11.595294, 48.118425] + "out": 1, + "classes": [ + "tunnel" + ], + "in": 0, + "entry": [false, true], + "bearings": [135, 315], + "location": [11.614825, 48.152297] } ], "driving_side": "right", - "geometry": "mrudHsyyeABTFl@DZPz@R~@Tv@Hr@Hp@DZJbARdBVtB?HFZ@LBN?F^tCHn@Fd@Hf@D^DZJx@BRDXD^@NLz@BTL~@VdBFb@Hf@Hf@Jp@DVDVHr@Lx@l@lENfAPdAXvA`@dC", "maneuver": { - "bearing_after": 254, - "bearing_before": 262, - "location": [11.606184, 48.120874], + "bearing_after": 354, + "bearing_before": 357, + "location": [11.616382, 48.149817], "modifier": "straight", "type": "new name" }, - "name": "Sankt-Martin-Straße", + "geometry": "kg{dHky{eAc@B_@FYDUFc@JG@WHc@P]NWN_@TULcAz@KHMJMNIJIJORMPIL{@xAcAfB", + "ref": "B 2R", + "name": "Richard-Strauss-Straße", "mode": "driving", - "weight": 94.8, - "duration": 94.8, - "distance": 945.8 + "weight": 30.6, + "duration": 30.6, + "distance": 405.8 }, { "intersections": [ { + "out": 1, + "in": 0, + "entry": [false, true], + "bearings": [135, 315], + "location": [11.613863, 48.152938] + }, + { + "out": 2, + "in": 1, + "entry": [false, false, true], + "bearings": [118, 127, 306], + "location": [11.611642, 48.154187] + }, + { + "out": 2, + "in": 1, + "entry": [true, false, true], + "bearings": [0, 150, 330], + "location": [11.602503, 48.158477] + }, + { + "out": 2, + "in": 1, + "entry": [false, false, true], + "bearings": [135, 150, 330], + "location": [11.601414, 48.159873] + }, + { + "out": 2, + "in": 1, + "entry": [true, false, true], + "bearings": [0, 150, 315], + "location": [11.600912, 48.160375] + }, + { + "out": 2, + "in": 1, + "entry": [false, false, true], + "bearings": [90, 135, 315], + "location": [11.600524, 48.160681] + }, + { + "lanes": [ + { + "valid": true, + "indications": [ + "none" + ] + }, + { + "valid": true, + "indications": [ + "none" + ] + }, + { + "valid": false, + "indications": [ + "slight right" + ] + } + ], "out": 1, "in": 0, "entry": [false, true, true], - "bearings": [75, 165, 255], - "location": [11.594178, 48.118127] + "bearings": [135, 315, 330], + "location": [11.597368, 48.162513] + }, + { + "out": 1, + "classes": [ + "tunnel" + ], + "in": 0, + "entry": [false, true], + "bearings": [165, 345], + "location": [11.596156, 48.163886] + }, + { + "out": 0, + "in": 1, + "entry": [true, false], + "bearings": [30, 210], + "location": [11.597027, 48.166529] + }, + { + "out": 0, + "in": 2, + "entry": [true, false, false], + "bearings": [30, 195, 210], + "location": [11.598404, 48.168486] + }, + { + "out": 0, + "in": 2, + "entry": [true, true, false], + "bearings": [23, 34, 204], + "location": [11.599562, 48.170168] + }, + { + "out": 1, + "classes": [ + "tunnel" + ], + "in": 0, + "entry": [false, true], + "bearings": [120, 300], + "location": [11.597687, 48.17329] + }, + { + "lanes": [ + { + "valid": true, + "indications": [ + "straight" + ] + }, + { + "valid": true, + "indications": [ + "straight" + ] + }, + { + "valid": false, + "indications": [ + "slight right" + ] + } + ], + "out": 1, + "classes": [ + "tunnel" + ], + "in": 0, + "entry": [false, true, true], + "bearings": [120, 300, 315], + "location": [11.597462, 48.173404] + }, + { + "out": 1, + "in": 0, + "entry": [false, true], + "bearings": [120, 300], + "location": [11.596723, 48.173776] + }, + { + "out": 2, + "in": 1, + "entry": [false, false, true], + "bearings": [105, 120, 300], + "location": [11.593114, 48.175507] + }, + { + "out": 2, + "in": 1, + "entry": [false, false, true], + "bearings": [105, 120, 300], + "location": [11.591949, 48.176025] + }, + { + "out": 2, + "in": 1, + "entry": [true, false, true], + "bearings": [0, 120, 300], + "location": [11.590249, 48.176722] + }, + { + "lanes": [ + { + "valid": false, + "indications": [ + "straight" + ] + }, + { + "valid": false, + "indications": [ + "straight" + ] + }, + { + "valid": true, + "indications": [ + "slight right" + ] + }, + { + "valid": true, + "indications": [ + "slight right" + ] + } + ], + "out": 2, + "in": 1, + "entry": [false, false, true], + "bearings": [60, 120, 300], + "location": [11.589926, 48.176844] } ], "driving_side": "right", - "geometry": "iaudHsnweAPCJCRETELCh@Al@Bp@DfBH", "maneuver": { - "bearing_after": 168, - "bearing_before": 247, - "location": [11.594178, 48.118127], + "bearing_after": 313, + "bearing_before": 313, + "location": [11.613863, 48.152938], + "modifier": "straight", + "type": "new name" + }, + "geometry": "{z{dHsi{eAkAvBo@lAg@hAuAjDk@zAu@pB]fA_@lA_AvC[`Ac@xAcAdDYbAKX{@vC{BpHK\\Wx@Yx@[v@[l@]l@S\\]b@QT]\\ONQP}@v@e@XuBxA{@l@OLq@n@c@d@[d@_@f@a@n@QXIP]n@}AbDaBtDi@jAg@bA]p@i@r@e@d@u@j@_@Rm@Xa@Jk@JwAB}AUaDiAkC}AoG{DcAq@s@c@OKcCyAMKGCw@g@u@c@w@e@OGOI]Ui@YSKc@QSEQEOAOAS?OBQ@YHQF_@RYTQPSVYf@[n@_A`CqA~CUl@kArC{@tB{@tB[r@iAvCe@tA[~@a@nAWr@Mb@g@|A[`AUb@w@dCo@rBa@xAW~@GPWdA", + "ref": "B 2R", + "name": "Isarring", + "mode": "driving", + "weight": 295.5, + "duration": 295.5, + "distance": 3753.6 + }, + { + "intersections": [ + { + "lanes": [ + { + "valid": false, + "indications": [ + "straight" + ] + }, + { + "valid": false, + "indications": [ + "straight" + ] + }, + { + "valid": true, + "indications": [ + "slight right" + ] + }, + { + "valid": true, + "indications": [ + "slight right" + ] + } + ], + "out": 1, + "in": 0, + "entry": [false, true, true], + "bearings": [119, 297, 299], + "location": [11.589491, 48.177003] + }, + { + "out": 2, + "in": 0, + "entry": [false, true, true], + "bearings": [90, 150, 270], + "location": [11.58617, 48.177694] + } + ], + "driving_side": "right", + "geometry": "gq`eHiqveASZWdAET_@hBU`BSrBGdAExA?~@?tAAJ@`@", + "maneuver": { + "bearing_after": 298, + "bearing_before": 298, + "location": [11.589491, 48.177003], + "modifier": "slight right", + "type": "off ramp" + }, + "destinations": "Ingolstadt, Zentrum, Euro-Industrie-Park", + "name": "Schenkendorfstraße", + "mode": "driving", + "weight": 31.8, + "duration": 31.8, + "distance": 312.2 + }, + { + "intersections": [ + { + "lanes": [ + { + "valid": false, + "indications": [ + "left" + ] + }, + { + "valid": false, + "indications": [ + "left" + ] + }, + { + "valid": false, + "indications": [ + "straight" + ] + }, + { + "valid": true, + "indications": [ + "right" + ] + } + ], + "out": 0, + "in": 1, + "entry": [true, false, false, true], + "bearings": [0, 90, 180, 270], + "location": [11.585509, 48.177692] + }, + { + "out": 0, + "in": 2, + "entry": [true, true, false], + "bearings": [0, 90, 180], + "location": [11.585277, 48.178525] + }, + { + "out": 0, + "in": 2, + "entry": [true, true, false, true], + "bearings": [0, 90, 180, 270], + "location": [11.585108, 48.180153] + }, + { + "lanes": [ + { + "valid": true, + "indications": [ + "straight" + ] + }, + { + "valid": true, + "indications": [ + "straight" + ] + }, + { + "valid": false, + "indications": [ + "right" + ] + } + ], + "out": 0, + "in": 2, + "entry": [true, true, false, false], + "bearings": [0, 90, 180, 270], + "location": [11.584977, 48.18174] + } + ], + "driving_side": "right", + "maneuver": { + "bearing_after": 352, + "bearing_before": 268, + "location": [11.585509, 48.177692], + "modifier": "right", + "type": "turn" + }, + "geometry": "qu`eHmxueAUBI@IDKFKHIDI@MBi@@Y@qDPQ@MDqAF_@?Y?uBHI@K?cAFw@BI?Q@S@u@Dq@B_@BO?yBJ}@Du@B}@DK@a@@", + "ref": "B 13", + "name": "Leopoldstraße", + "mode": "driving", + "weight": 78.8, + "duration": 78.8, + "distance": 742.1 + }, + { + "intersections": [ + { + "lanes": [ + { + "valid": true, + "indications": [ + "left" + ] + }, + { + "valid": false, + "indications": [ + "straight" + ] + }, + { + "valid": false, + "indications": [ + "straight" + ] + }, + { + "valid": false, + "indications": [ + "right" + ] + } + ], + "out": 3, + "in": 2, + "entry": [true, true, false, true], + "bearings": [0, 90, 180, 255], + "location": [11.584735, 48.184328] + }, + { + "lanes": [ + { + "valid": false, + "indications": [ + "left" + ] + }, + { + "valid": true, + "indications": [ + "straight" + ] + } + ], + "out": 3, + "in": 1, + "entry": [false, false, true, true], + "bearings": [0, 75, 180, 270], + "location": [11.58458, 48.184313] + } + ], + "driving_side": "right", + "geometry": "a_beHssueAB^@^?N@p@?H?d@?v@@n@BfA", + "maneuver": { + "bearing_after": 261, + "bearing_before": 355, + "location": [11.584735, 48.184328], "modifier": "left", "type": "turn" }, - "name": "Hohenwaldeckstraße", + "name": "Milbertshofener Straße", "mode": "driving", - "weight": 27.4, - "duration": 27.4, - "distance": 183.5 + "weight": 23.3, + "duration": 23.3, + "distance": 131.3 + }, + { + "intersections": [ + { + "out": 0, + "in": 1, + "entry": [true, false, true, true], + "bearings": [0, 90, 180, 270], + "location": [11.582974, 48.184264] + } + ], + "driving_side": "right", + "geometry": "s~aeHqhueAK?S@O@]A]?QAI?I?A?G?KAg@AUA", + "maneuver": { + "bearing_after": 358, + "bearing_before": 265, + "location": [11.582974, 48.184264], + "modifier": "right", + "type": "turn" + }, + "name": "Bad-Soden-Straße", + "mode": "driving", + "weight": 24.6, + "duration": 24.6, + "distance": 128 + }, + { + "intersections": [ + { + "out": 2, + "in": 1, + "entry": [true, false, true], + "bearings": [0, 180, 270], + "location": [11.583, 48.185414] + }, + { + "out": 3, + "in": 1, + "entry": [false, false, true, true], + "bearings": [0, 90, 180, 270], + "location": [11.580736, 48.185499] + } + ], + "driving_side": "right", + "geometry": "yebeHwhueACt@Ar@Ar@ChCCv@Ar@?n@Az@Aj@?h@AJ?l@AN?X?L?RAL", + "maneuver": { + "bearing_after": 274, + "bearing_before": 2, + "location": [11.583, 48.185414], + "modifier": "left", + "type": "turn" + }, + "name": "Vogelhartstraße", + "mode": "driving", + "weight": 41.6, + "duration": 41.6, + "distance": 277.7 }, { "intersections": [ { "in": 0, "entry": [true], - "bearings": [4], - "location": [11.594214, 48.116487] + "bearings": [92], + "location": [11.579272, 48.185546] } ], "driving_side": "right", - "geometry": "awtdHynweA", + "geometry": "ufbeHmqteA", "maneuver": { "bearing_after": 0, - "bearing_before": 184, - "location": [11.594214, 48.116487], - "modifier": "left", + "bearing_before": 272, + "location": [11.579272, 48.185546], + "modifier": "right", "type": "arrive" }, - "name": "Hohenwaldeckstraße", + "name": "Vogelhartstraße", "mode": "driving", "weight": 0, "duration": 0, "distance": 0 } ], - "weight": 1013.7, - "summary": "Isarring, Richard-Strauss-Tunnel", - "duration": 1013.7, - "distance": 11116.5 + "weight": 1011, + "summary": "Richard-Strauss-Tunnel, Isarring", + "duration": 1011, + "distance": 10896 } ], "weight_name": "routability", - "geometry": "sfbeH_rteAEzDuG[Lic@rz@}BN{P~EyTfZkt@bDC`d@bWtKiB|NkXxPiPt^ccA|MuJ`jA~H`_@gJjh@|Qja@bBAtg@jMr_A|AjJfIE", - "weight": 1013.7, - "duration": 1013.7, - "distance": 11116.5 + "geometry": "ewtdH{nweAl@lGwHSwHug@}Gim@Hie@{c@yBif@oQi^nJcjAaIgOjKu^`cA}ObOmQzZqIr@ac@oVeG^g^f`AuB~Voh@xCL`JeFE[hV", + "weight": 1011, + "duration": 1011, + "distance": 10896 } ], "waypoints": [ { - "hint": "77u6gP___38IAAAACgAAACAAAABmAAAA16KyQIr6mD9w-qdBPiiJQggAAAAKAAAAIAAAAGYAAACYEgAA4K-wAMdA3wLvr7AAlUHfAgYADxEAAAAA", - "location": [11.57936, 48.185543], - "name": "Vogelhartstraße", - "distance": 22.93305775 + "hint": "hL-3gP___39UAAAAXAAAALsAAAAlAAAANGViQmDZnEC7evlCiIDIQVQAAABcAAAAuwAAACUAAACYEgAA6OmwABoz3gLh6bAAGjPeAhAAfwsAAAAA", + "location": [11.594216, 48.116506], + "name": "Hohenwaldeckstraße", + "distance": 0.52111432 }, { - "hint": "hL-3gP___39XAAAAXAAAALsAAAAlAAAA4t1qQtUpMkC7evlCiIDIQVcAAABcAAAAuwAAACUAAACYEgAA5umwAAcz3gJS6rAAAjPeAhAAfwsAAAAA", - "location": [11.594214, 48.116487], - "name": "Hohenwaldeckstraße", - "distance": 8.059248837 + "hint": "77u6gP___38IAAAAFwAAACoAAABPAAAAkoCrQO2zH0HxL95ByfNUQggAAAAXAAAAKgAAAE8AAACYEgAAiK-wAMpA3wKQr7AAN0HfAggADxEAAAAA", + "location": [11.579272, 48.185546], + "name": "Vogelhartstraße", + "distance": 12.13471123 } ] } \ No newline at end of file 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 new file mode 100644 index 0000000..12ce509 --- /dev/null +++ b/common/data/src/main/java/com/kouros/navigation/data/osrm/osrm_vh.json @@ -0,0 +1,2420 @@ +{ + "code": "Ok", + "routes": [ + { + "legs": [ + { + "steps": [ + { + "intersections": [ + { + "out": 0, + "entry": [true], + "bearings": [91], + "location": [11.58004, 48.186907] + }, + { + "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] + } + ], + "driving_side": "right", + "geometry": "eobeHgvteABkE@wA@gDAsB?Y?U?I?q@?_@@g@?IAiAAY", + "maneuver": { + "bearing_after": 91, + "bearing_before": 0, + "location": [11.58004, 48.186907], + "type": "depart" + }, + "name": "Schmalkaldener Straße", + "mode": "driving", + "weight": 50.5, + "duration": 50.5, + "distance": 322.2 + }, + { + "intersections": [ + { + "out": 1, + "in": 2, + "entry": [false, true, false], + "bearings": [0, 180, 270], + "location": [11.584371, 48.186885] + }, + { + "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] + }, + { + "lanes": [ + { + "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.58458, 48.184313] + }, + { + "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, 90, 180, 270], + "location": [11.584821, 48.181732] + }, + { + "lanes": [ + { + "valid": false, + "indications": [ + "left" + ] + }, + { + "valid": true, + "indications": [ + "straight" + ] + }, + { + "valid": true, + "indications": [ + "straight" + ] + } + ], + "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] + }, + { + "lanes": [ + { + "valid": true, + "indications": [ + "left" + ] + }, + { + "valid": true, + "indications": [ + "straight", + "left" + ] + }, + { + "valid": true, + "indications": [ + "straight" + ] + }, + { + "valid": true, + "indications": [ + "straight", + "right" + ] + } + ], + "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] + }, + { + "lanes": [ + { + "valid": true, + "indications": [ + "straight" + ] + }, + { + "valid": true, + "indications": [ + "straight" + ] + } + ], + "out": 1, + "in": 3, + "entry": [false, true, false, false], + "bearings": [15, 75, 180, 270], + "location": [11.585474, 48.177353] + }, + { + "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] + } + ], + "driving_side": "right", + "geometry": "ms`eHguueAD]?O?OE_@Kk@Ca@Eu@D_BF{AHkALqALgAPgAHe@Ha@Ps@Rs@Jc@J_@", + "maneuver": { + "bearing_after": 90, + "bearing_before": 191, + "location": [11.585001, 48.177346], + "modifier": "left", + "type": "on ramp" + }, + "name": "Schenkendorfstraße", + "mode": "driving", + "weight": 35.8, + "duration": 35.8, + "distance": 375.2 + }, + { + "intersections": [ + { + "lanes": [ + { + "valid": true, + "indications": [ + "straight" + ] + }, + { + "valid": false, + "indications": [ + "slight right" + ] + } + ], + "out": 0, + "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] + }, + { + "lanes": [ + { + "valid": true, + "indications": [ + "straight" + ] + }, + { + "valid": true, + "indications": [ + "straight" + ] + }, + { + "valid": false, + "indications": [ + "slight right" + ] + } + ], + "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": 1, + "entry": [false, false, true], + "bearings": [14, 21, 205], + "location": [11.599736, 48.170666] + }, + { + "out": 1, + "in": 0, + "entry": [false, true, true], + "bearings": [30, 210, 225], + "location": [11.598911, 48.169478] + }, + { + "out": 2, + "in": 1, + "entry": [false, false, true], + "bearings": [15, 30, 210], + "location": [11.597915, 48.168028] + }, + { + "out": 1, + "classes": [ + "tunnel" + ], + "in": 0, + "entry": [false, true], + "bearings": [30, 210], + "location": [11.59692, 48.166605] + }, + { + "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] + }, + { + "out": 0, + "in": 2, + "entry": [true, true, false], + "bearings": [135, 150, 315], + "location": [11.599799, 48.161034] + }, + { + "out": 0, + "in": 2, + "entry": [true, false, false], + "bearings": [135, 240, 315], + "location": [11.600215, 48.160767] + }, + { + "out": 0, + "in": 2, + "entry": [true, true, false], + "bearings": [135, 165, 330], + "location": [11.602935, 48.15794] + }, + { + "out": 0, + "in": 2, + "entry": [true, false, false], + "bearings": [120, 285, 300], + "location": [11.60442, 48.157119] + }, + { + "out": 0, + "in": 2, + "entry": [true, true, false], + "bearings": [120, 135, 300], + "location": [11.611708, 48.154071] + }, + { + "out": 0, + "classes": [ + "tunnel" + ], + "in": 1, + "entry": [true, false], + "bearings": [135, 315], + "location": [11.613781, 48.152885] + } + ], + "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[TYLQRWNW\\m@Xo@^}@Xy@La@FSL_@xBoHz@qCZaALa@`AeDb@wA\\kAx@oCb@qA\\cAt@sBt@sBfAoCh@iAl@mAjAuBdAiBz@uA", + "ref": "B 2R", + "name": "Schenkendorfstraße", + "mode": "driving", + "weight": 285.8, + "duration": 285.8, + "distance": 3685.4 + }, + { + "intersections": [ + { + "out": 0, + "in": 1, + "entry": [true, false], + "bearings": [135, 315], + "location": [11.614743, 48.152244] + }, + { + "out": 0, + "in": 2, + "entry": [true, false, false], + "bearings": [165, 330, 345], + "location": [11.615995, 48.150723] + } + ], + "driving_side": "right", + "maneuver": { + "bearing_after": 135, + "bearing_before": 135, + "location": [11.614743, 48.152244], + "modifier": "straight", + "type": "new name" + }, + "geometry": "ov{dHco{eAHONULQLONQLM^[j@e@XQ\\QZQ\\M\\MXKf@Kn@Kd@E^E", + "ref": "B 2R", + "name": "Richard-Strauss-Straße", + "mode": "driving", + "weight": 22.3, + "duration": 22.3, + "distance": 299.5 + }, + { + "intersections": [ + { + "out": 1, + "classes": [ + "tunnel" + ], + "in": 0, + "entry": [false, true], + "bearings": [0, 180], + "location": [11.61624, 48.1498] + }, + { + "out": 1, + "classes": [ + "tunnel" + ], + "in": 0, + "entry": [false, true, true], + "bearings": [0, 165, 180], + "location": [11.614595, 48.137999] + }, + { + "out": 0, + "in": 1, + "entry": [true, false], + "bearings": [165, 345], + "location": [11.614951, 48.136421] + } + ], + "driving_side": "right", + "maneuver": { + "bearing_after": 180, + "bearing_before": 172, + "location": [11.61624, 48.1498], + "modifier": "straight", + "type": "new name" + }, + "geometry": "gg{dHox{eA`@?rA?~@@X?T?Z@lADfCTjJdA|@Jj@DfBPp[rCjDXnAJvBFZCzHeAxA_@l@Qt@[pAi@", + "ref": "B 2R", + "name": "Richard-Strauss-Tunnel", + "mode": "driving", + "weight": 124.1, + "duration": 124.1, + "distance": 1653.9 + }, + { + "intersections": [ + { + "out": 0, + "in": 2, + "entry": [true, false, false], + "bearings": [165, 315, 345], + "location": [11.615548, 48.135064] + }, + { + "out": 0, + "classes": [ + "tunnel" + ], + "in": 1, + "entry": [true, false], + "bearings": [165, 345], + "location": [11.615591, 48.134991] + }, + { + "out": 0, + "in": 1, + "entry": [true, false], + "bearings": [165, 345], + "location": [11.616284, 48.13357] + }, + { + "out": 0, + "in": 2, + "entry": [true, true, false], + "bearings": [180, 195, 345], + "location": [11.616365, 48.133153] + }, + { + "out": 1, + "in": 0, + "entry": [false, true], + "bearings": [15, 195], + "location": [11.615923, 48.131602] + } + ], + "driving_side": "right", + "maneuver": { + "bearing_after": 157, + "bearing_before": 160, + "location": [11.615548, 48.135064], + "modifier": "straight", + "type": "new name" + }, + "geometry": "ckxdHet{eALGzGiCRGVERCR?TAD?`@BH@xBh@rBj@lA^", + "ref": "B 2R", + "name": "Leuchtenbergring", + "mode": "driving", + "weight": 33.4, + "duration": 33.4, + "distance": 443.8 + }, + { + "intersections": [ + { + "out": 1, + "classes": [ + "tunnel" + ], + "in": 0, + "entry": [false, true], + "bearings": [15, 195], + "location": [11.615761, 48.131208] + } + ], + "driving_side": "right", + "maneuver": { + "bearing_after": 194, + "bearing_before": 194, + "location": [11.615761, 48.131208], + "modifier": "straight", + "type": "new name" + }, + "geometry": "aswdHou{eA|ErAf@J", + "ref": "B 2R", + "name": "Innsbrucker-Ring-Tunnel", + "mode": "driving", + "weight": 11.2, + "duration": 11.2, + "distance": 149.6 + }, + { + "intersections": [ + { + "out": 2, + "classes": [ + "tunnel" + ], + "in": 0, + "entry": [false, true, true], + "bearings": [15, 180, 210], + "location": [11.615282, 48.129902] + }, + { + "out": 1, + "in": 0, + "entry": [false, true], + "bearings": [30, 210], + "location": [11.614931, 48.129418] + } + ], + "driving_side": "right", + "geometry": "{jwdHor{eA~AdAhCvAnCxA`Ab@t@X", + "maneuver": { + "bearing_after": 205, + "bearing_before": 192, + "location": [11.615282, 48.129902], + "modifier": "slight right", + "type": "off ramp" + }, + "name": "", + "mode": "driving", + "weight": 27, + "duration": 27, + "distance": 300.1 + }, + { + "intersections": [ + { + "out": 2, + "in": 1, + "entry": [false, false, true], + "bearings": [0, 15, 195], + "location": [11.613727, 48.127414] + }, + { + "out": 2, + "in": 0, + "entry": [false, true, true, true], + "bearings": [15, 105, 195, 285], + "location": [11.613613, 48.127108] + } + ], + "driving_side": "right", + "geometry": "i{vdHyh{eA^JD@JDHBJBD@d@NvA\\|@Lf@FF@\\Bh@Dh@BtAHJ@P@", + "maneuver": { + "bearing_after": 194, + "bearing_before": 198, + "location": [11.613727, 48.127414], + "modifier": "straight", + "type": "turn" + }, + "name": "Ampfingstraße", + "mode": "driving", + "weight": 31.4, + "duration": 31.4, + "distance": 307.5 + }, + { + "intersections": [ + { + "out": 2, + "in": 0, + "entry": [false, true, true, true], + "bearings": [0, 90, 180, 270], + "location": [11.613091, 48.124689] + }, + { + "out": 2, + "in": 0, + "entry": [false, true, true], + "bearings": [0, 105, 180], + "location": [11.612954, 48.123397] + }, + { + "out": 1, + "in": 0, + "entry": [false, true, true], + "bearings": [0, 180, 270], + "location": [11.612939, 48.123269] + }, + { + "out": 2, + "in": 0, + "entry": [false, true, true, true], + "bearings": [0, 90, 180, 270], + "location": [11.612878, 48.122584] + }, + { + "out": 2, + "in": 0, + "entry": [false, true, true, true], + "bearings": [0, 90, 180, 270], + "location": [11.612861, 48.122308] + } + ], + "driving_side": "right", + "geometry": "ijvdHyd{eAJ@r@B`ETX@P@t@D`ABX@Z@\\?b@?b@Ad@@T?z@?T?L?X@", + "maneuver": { + "bearing_after": 182, + "bearing_before": 184, + "location": [11.613091, 48.124689], + "modifier": "straight", + "type": "new name" + }, + "name": "Aschheimer Straße", + "mode": "driving", + "weight": 44.9, + "duration": 44.9, + "distance": 422.8 + }, + { + "intersections": [ + { + "lanes": [ + { + "valid": false, + "indications": [ + "left" + ] + }, + { + "valid": false, + "indications": [ + "straight" + ] + }, + { + "valid": false, + "indications": [ + "none" + ] + }, + { + "valid": true, + "indications": [ + "none" + ] + } + ], + "out": 3, + "in": 0, + "entry": [false, false, true, true], + "bearings": [0, 90, 180, 285], + "location": [11.612849, 48.120892] + } + ], + "driving_side": "right", + "geometry": "qrudHic{eAC`@IhBGvBGfCC`C?ZAfBB~CJbEFvBFnC@VD^", + "maneuver": { + "bearing_after": 277, + "bearing_before": 180, + "location": [11.612849, 48.120892], + "modifier": "right", + "type": "turn" + }, + "name": "Anzinger Straße", + "mode": "driving", + "weight": 46.8, + "duration": 46.8, + "distance": 498.3 + }, + { + "intersections": [ + { + "lanes": [ + { + "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": [90, 135, 255, 315], + "location": [11.606184, 48.120874] + }, + { + "lanes": [ + { + "valid": false, + "indications": [ + "left" + ] + }, + { + "valid": true, + "indications": [ + "straight" + ] + }, + { + "valid": true, + "indications": [ + "straight" + ] + }, + { + "valid": false, + "indications": [ + "right" + ] + } + ], + "out": 2, + "in": 0, + "entry": [false, true, true, false], + "bearings": [75, 150, 240, 315], + "location": [11.605843, 48.120813] + }, + { + "out": 2, + "in": 1, + "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] + }, + { + "lanes": [ + { + "valid": false, + "indications": [ + "left" + ] + }, + { + "valid": true, + "indications": [ + "straight", + "right" + ] + } + ], + "out": 2, + "in": 0, + "entry": [false, true, true, true], + "bearings": [75, 165, 255, 345], + "location": [11.60013, 48.119533] + }, + { + "out": 2, + "in": 0, + "entry": [false, true, true], + "bearings": [75, 165, 255], + "location": [11.598066, 48.119071] + }, + { + "out": 3, + "in": 1, + "entry": [true, false, true, true], + "bearings": [15, 75, 165, 240], + "location": [11.595294, 48.118425] + } + ], + "driving_side": "right", + "geometry": "mrudHsyyeABTFl@DZPz@R~@Tv@Hr@Hp@DZJbARdBVtB?HFZ@LBN?F^tCHn@Fd@Hf@D^DZJx@BRDXD^@NLz@BTL~@VdBFb@Hf@Hf@Jp@DVDVHr@Lx@l@lENfAPdAXvA`@dC", + "maneuver": { + "bearing_after": 254, + "bearing_before": 262, + "location": [11.606184, 48.120874], + "modifier": "straight", + "type": "new name" + }, + "name": "Sankt-Martin-Straße", + "mode": "driving", + "weight": 94.8, + "duration": 94.8, + "distance": 945.8 + }, + { + "intersections": [ + { + "out": 1, + "in": 0, + "entry": [false, true, true], + "bearings": [75, 165, 255], + "location": [11.594178, 48.118127] + } + ], + "driving_side": "right", + "geometry": "iaudHsnweAPCJCRETELCh@Al@Bp@DxAF", + "maneuver": { + "bearing_after": 168, + "bearing_before": 247, + "location": [11.594178, 48.118127], + "modifier": "left", + "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": 958.2, + "summary": "Isarring, Richard-Strauss-Tunnel", + "duration": 958.2, + "distance": 10775.1 + } + ], + "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 + }, + { + "legs": [ + { + "steps": [ + { + "intersections": [ + { + "out": 0, + "entry": [true], + "bearings": [91], + "location": [11.58004, 48.186907] + }, + { + "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] + } + ], + "driving_side": "right", + "geometry": "eobeHgvteABkE@wA@gDAsB?Y?U?I?q@?_@@g@?IAiAAY", + "maneuver": { + "bearing_after": 91, + "bearing_before": 0, + "location": [11.58004, 48.186907], + "type": "depart" + }, + "name": "Schmalkaldener Straße", + "mode": "driving", + "weight": 50.5, + "duration": 50.5, + "distance": 322.2 + }, + { + "intersections": [ + { + "out": 1, + "in": 2, + "entry": [false, true, false], + "bearings": [0, 180, 270], + "location": [11.584371, 48.186885] + }, + { + "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] + }, + { + "lanes": [ + { + "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.58458, 48.184313] + }, + { + "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, 90, 180, 270], + "location": [11.584821, 48.181732] + }, + { + "lanes": [ + { + "valid": false, + "indications": [ + "left" + ] + }, + { + "valid": true, + "indications": [ + "straight" + ] + }, + { + "valid": true, + "indications": [ + "straight" + ] + } + ], + "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] + }, + { + "lanes": [ + { + "valid": true, + "indications": [ + "left" + ] + }, + { + "valid": true, + "indications": [ + "straight", + "left" + ] + }, + { + "valid": true, + "indications": [ + "straight" + ] + }, + { + "valid": true, + "indications": [ + "straight", + "right" + ] + } + ], + "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] + }, + { + "lanes": [ + { + "valid": true, + "indications": [ + "straight" + ] + }, + { + "valid": true, + "indications": [ + "straight" + ] + } + ], + "out": 1, + "in": 3, + "entry": [false, true, false, false], + "bearings": [15, 75, 180, 270], + "location": [11.585474, 48.177353] + }, + { + "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] + } + ], + "driving_side": "right", + "geometry": "ms`eHguueAD]?O?OE_@Kk@Ca@Eu@D_BF{AHkALqALgAPgAHe@Ha@Ps@Rs@Jc@J_@", + "maneuver": { + "bearing_after": 90, + "bearing_before": 191, + "location": [11.585001, 48.177346], + "modifier": "left", + "type": "on ramp" + }, + "name": "Schenkendorfstraße", + "mode": "driving", + "weight": 35.8, + "duration": 35.8, + "distance": 375.2 + }, + { + "intersections": [ + { + "lanes": [ + { + "valid": true, + "indications": [ + "straight" + ] + }, + { + "valid": false, + "indications": [ + "slight right" + ] + } + ], + "out": 0, + "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] + }, + { + "lanes": [ + { + "valid": true, + "indications": [ + "straight" + ] + }, + { + "valid": true, + "indications": [ + "straight" + ] + }, + { + "valid": false, + "indications": [ + "slight right" + ] + } + ], + "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": 1, + "entry": [false, false, true], + "bearings": [14, 21, 205], + "location": [11.599736, 48.170666] + }, + { + "out": 1, + "in": 0, + "entry": [false, true, true], + "bearings": [30, 210, 225], + "location": [11.598911, 48.169478] + }, + { + "out": 2, + "in": 1, + "entry": [false, false, true], + "bearings": [15, 30, 210], + "location": [11.597915, 48.168028] + }, + { + "out": 1, + "classes": [ + "tunnel" + ], + "in": 0, + "entry": [false, true], + "bearings": [30, 210], + "location": [11.59692, 48.166605] + }, + { + "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] + }, + { + "out": 0, + "in": 2, + "entry": [true, true, false], + "bearings": [135, 150, 315], + "location": [11.599799, 48.161034] + }, + { + "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": [ + { + "valid": true, + "indications": [ + "left" + ] + }, + { + "valid": true, + "indications": [ + "left" + ] + }, + { + "valid": false, + "indications": [ + "straight", + "right" + ] + } + ], + "out": 1, + "in": 0, + "entry": [false, true, true, true], + "bearings": [30, 120, 210, 315], + "location": [11.597403, 48.149701] + }, + { + "lanes": [ + { + "valid": false, + "indications": [ + "left" + ] + }, + { + "valid": true, + "indications": [ + "straight" + ] + }, + { + "valid": true, + "indications": [ + "straight" + ] + } + ], + "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] + }, + { + "out": 0, + "in": 2, + "entry": [true, true, false], + "bearings": [90, 210, 300], + "location": [11.599395, 48.148828] + }, + { + "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] + }, + { + "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] + }, + { + "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] + }, + { + "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": [ + "left" + ] + }, + { + "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" + ] + } + ], + "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] + } + ], + "driving_side": "right", + "maneuver": { + "bearing_after": 144, + "bearing_before": 195, + "location": [11.609943, 48.132537], + "modifier": "left", + "type": "turn" + }, + "geometry": "k{wdHcqzeAJKBE@C@ADEFOFU@Av@_ChAgDHY", + "ref": "B 304", + "name": "Berg-am-Laim-Straße", + "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 + }, + { + "intersections": [ + { + "lanes": [ + { + "valid": true, + "indications": [ + "right" + ] + }, + { + "valid": true, + "indications": [ + "right" + ] + } + ], + "out": 1, + "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] + }, + { + "lanes": [ + { + "valid": false, + "indications": [ + "left" + ] + }, + { + "valid": true, + "indications": [ + "straight", + "right" + ] + } + ], + "out": 2, + "in": 0, + "entry": [false, true, true, true], + "bearings": [75, 165, 255, 345], + "location": [11.60013, 48.119533] + }, + { + "out": 2, + "in": 0, + "entry": [false, true, true], + "bearings": [75, 165, 255], + "location": [11.598066, 48.119071] + }, + { + "out": 3, + "in": 1, + "entry": [true, false, true, true], + "bearings": [15, 75, 165, 240], + "location": [11.595294, 48.118425] + } + ], + "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", + "maneuver": { + "bearing_after": 157, + "bearing_before": 144, + "location": [11.605099, 48.121429], + "modifier": "right", + "type": "turn" + }, + "name": "Sankt-Martin-Straße", + "mode": "driving", + "weight": 97.5, + "duration": 97.5, + "distance": 976.1 + }, + { + "intersections": [ + { + "out": 1, + "in": 0, + "entry": [false, true, true], + "bearings": [75, 165, 255], + "location": [11.594178, 48.118127] + } + ], + "driving_side": "right", + "geometry": "iaudHsnweAPCJCRETELCh@Al@Bp@DxAF", + "maneuver": { + "bearing_after": 168, + "bearing_before": 247, + "location": [11.594178, 48.118127], + "modifier": "left", + "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": 1083.7, + "summary": "Isarring, Friedenstraße", + "duration": 1083.7, + "distance": 10850.7 + } + ], + "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 + } + ], + "waypoints": [ + { + "hint": "Tru6gOK7uoByAAAAAAAAAAAAAAAwAAAAasSXQgAAAAAAAAAAUWQAQnIAAAAAAAAAAAAAADAAAACYEgAAiLKwABtG3wKIsrAAHkbfAgAA_xAAAAAA", + "location": [11.58004, 48.186907], + "name": "Schmalkaldener Straße", + "distance": 0.3335811771 + }, + { + "hint": "hL-3gP___39MAAAAXAAAALsAAAAlAAAAEo1MQj_NJUG7evlCiIDIQUwAAABcAAAAuwAAACUAAACYEgAA7emwAEsz3gL66rAAQDPeAhAAfwsAAAAA", + "location": [11.594221, 48.116555], + "name": "Hohenwaldeckstraße", + "distance": 20.06299672 + } + ] +} \ No newline at end of file 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 new file mode 100644 index 0000000..af72cd1 --- /dev/null +++ b/common/data/src/main/java/com/kouros/navigation/data/route/Routes.kt @@ -0,0 +1,5 @@ +package com.kouros.navigation.data.route + +class Routes ( + var legs : List = arrayListOf() +) \ No newline at end of file diff --git a/common/data/src/main/java/com/kouros/navigation/data/valhalla/ValhallaRepository.kt b/common/data/src/main/java/com/kouros/navigation/data/valhalla/ValhallaRepository.kt index ac1b1c4..23af098 100644 --- a/common/data/src/main/java/com/kouros/navigation/data/valhalla/ValhallaRepository.kt +++ b/common/data/src/main/java/com/kouros/navigation/data/valhalla/ValhallaRepository.kt @@ -12,7 +12,12 @@ private const val routeUrl = "https://kouros-online.de/valhalla/route?json=" class ValhallaRepository : NavigationRepository() { - override fun getRoute(currentLocation: Location, location: Location, searchFilter: SearchFilter): String { + override fun getRoute( + currentLocation: Location, + location: Location, + carOrientation: Float, + searchFilter: SearchFilter + ): String { var exclude = "" if (searchFilter.avoidMotorway) { @@ -23,7 +28,11 @@ class ValhallaRepository : NavigationRepository() { } val vLocation = listOf( - Locations(lat = currentLocation.latitude, lon = currentLocation.longitude, search_filter = exclude), + Locations( + lat = currentLocation.latitude, + lon = currentLocation.longitude, + search_filter = exclude + ), Locations(lat = location.latitude, lon = location.longitude, search_filter = exclude) ) val valhallaLocation = ValhallaLocation( 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 7a5d2f2..92cd089 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 @@ -114,8 +114,8 @@ open class RouteModel() { val interBearing = location.bearingTo(location(it.location[0], it.location[1])) if (distance < nearestDistance) { nearestDistance = distance - if (distance <= NEXT_STEP_THRESHOLD) { - if ((interBearing.absoluteValue - route.currentStep().maneuver.bearingAfter.absoluteValue).absoluteValue < 10) { + if (distance <= NEXT_STEP_THRESHOLD * 3) { + if ((interBearing.absoluteValue - route.currentStep().maneuver.bearingAfter.absoluteValue).absoluteValue < 20) { inter = it } } @@ -171,11 +171,11 @@ open class RouteModel() { val maneuverIcon = maneuverIcon(curManeuverType) maneuverType = curManeuverType - val lanes = if (shouldAdvance) { - currentLanes(location) - } else { - emptyList() - } + val lanes = currentLanes(location) + + if (lanes.isNotEmpty()) + println("Street: $streetName Dist: $distanceToNextStep Lane: ${lanes.size}") + // Construct and return the final StepData object return StepData( streetName, @@ -186,6 +186,7 @@ open class RouteModel() { travelLeftDistance(), lanes ) + } @@ -334,7 +335,7 @@ open class RouteModel() { fun createLaneIcon(context: Context, stepData: StepData): IconCompat { val bitmaps = mutableListOf() stepData.lane.forEach { - if (it.indications.isNotEmpty()) { //&& it.valid) { + if (it.indications.isNotEmpty()) { Collections.sort(it.indications) val resource = laneToResource(it.indications, stepData) if (resource.isNotEmpty()) { @@ -357,7 +358,7 @@ open class RouteModel() { return bitmaps.first() } val bmOverlay = createBitmap( - bitmaps.first().getWidth() * (bitmaps.size), + bitmaps.first().getWidth() * (bitmaps.size * 1.5).toInt(), bitmaps.first().getHeight(), bitmaps.first().getConfig()!! ) diff --git a/common/data/src/main/java/com/kouros/navigation/model/ViewModel.kt b/common/data/src/main/java/com/kouros/navigation/model/ViewModel.kt index a0d11fc..bfec913 100644 --- a/common/data/src/main/java/com/kouros/navigation/model/ViewModel.kt +++ b/common/data/src/main/java/com/kouros/navigation/model/ViewModel.kt @@ -73,7 +73,7 @@ class ViewModel(private val repository: NavigationRepository) : ViewModel() { MutableLiveData() } - fun loadRecentPlace(location: Location, context: Context) { + fun loadRecentPlace(location: Location, carOrientation: Float, context: Context) { viewModelScope.launch(Dispatchers.IO) { try { val placeBox = boxStore.boxFor(Place::class) @@ -85,7 +85,7 @@ class ViewModel(private val repository: NavigationRepository) : ViewModel() { query.close() for (place in results) { val plLocation = location(place.longitude, place.latitude) - val distance = repository.getRouteDistance(location, plLocation, SearchFilter(), context) + val distance = repository.getRouteDistance(location, plLocation, carOrientation, SearchFilter(), context) place.distance = distance.toFloat() if (place.distance > 1F) { recentPlace.postValue(place) @@ -98,7 +98,7 @@ class ViewModel(private val repository: NavigationRepository) : ViewModel() { } } - fun loadRecentPlaces(context: Context, location: Location) { + fun loadRecentPlaces(context: Context, location: Location, carOrientation : Float) { viewModelScope.launch(Dispatchers.IO) { try { val placeBox = boxStore.boxFor(Place::class) @@ -115,6 +115,7 @@ class ViewModel(private val repository: NavigationRepository) : ViewModel() { repository.getRouteDistance( location, plLocation, + carOrientation, getSearchFilter(context), context ) place.distance = distance.toFloat() @@ -127,7 +128,7 @@ class ViewModel(private val repository: NavigationRepository) : ViewModel() { } } - fun loadFavorites(context: Context, location: Location) { + fun loadFavorites(context: Context, location: Location, carOrientation: Float) { viewModelScope.launch(Dispatchers.IO) { try { val placeBox = boxStore.boxFor(Place::class) @@ -140,7 +141,7 @@ class ViewModel(private val repository: NavigationRepository) : ViewModel() { for (place in results) { val plLocation = location(place.longitude, place.latitude) val distance = - repository.getRouteDistance(location, plLocation, getSearchFilter(context), context) + repository.getRouteDistance(location, plLocation, carOrientation, getSearchFilter(context), context) place.distance = distance.toFloat() } favorites.postValue(results) @@ -150,13 +151,14 @@ class ViewModel(private val repository: NavigationRepository) : ViewModel() { } } - fun loadRoute(context: Context, currentLocation: Location, location: Location) { + fun loadRoute(context: Context, currentLocation: Location, location: Location, carOrientation : Float) { viewModelScope.launch(Dispatchers.IO) { try { route.postValue( repository.getRoute( currentLocation, location, + carOrientation, getSearchFilter(context) ) ) @@ -166,13 +168,14 @@ class ViewModel(private val repository: NavigationRepository) : ViewModel() { } } - fun loadPreviewRoute(context: Context, currentLocation: Location, location: Location) { + fun loadPreviewRoute(context: Context, currentLocation: Location, location: Location, carOrientation: Float) { viewModelScope.launch(Dispatchers.IO) { try { previewRoute.postValue( repository.getRoute( currentLocation, location, + carOrientation, getSearchFilter(context) ) ) @@ -369,7 +372,7 @@ class ViewModel(private val repository: NavigationRepository) : ViewModel() { } - fun loadPlaces2(context: Context, location: Location): SnapshotStateList { + fun loadPlaces2(context: Context, location: Location, carOrientation: Float): SnapshotStateList { val results = listOf() try { val placeBox = boxStore.boxFor(Place::class) @@ -382,7 +385,7 @@ class ViewModel(private val repository: NavigationRepository) : ViewModel() { for (place in results) { val plLocation = location(place.longitude, place.latitude) val distance = - repository.getRouteDistance(location, plLocation, getSearchFilter(context), context) + repository.getRouteDistance(location, plLocation, carOrientation, getSearchFilter(context), context) place.distance = distance.toFloat() } } catch (e: Exception) { diff --git a/common/data/src/main/res/drawable/ev_station_24px.xml b/common/data/src/main/res/drawable/ev_station_24px.xml deleted file mode 100644 index 4d6ec4c..0000000 --- a/common/data/src/main/res/drawable/ev_station_24px.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - diff --git a/common/data/src/main/res/drawable/ev_station_48px.xml b/common/data/src/main/res/drawable/ev_station_48px.xml index dce7655..4681f9c 100644 --- a/common/data/src/main/res/drawable/ev_station_48px.xml +++ b/common/data/src/main/res/drawable/ev_station_48px.xml @@ -6,5 +6,5 @@ android:tint="?attr/colorControlNormal"> + android:pathData="M220,408L489,408L489,180Q489,180 489,180Q489,180 489,180L220,180Q220,180 220,180Q220,180 220,180L220,408ZM160,840L160,180Q160,156 178,138Q196,120 220,120L489,120Q513,120 531,138Q549,156 549,180L549,468L614,468Q634.71,468 649.36,482.64Q664,497.29 664,518L664,737Q664,759 681.5,773.5Q699,788 722,788Q745,788 765,773.5Q785,759 785,737L785,350L770,350Q757.25,350 748.63,341.37Q740,332.75 740,320L740,230L760,230L760,180L790,180L790,230L830,230L830,180L860,180L860,230L880,230L880,320Q880,332.75 871.38,341.37Q862.75,350 850,350L835,350L835,736.69Q835,780 801,810Q767,840 721.82,840Q677.66,840 645.83,810Q614,780 614,737L614,518Q614,518 614,518Q614,518 614,518L549,518L549,840L160,840ZM337,746L425,606L372,606L372,501L285,641L337,641L337,746Z"/>