The program steps are:
- read osm file and look for relation
- gather all needed way and node data
- create a smaller temp osm file (to speed up process and to reduce output size)
- try to make one way out of all the members of the relation
- look for POIs on that way
- create directions list
- create detail maps and remember the bboxes (for that purpose even smaller temp osm files are generated)
- create overview map
- create title page
- create POI directory
- merge all created files
- delete temp files
Creating temp files
Osmosis is used to create the temp files. --bounding-box is used with parameters completeWays=yes and completeRelations=yes.
Looking for POIs
While looking for POIs whose types were provided in the POI file they will be assigned the nearest node in the way of the relation. However they will only be used and displayed if a certain distance is not exceeded.
Not all nodes of the way will be used in the directions list. The items of the list are called steps. A node will become a step if
- it is start or end
- has an elevation given
- has a POI nearby
- has a direction change at in intersection
Use -lesssteps=10 i.e. to further reduce the number of steps. Then direction changes with less than 10 degrees at an intersection will not become a step in the list.
To find out where an intersection is located the program parses all ways and collects the number of way segments that touch a node. If the number is greater than 2 there is an intersection.
The POI directory (optional) will contain each POI displayed in the map with page number and grid location. Will contain entries for each page the POI is located on. Directory can be displayed with 1-3 columns of text.
Each node in the way will be checked for elevation data (ele=1000 i.e.). If there are more than two nodes with such data the directions table will contain an elevation column and an elevation profile will be added to the document.
Additionally the ways of the osm file will be parsed for contour data from srtm data. If such data is found the program will search for intersections of route and contour lines. If such an intersection is found the data will be added to the elevation profile. However, it will not be added to the description because that is node based. Intersections can occur at any point in the route.