diff --git a/BrouterTesting.ipynb b/BrouterTesting.ipynb index 943d46c..e1cdf25 100644 --- a/BrouterTesting.ipynb +++ b/BrouterTesting.ipynb @@ -22,8 +22,13 @@ }, { "cell_type": "code", - "execution_count": 2, - "metadata": {}, + "execution_count": 1, + "metadata": { + "ExecuteTime": { + "end_time": "2019-05-06T13:49:03.629948Z", + "start_time": "2019-05-06T13:49:02.938187Z" + } + }, "outputs": [], "source": [ "import folium\n", @@ -32,8 +37,13 @@ }, { "cell_type": "code", - "execution_count": 3, - "metadata": {}, + "execution_count": 5, + "metadata": { + "ExecuteTime": { + "end_time": "2019-05-06T13:51:51.367704Z", + "start_time": "2019-05-06T13:51:51.354939Z" + } + }, "outputs": [], "source": [ "BROUTER_URL = 'http://127.0.0.1:17777' # URL of the BRouter-server instance, no trailing slash\n", @@ -49,8 +59,13 @@ }, { "cell_type": "code", - "execution_count": 4, - "metadata": {}, + "execution_count": 10, + "metadata": { + "ExecuteTime": { + "end_time": "2019-05-06T13:53:31.401284Z", + "start_time": "2019-05-06T13:53:31.343919Z" + } + }, "outputs": [], "source": [ "def brouter_route(start_point, end_point, profile):\n", @@ -1510,6 +1525,51 @@ "plot_route(start_point, end_point, human)" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Correct penalty for `highway=footway` versus `highway=pedestrian` (see https://github.com/abrensch/brouter/issues/151):" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "ExecuteTime": { + "end_time": "2019-05-06T13:53:38.134273Z", + "start_time": "2019-05-06T13:53:37.827676Z" + } + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "http://127.0.0.1:8000/#map=17/48.81857/2.319454/OpenStreetMap&lonlats=2.319454,48.81857|2.319835,48.818984&profile=trekking\n" + ] + }, + { + "data": { + "text/html": [ + "
" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 11, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "start_point = [2.319454, 48.81857]\n", + "end_point = [2.319835, 48.818984]\n", + "human = {\"type\":\"FeatureCollection\",\"features\":[{\"type\":\"Feature\",\"properties\":{},\"geometry\":{\"type\":\"LineString\",\"coordinates\":[[2.319461,48.818593,77.25],[2.319521,48.818585,77.5],[2.319578,48.8186,77.5],[2.319825,48.818983,78.75],[2.319832,48.81898,78.75]]}}]}\n", + "plot_route(start_point, end_point, human)" + ] + }, { "cell_type": "code", "execution_count": null, @@ -1520,21 +1580,21 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3", + "display_name": "Python 2", "language": "python", - "name": "python3" + "name": "python2" }, "language_info": { "codemirror_mode": { "name": "ipython", - "version": 3 + "version": 2 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.7.1" + "pygments_lexer": "ipython2", + "version": "2.7.14" } }, "nbformat": 4,