[TOC]
This project objective is to compute route to explore tiles, by cycling or running. For "tiles" information, see statshunters or veloviewer.
Requirements:
Open a terminal window and navigate to the folder that you want to download route-tiles into. Write in the terminal window
git clone https://github.com/BenoitBouillard/route-tiles.git
on future, you can perform a pull request to get the latest version:
git pull
followed by
cd route-tiles
and at last to install python package
pip install -r requirements.txt
To generate html documentation from this readme:
python -m markdown README.md -f statichelp.html -x extra -x toc
There are 2 parts:
The server receive requests from the user interface and compute the route by:
The server is a python script. To launch it, run this command in a terminal from the installation folder:
python route-tile-server.py
A message should be displayed:
serving at port 8000
It is possible to change the port with --port option:
>python route-tile-server.py --port 80
serving at port 80
Once the server is running, it is possible to use the user interface. It is a web page. On the same computer than the server, it is accessible with url http://localhost:8000
To find a route, several information are mandatory or possible:
When there is enough information, a route request will be send to the server after a few seconds.
The status of the routing is displayed:
Data are stored locally by the browser. If you refresh the page (or close and open it later), latest data will be recovered.
It is possible to choose from several modes:
For some personal reason, we could want to avoid turnaround on tile visiting (there is no other reason to have a turnaround on route computation), even if it is the minimum route. We could accept to do 100m or 1km more. This option can add an additional cost for each turnaround, and them limit them with an acceptable cost.
/! The algorithm don't find the better route without turnaround (bug) /!
Start position is mandatory. End position is optional. If there is no end position, the route will be a loop (return to the start point).
To define the start or end position, clic on the "Start" or "End" button and then on map for the position. A marker will be displayed.
It is possible to move markers directly on the map.
It is possible to remove start and end position with the trash bin icon on the right of the button.
It is also possible to inverse start and end position with the icon with the double arrows between start and stop button.
You can add one or several waypoints that the route must go.
To add a waypoint, select "Add waypoint" button and then, click on the map. The waypoint should appear on the map by a cyan marker.
You can move a waypoint directly on the map by dragging it.
To remove a waypoint, just click on it.
On the map, you can select tiles to visit, just by clicking on it. Same to unselect a tile.
Be careful: Don't add to much tiles. The time of computation increase exponentially !
Tips:
You can remove all marked tiles with "Clear tiles" button. It will also remove all waypoints.
When the route is finished ("complete" status), it is possible to directly download it: Click on download icon blue button, and enter a file name in input field.
Name is optional. If none, datetime will be use for the file name and gpx name.
It is also possible to store several routes in the "Routes" section. Give a name and click on "+" button. Then you can highlight previous route, rename, remove or download them.
You can also perform some operation on route with the action menu:
Actions on selected route:
Tips: You can perform merge and replace with the finded route by clicking the green status instead of next route.
It is possible to activate filter for displayed routes.
Filter is a regex expression that will check route name.
Some example:
^Vélo
: Route started by "Vélo"[0-9]$
: Route finised by a numberIt is possible to display missing tiles on the map to facilitate the tiles selection for a route.
You can import data from statshunters:
StatsHunters.com offer the possibility to create a link to share your personal page with others. You have to create sharelink on https://statshunters.com/share page and copy paste the full link (something like https://www.statshunters.com/share/abcdef123456) on the page and import.
As it take some time to load ativities from statshunters server, they are saved in cache to accelerate the page loading and filter computation. To load new activities, you have to click "Reload" button.
It is possible to add filter on statshunters. It should be formated as python expression and usefull data from activities are:
Some examples:
type=="Ride" and date>="2021"
type=="Run" and '#fromHome' in name and date>"2021"