diff --git a/BrouterTesting.ipynb b/BrouterTesting.ipynb index f3fb1f0..5ac7c0f 100644 --- a/BrouterTesting.ipynb +++ b/BrouterTesting.ipynb @@ -13,7 +13,7 @@ "source": [ "Here are some test cases to check BRouter profiles and help with development of new profiles. You need a running BRouter-server instance (see `BROUTER_URL` below).\n", "\n", - "The tests assume the BRouter instance uses [these `segments4` files](https://pub.phyks.me/brouter-testing/segments4/) which are the [official BRouter `segments4` files](http://brouter.de/brouter/segments4/) dated on October, 27th, 2018.\n", + "The tests assume the BRouter instance uses [these `segments4` files](https://pub.phyks.me/brouter-testing/segments4/) which are built from the [Geofabrik.de](https://download.geofabrik.de/) extracts of metropolitan France, New York state (US) and Sachsen state (Germany) from the 10th of November, 2018. The `profiles2` folder used to build the `segments4` files is available [here](https://pub.phyks.me/brouter-testing/profiles2/) (including the `lookups.dat` file). The SRTM data used to build the `segments4` are available [here](https://pub.phyks.me/brouter-testing/srtm/).\n", "\n", "Beware that the map tiles used across this notebook are the live map tiles (using up to date OSM data) contrary to the `segments4` files which are using a fixed dump of OSM data. Then, the map background may come out of sync with the data used by BRouter and are only there as an eyeguide.\n", "\n", @@ -135,7 +135,7 @@ }, { "cell_type": "code", - "execution_count": 279, + "execution_count": 423, "metadata": {}, "outputs": [ { @@ -148,13 +148,13 @@ { "data": { "text/html": [ - "
" + "
" ], "text/plain": [ - "" + "" ] }, - "execution_count": 279, + "execution_count": 423, "metadata": {}, "output_type": "execute_result" } @@ -178,7 +178,7 @@ }, { "cell_type": "code", - "execution_count": 280, + "execution_count": 424, "metadata": {}, "outputs": [ { @@ -191,13 +191,13 @@ { "data": { "text/html": [ - "
" + "
" ], "text/plain": [ - "" + "" ] }, - "execution_count": 280, + "execution_count": 424, "metadata": {}, "output_type": "execute_result" } @@ -222,7 +222,7 @@ }, { "cell_type": "code", - "execution_count": 282, + "execution_count": 425, "metadata": {}, "outputs": [ { @@ -235,13 +235,13 @@ { "data": { "text/html": [ - "
" + "
" ], "text/plain": [ - "" + "" ] }, - "execution_count": 282, + "execution_count": 425, "metadata": {}, "output_type": "execute_result" } @@ -262,7 +262,7 @@ }, { "cell_type": "code", - "execution_count": 283, + "execution_count": 426, "metadata": {}, "outputs": [ { @@ -275,13 +275,13 @@ { "data": { "text/html": [ - "
" + "
" ], "text/plain": [ - "" + "" ] }, - "execution_count": 283, + "execution_count": 426, "metadata": {}, "output_type": "execute_result" } @@ -304,7 +304,7 @@ }, { "cell_type": "code", - "execution_count": 265, + "execution_count": 427, "metadata": {}, "outputs": [ { @@ -317,13 +317,13 @@ { "data": { "text/html": [ - "
" + "
" ], "text/plain": [ - "" + "" ] }, - "execution_count": 265, + "execution_count": 427, "metadata": {}, "output_type": "execute_result" } @@ -344,7 +344,7 @@ }, { "cell_type": "code", - "execution_count": 284, + "execution_count": 428, "metadata": {}, "outputs": [ { @@ -357,13 +357,13 @@ { "data": { "text/html": [ - "
" + "
" ], "text/plain": [ - "" + "" ] }, - "execution_count": 284, + "execution_count": 428, "metadata": {}, "output_type": "execute_result" } @@ -384,7 +384,7 @@ }, { "cell_type": "code", - "execution_count": 285, + "execution_count": 429, "metadata": {}, "outputs": [ { @@ -397,13 +397,13 @@ { "data": { "text/html": [ - "
" + "
" ], "text/plain": [ - "" + "" ] }, - "execution_count": 285, + "execution_count": 429, "metadata": {}, "output_type": "execute_result" } @@ -424,7 +424,7 @@ }, { "cell_type": "code", - "execution_count": 268, + "execution_count": 430, "metadata": {}, "outputs": [ { @@ -437,13 +437,13 @@ { "data": { "text/html": [ - "
" + "
" ], "text/plain": [ - "" + "" ] }, - "execution_count": 268, + "execution_count": 430, "metadata": {}, "output_type": "execute_result" } @@ -470,7 +470,7 @@ }, { "cell_type": "code", - "execution_count": 286, + "execution_count": 431, "metadata": {}, "outputs": [ { @@ -483,13 +483,13 @@ { "data": { "text/html": [ - "
" + "
" ], "text/plain": [ - "" + "" ] }, - "execution_count": 286, + "execution_count": 431, "metadata": {}, "output_type": "execute_result" } @@ -510,7 +510,7 @@ }, { "cell_type": "code", - "execution_count": 287, + "execution_count": 432, "metadata": {}, "outputs": [ { @@ -523,13 +523,13 @@ { "data": { "text/html": [ - "
" + "
" ], "text/plain": [ - "" + "" ] }, - "execution_count": 287, + "execution_count": 432, "metadata": {}, "output_type": "execute_result" } @@ -550,7 +550,7 @@ }, { "cell_type": "code", - "execution_count": 288, + "execution_count": 433, "metadata": {}, "outputs": [ { @@ -563,13 +563,13 @@ { "data": { "text/html": [ - "
" + "
" ], "text/plain": [ - "" + "" ] }, - "execution_count": 288, + "execution_count": 433, "metadata": {}, "output_type": "execute_result" } @@ -590,7 +590,7 @@ }, { "cell_type": "code", - "execution_count": 289, + "execution_count": 434, "metadata": { "scrolled": false }, @@ -605,13 +605,13 @@ { "data": { "text/html": [ - "
" + "
" ], "text/plain": [ - "" + "" ] }, - "execution_count": 289, + "execution_count": 434, "metadata": {}, "output_type": "execute_result" } @@ -627,14 +627,12 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Take slow traffic streets. It should avoid \"Avenue du Général Leclerc\" which has no cycle infrastructure and is a very busy artery and prefer \"Rue de la Tombe Issoire\" or \"Rue du Père Corentin\".\n", - "\n", - "**TODO** Should take into account `busway` tag." + "Take slow traffic streets. It should avoid \"Avenue du Général Leclerc\" which has no cycle infrastructure and is a very busy artery and prefer \"Rue de la Tombe Issoire\" or \"Rue du Père Corentin\"." ] }, { "cell_type": "code", - "execution_count": 290, + "execution_count": 435, "metadata": {}, "outputs": [ { @@ -647,13 +645,13 @@ { "data": { "text/html": [ - "
" + "
" ], "text/plain": [ - "" + "" ] }, - "execution_count": 290, + "execution_count": 435, "metadata": {}, "output_type": "execute_result" } @@ -674,7 +672,7 @@ }, { "cell_type": "code", - "execution_count": 291, + "execution_count": 436, "metadata": { "scrolled": false }, @@ -689,13 +687,13 @@ { "data": { "text/html": [ - "
" + "
" ], "text/plain": [ - "" + "" ] }, - "execution_count": 291, + "execution_count": 436, "metadata": {}, "output_type": "execute_result" } @@ -716,7 +714,7 @@ }, { "cell_type": "code", - "execution_count": 292, + "execution_count": 437, "metadata": {}, "outputs": [ { @@ -729,13 +727,13 @@ { "data": { "text/html": [ - "
" + "
" ], "text/plain": [ - "" + "" ] }, - "execution_count": 292, + "execution_count": 437, "metadata": {}, "output_type": "execute_result" } @@ -758,7 +756,7 @@ }, { "cell_type": "code", - "execution_count": 293, + "execution_count": 438, "metadata": {}, "outputs": [ { @@ -771,13 +769,13 @@ { "data": { "text/html": [ - "
" + "
" ], "text/plain": [ - "" + "" ] }, - "execution_count": 293, + "execution_count": 438, "metadata": {}, "output_type": "execute_result" } @@ -798,7 +796,7 @@ }, { "cell_type": "code", - "execution_count": 294, + "execution_count": 439, "metadata": {}, "outputs": [ { @@ -811,13 +809,13 @@ { "data": { "text/html": [ - "
" + "
" ], "text/plain": [ - "" + "" ] }, - "execution_count": 294, + "execution_count": 439, "metadata": {}, "output_type": "execute_result" } @@ -837,7 +835,7 @@ }, { "cell_type": "code", - "execution_count": 295, + "execution_count": 440, "metadata": {}, "outputs": [ { @@ -850,13 +848,13 @@ { "data": { "text/html": [ - "
" + "
" ], "text/plain": [ - "" + "" ] }, - "execution_count": 295, + "execution_count": 440, "metadata": {}, "output_type": "execute_result" } @@ -877,7 +875,7 @@ }, { "cell_type": "code", - "execution_count": 296, + "execution_count": 441, "metadata": {}, "outputs": [ { @@ -890,13 +888,13 @@ { "data": { "text/html": [ - "
" + "
" ], "text/plain": [ - "" + "" ] }, - "execution_count": 296, + "execution_count": 441, "metadata": {}, "output_type": "execute_result" } @@ -917,7 +915,7 @@ }, { "cell_type": "code", - "execution_count": 297, + "execution_count": 442, "metadata": {}, "outputs": [ { @@ -930,13 +928,13 @@ { "data": { "text/html": [ - "
" + "
" ], "text/plain": [ - "" + "" ] }, - "execution_count": 297, + "execution_count": 442, "metadata": {}, "output_type": "execute_result" } @@ -957,7 +955,7 @@ }, { "cell_type": "code", - "execution_count": 298, + "execution_count": 444, "metadata": {}, "outputs": [ { @@ -970,13 +968,13 @@ { "data": { "text/html": [ - "
" + "
" ], "text/plain": [ - "" + "" ] }, - "execution_count": 298, + "execution_count": 444, "metadata": {}, "output_type": "execute_result" } @@ -992,12 +990,12 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "**TODO**" + "Follow cycle routes, either along the large streets or the alternative calmer way." ] }, { "cell_type": "code", - "execution_count": 301, + "execution_count": 445, "metadata": {}, "outputs": [ { @@ -1010,13 +1008,13 @@ { "data": { "text/html": [ - "
" + "
" ], "text/plain": [ - "" + "" ] }, - "execution_count": 301, + "execution_count": 445, "metadata": {}, "output_type": "execute_result" } @@ -1037,7 +1035,7 @@ }, { "cell_type": "code", - "execution_count": 302, + "execution_count": 446, "metadata": {}, "outputs": [ { @@ -1050,13 +1048,13 @@ { "data": { "text/html": [ - "
" + "
" ], "text/plain": [ - "" + "" ] }, - "execution_count": 302, + "execution_count": 446, "metadata": {}, "output_type": "execute_result" } @@ -1072,14 +1070,14 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "**TODO** It should ignore roads with `access=no`, even if they are part of a cycleroute.\n", + "It should ignore roads with `access=no`, even if they are part of a cycleroute.\n", "\n", "See https://github.com/nrenner/brouter-web/issues/31." ] }, { "cell_type": "code", - "execution_count": 303, + "execution_count": 447, "metadata": {}, "outputs": [ { @@ -1092,13 +1090,13 @@ { "data": { "text/html": [ - "
" + "
" ], "text/plain": [ - "" + "" ] }, - "execution_count": 303, + "execution_count": 447, "metadata": {}, "output_type": "execute_result" } @@ -1109,6 +1107,168 @@ "plot_route(start_point, end_point)" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "It should correctly handle routes with `access=no` if there is a `bicycle=yes` tag." + ] + }, + { + "cell_type": "code", + "execution_count": 448, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "http://127.0.0.1:8000/#map=17/48.799853/2.09679/OpenStreetMap&lonlats=2.09679,48.799853|2.086587,48.801669&profile=trekking-custom\n" + ] + }, + { + "data": { + "text/html": [ + "
" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 448, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "start_point = [2.09679,48.799853]\n", + "end_point = [2.086587,48.801669]\n", + "human = {\"type\":\"FeatureCollection\",\"features\":[{\"type\":\"Feature\",\"properties\":{},\"geometry\":{\"type\":\"LineString\",\"coordinates\":[[2.096786,48.799845,123.0],[2.096477,48.799909,123.25],[2.096269,48.799954,123.5],[2.090970,48.801055,119.5],[2.090480,48.801153,120.75],[2.087741,48.801729,123.5],[2.087658,48.801745,123.75],[2.087267,48.801710,125.25],[2.086588,48.801656,128.75]]}}]}\n", + "plot_route(start_point, end_point, human)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "It should correctly handle routes with `access=no` if there is a `bicycle=permissive` tag." + ] + }, + { + "cell_type": "code", + "execution_count": 449, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "http://127.0.0.1:8000/#map=17/44.055657/0.248957/OpenStreetMap&lonlats=0.248957,44.055657|0.246581,44.050402&profile=trekking-custom\n" + ] + }, + { + "data": { + "text/html": [ + "
" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 449, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "start_point = [0.248957,44.055657]\n", + "end_point = [0.246581,44.050402]\n", + "human = {\"type\":\"FeatureCollection\",\"features\":[{\"type\":\"Feature\",\"properties\":{},\"geometry\":{\"type\":\"LineString\",\"coordinates\":[[0.248956,44.055649,64.25],[0.249102,44.055647,64.25],[0.249035,44.055565,64.5],[0.248979,44.055543,64.5],[0.248955,44.055500,64.5],[0.248940,44.055387,64.75],[0.248795,44.054997,65.0],[0.248557,44.054443,68.25],[0.248332,44.053926,69.25],[0.248099,44.053392,70.5],[0.247911,44.052873,70.75],[0.247793,44.052546,71.0],[0.247545,44.052175,70.75],[0.247447,44.051942,70.0],[0.247323,44.051673,69.25],[0.247262,44.051518,69.75],[0.247155,44.051376,69.5],[0.246979,44.051235,68.25],[0.246804,44.051076,66.75],[0.246729,44.051001,66.0],[0.246671,44.050934,65.5],[0.246645,44.050892,65.5],[0.246619,44.050842,65.5],[0.246599,44.050828,65.5],[0.246569,44.050817,65.5],[0.246486,44.050813,65.0],[0.246418,44.050812,64.75],[0.246398,44.050807,64.75],[0.246389,44.050797,64.75],[0.246400,44.050657,65.25],[0.246436,44.050578,65.5],[0.246486,44.050496,66.25],[0.246529,44.050433,66.5],[0.246542,44.050408,66.75],[0.246538,44.050378,66.75],[0.246574,44.050405,66.75]]}}]}\n", + "plot_route(start_point, end_point, human)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "It should correctly handle routes with `access=no` if there is a `bicycle=designated` tag." + ] + }, + { + "cell_type": "code", + "execution_count": 450, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "http://127.0.0.1:8000/#map=17/49.304363/2.727216/OpenStreetMap&lonlats=2.727216,49.304363|2.717593,49.306231&profile=trekking-custom\n" + ] + }, + { + "data": { + "text/html": [ + "
" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 450, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "start_point = [2.727216,49.304363]\n", + "end_point = [2.717593,49.306231]\n", + "human = {\"type\":\"FeatureCollection\",\"features\":[{\"type\":\"Feature\",\"properties\":{},\"geometry\":{\"type\":\"LineString\",\"coordinates\":[[2.727216,49.304362,45.25],[2.727236,49.304392,45.25],[2.727109,49.304364,45.25],[2.726556,49.304387,45.25],[2.725759,49.304438,45.0],[2.725569,49.304411,45.25],[2.725415,49.304356,45.5],[2.725338,49.304322,45.75],[2.725040,49.304191,46.75],[2.724873,49.304115,47.25],[2.724630,49.304041,47.75],[2.724029,49.303993,47.5],[2.723915,49.303983,47.25],[2.723549,49.303958,46.5],[2.723282,49.303917,46.25],[2.722785,49.303802,46.75],[2.722660,49.303792,46.75],[2.722414,49.303826,46.5],[2.722082,49.303896,46.25],[2.721837,49.303913,46.25],[2.721746,49.303916,46.25],[2.721368,49.303953,46.25],[2.720955,49.304088,45.5],[2.720768,49.304168,45.0],[2.720628,49.304280,45.25],[2.720518,49.304428,45.25],[2.720457,49.304528,45.25],[2.720418,49.304592,45.0],[2.720337,49.304671,45.0],[2.720172,49.304778,44.75],[2.719663,49.305089,44.0],[2.719608,49.305123,44.0],[2.719472,49.305168,44.0],[2.719311,49.305203,44.0],[2.719012,49.305269,44.0],[2.718838,49.305308,44.0],[2.718637,49.305416,43.75],[2.718339,49.305572,43.5],[2.718257,49.305614,43.75],[2.718066,49.305708,44.25],[2.717787,49.305764,45.0],[2.717635,49.305784,45.5],[2.717579,49.305808,45.75],[2.717544,49.305851,45.75],[2.717528,49.305912,45.5],[2.717549,49.306110,44.5],[2.717567,49.306209,44.0],[2.717599,49.306223,43.75]]}}]}\n", + "plot_route(start_point, end_point, human)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "It should correctly handle routes with `access=no` if there is a `cycleway=share_busway` and a `bus=yes`.\n", + "\n", + "**Note**: It should work with both `cycleway:left`, `cycleway:right` and `cycleway` but I did not find much more examples here :/" + ] + }, + { + "cell_type": "code", + "execution_count": 451, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "http://127.0.0.1:8000/#map=17/48.585481/7.735928/OpenStreetMap&lonlats=7.735928,48.585481|7.736381,48.585357&profile=trekking-custom\n" + ] + }, + { + "data": { + "text/html": [ + "
" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 451, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "start_point = [7.735928,48.585481]\n", + "end_point = [7.736381,48.585357]\n", + "human = {\"type\":\"FeatureCollection\",\"features\":[{\"type\":\"Feature\",\"properties\":{},\"geometry\":{\"type\":\"LineString\",\"coordinates\":[[7.735927,48.585481,143.75],[7.736038,48.585515,144.25],[7.736048,48.585518,144.5],[7.736218,48.585537,145.0],[7.736271,48.585458,145.0],[7.736373,48.585355,145.25],[7.736374,48.585357,145.25]]}}]}\n", + "plot_route(start_point, end_point, human)" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -1118,7 +1278,7 @@ }, { "cell_type": "code", - "execution_count": 309, + "execution_count": 452, "metadata": {}, "outputs": [ { @@ -1131,13 +1291,13 @@ { "data": { "text/html": [ - "
" + "
" ], "text/plain": [ - "" + "" ] }, - "execution_count": 309, + "execution_count": 452, "metadata": {}, "output_type": "execute_result" } @@ -1146,7 +1306,7 @@ "start_point = [-73.960991,40.801791]\n", "end_point = [-73.973672,40.779388]\n", "human = {\"type\":\"FeatureCollection\",\"features\":[{\"type\":\"Feature\",\"properties\":{},\"geometry\":{\"type\":\"LineString\",\"coordinates\":[[-73.961009,40.801768,29.25],[-73.961057,40.801790,29.75],[-73.961009,40.801690,28.5],[-73.960998,40.801655,28.0],[-73.961025,40.801617,28.5],[-73.961092,40.801521,29.5],[-73.961350,40.801184,31.5],[-73.961381,40.801144,31.75],[-73.961780,40.800589,33.25],[-73.961839,40.800508,33.5],[-73.962235,40.799984,36.0],[-73.962309,40.799886,36.0],[-73.962684,40.799356,37.75],[-73.962792,40.799202,38.25],[-73.963205,40.798625,41.25],[-73.963275,40.798528,41.75],[-73.963670,40.797989,41.25],[-73.963736,40.797899,40.75],[-73.964190,40.797290,39.5],[-73.964219,40.797250,39.75],[-73.965464,40.795546,31.25],[-73.965544,40.795437,31.0],[-73.966020,40.794782,31.0],[-73.966504,40.794117,33.5],[-73.966932,40.793529,41.0],[-73.966943,40.793513,41.25],[-73.967338,40.792975,46.25],[-73.967449,40.792825,46.0],[-73.967872,40.792236,45.25],[-73.967934,40.792150,45.25],[-73.968309,40.791630,45.0],[-73.968384,40.791527,45.75],[-73.968786,40.790971,50.25],[-73.968844,40.790892,51.0],[-73.969245,40.790351,47.0],[-73.969311,40.790262,46.25],[-73.969691,40.789745,46.5],[-73.969769,40.789640,47.25],[-73.970150,40.789122,51.0],[-73.970224,40.789022,51.0],[-73.970614,40.788491,49.5],[-73.970689,40.788390,49.0],[-73.971098,40.787822,42.25],[-73.971141,40.787758,41.75],[-73.971549,40.787199,40.25],[-73.971602,40.787123,40.25],[-73.972025,40.786551,42.5],[-73.972093,40.786453,42.75],[-73.972530,40.785856,40.75],[-73.972591,40.785769,40.0],[-73.973006,40.785201,35.5],[-73.973056,40.785130,35.0],[-73.973473,40.784565,33.75],[-73.973514,40.784507,33.75],[-73.973936,40.783930,35.0],[-73.973985,40.783864,35.25],[-73.974398,40.783295,36.25],[-73.974466,40.783203,36.0],[-73.974527,40.783122,35.75],[-73.974903,40.782594,37.75],[-73.975402,40.781917,41.25],[-73.975897,40.781231,42.75],[-73.976270,40.780725,36.75],[-73.976335,40.780639,36.75],[-73.975251,40.780184,44.5],[-73.974738,40.779968,43.75],[-73.973571,40.779478,33.5],[-73.973647,40.779376,33.75]]}}]}\n", - "plot_route(start_point, end_point)" + "plot_route(start_point, end_point, human)" ] }, { @@ -1158,7 +1318,7 @@ }, { "cell_type": "code", - "execution_count": 308, + "execution_count": 453, "metadata": {}, "outputs": [ { @@ -1171,13 +1331,13 @@ { "data": { "text/html": [ - "
" + "
" ], "text/plain": [ - "" + "" ] }, - "execution_count": 308, + "execution_count": 453, "metadata": {}, "output_type": "execute_result" } @@ -1188,6 +1348,128 @@ "plot_route(start_point, end_point)" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "It should accept to take a `cycleway:left=share_busway` when the busway is `opposite_lane` even if the street is one way." + ] + }, + { + "cell_type": "code", + "execution_count": 454, + "metadata": { + "scrolled": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "http://127.0.0.1:8000/#map=17/48.85844/2.34823/OpenStreetMap&lonlats=2.34823,48.85844|2.34629,48.85591&profile=trekking-custom\n" + ] + }, + { + "data": { + "text/html": [ + "
" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 454, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "start_point = [2.34823, 48.85844]\n", + "end_point = [2.34629, 48.85591]\n", + "human = {\"type\":\"FeatureCollection\",\"features\":[{\"type\":\"Feature\",\"properties\":{},\"geometry\":{\"type\":\"LineString\",\"coordinates\":[[2.348251,48.858447],[2.348211,48.858500],[2.348231,48.858539],[2.348082,48.858589],[2.347674,48.858726],[2.347566,48.858765],[2.347448,48.858801],[2.347205,48.858878],[2.346787,48.859012],[2.346630,48.859062],[2.346604,48.859071],[2.346457,48.859119],[2.346397,48.859078],[2.346343,48.859032],[2.346180,48.858862],[2.346036,48.858675],[2.346017,48.858649],[2.345868,48.858363],[2.345812,48.858253],[2.347020,48.857935],[2.347183,48.857893],[2.347107,48.857766],[2.346925,48.857462],[2.346921,48.857430],[2.346918,48.857402],[2.346916,48.857376],[2.346993,48.857275],[2.347120,48.857239],[2.347065,48.857146],[2.346520,48.856259],[2.346513,48.856247],[2.346479,48.856189],[2.346435,48.856119],[2.346303,48.855905]]}}]}\n", + "plot_route(start_point, end_point, human)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "It should allow contraflow if the `cycleway` is `share_busway` and the `busway` it contraflow." + ] + }, + { + "cell_type": "code", + "execution_count": 455, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "http://127.0.0.1:8000/#map=17/48.823091/2.326623/OpenStreetMap&lonlats=2.326623,48.823091|2.328855,48.824801&profile=trekking-custom\n" + ] + }, + { + "data": { + "text/html": [ + "
" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 455, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "start_point = [2.326623,48.823091]\n", + "end_point = [2.328855,48.824801]\n", + "human = {\"type\":\"FeatureCollection\",\"features\":[{\"type\":\"Feature\",\"properties\":{},\"geometry\":{\"type\":\"LineString\",\"coordinates\":[[2.326624,48.823093,75.0],[2.326652,48.823088,75.0],[2.326657,48.823107,75.0],[2.326822,48.823267,74.0],[2.327165,48.823605,73.25],[2.327202,48.823638,73.0],[2.327509,48.823933,73.0],[2.327666,48.824040,73.25],[2.327791,48.824117,73.25],[2.327939,48.824215,73.0],[2.328004,48.824259,73.0],[2.328306,48.824481,72.25],[2.328821,48.824822,73.75]]}}]}\n", + "plot_route(start_point, end_point, human)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Correctly consider there is a cycleway when there is a `cycleway:left|right:oneway` tag." + ] + }, + { + "cell_type": "code", + "execution_count": 456, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "http://127.0.0.1:8000/#map=17/51.160763/13.561168/OpenStreetMap&lonlats=13.561168,51.160763|13.562155,51.1623&profile=trekking-custom\n" + ] + }, + { + "data": { + "text/html": [ + "
" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 456, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "start_point = [13.561168,51.160763]\n", + "end_point = [13.562155,51.1623]\n", + "human = {\"type\":\"FeatureCollection\",\"features\":[{\"type\":\"Feature\",\"properties\":{},\"geometry\":{\"type\":\"LineString\",\"coordinates\":[[13.561211,51.160769,120.0],[13.561187,51.160830,120.25],[13.561171,51.160872,120.25],[13.560886,51.161587,120.75],[13.560878,51.161669,121.0],[13.560902,51.161732,121.0],[13.561000,51.161839,121.0],[13.561106,51.161900,121.25],[13.561397,51.161964,121.5],[13.561504,51.162002,121.75],[13.561578,51.162037,121.75],[13.561626,51.162069,121.75],[13.561745,51.162022,122.0],[13.561844,51.162024,122.0],[13.561926,51.162030,122.25],[13.562003,51.162048,122.25],[13.562075,51.162097,122.25],[13.562114,51.162147,122.5],[13.562110,51.162299,122.5]]}}]}\n", + "plot_route(start_point, end_point, human)" + ] + }, { "cell_type": "code", "execution_count": null,