\( \def\bold#1{\bf #1} \newcommand{\d}{\mathrm{d}} \)
extracts climbs from street network and provides climblayer handling More...
#include <ClimbAnalyse.h>
Public Member Functions | |
ClimbAnalyse () | |
ClimbAnalyse (OSM *O, short mintype, short maxtype, double minP, double minSlope, double maxdwnHM, double minHM, HeightData *h) | |
starts a climb analysis | |
climblayer * | get_ClimbLayer () |
climblayer * | load_ClimbLayer (char *filename) |
void | save_ClimbLayer (char *projectname, char *folder, climblayer *c) |
void | create_MAP (char *projectname, char *folder, HeightData *h, double size) |
void | create_html (char *projectname, char *folder) |
void | create_list (char *projectname, char *folder) |
void | set_brect (double minlat, double maxlat, double minlon, double maxlon) |
restrict saved data to a rectangular area | |
Private Member Functions | |
void | analyse () |
void | set_parameters (short mintype, short maxtype, double minP, double minSlope, double maxdwnHM, double minHM) |
set the definitons of the climb | |
void | reset_STRONG (KOO *k) |
preparing cross to be inserted into f | |
void | init_fib (KOO *k) |
void | init_climb (climb *c, KOO *k) |
void | expand (climb *c) |
makes this climb expand over all Neighbour relations More... | |
void | free_tpl (trackpointlist *tp, trackpointlist *tpstop) |
deletes a trackpointlist down to tpstop | |
trackpointlist * | add (trackpointlist *tp, trackpoint *t, int tpc, readdirection rd) |
adds an branch t to a axisting trackpointlist | |
float | calc_P (trackpointlist *tp) |
calcs climb difficulty with fixed climb end | |
float | calc_P (trackpoint *t, int arraylength) |
calcs climb difficulty with loose climb end | |
float | calc_Pmax (climb *c) |
calcs climb difficulty with loose climb end | |
void | calc_climb (climb *c) |
calcs P, Pmax, Prec, tst of a climb | |
short | looses (climb *resident, climb *aspirant) |
determines, whether a new climb can stop an existing or vice versa | |
short | is_climb (trackpointlist *tp) |
checks whether the list represents a climb | |
short | all_active (climb *c) |
checks, whether used road are still avaiable in select_climbs() | |
short | enough_active (climb *c) |
checks climb, whether used roads are sufficently independend | |
short | storeif_climb (Neighbour *n, trackpointlist *tp, climb *from) |
checks for existing climbs at cross and executes looses() | |
void | del_climb (climb *c) |
deletes the whole climb recursivly | |
void | count_climbs (KOO *k) |
void | collect_climbs (KOO *k) |
picks raw climbs from street net, to be selected (select_climbs()) | |
void | select_climbs () |
selects collected climbs, if suffiently independed or difficult | |
void | create_names () |
create names from OSM data | |
void | eval_Way_names (QList< nameaspirant > *wn, climb *c0) |
create climb name aspirant list according to street names | |
void | eval_point_names (QList< nameaspirant > *pn, points **p, double fac, Track *t, bool validstart) |
create climb name aspirant list from summits and other point data | |
void | sort_climbpool (long s, long e) |
quicksort for collected climbs | |
void | create_climb_Track (climbpoolele *c) |
trace back climb to start and creates Track instance from it | |
short | check (KOO *k) |
short | crossunused (climb *c, KOO *k) |
varifies, that climb has not used the cross at k before | |
Private Attributes | |
FibunacciHeap< CAfib > * | f |
priority queue to store active cross sorted by height | |
long int | climbcount |
climbpoolele * | climbpool |
container to store climbs when collect_climbs() | |
climb * | cp |
OSM * | o |
HeightData * | h |
double | minlat |
bounding rect, saved html data is limited to | |
double | maxlat |
double | minlon |
double | maxlon |
*short | mintype |
*short | maxtype |
double | minP |
double | minSlope |
double | maxdwnHM |
double | minHM |
double | autonomP |
extracts climbs from street network and provides climblayer handling
A climb is defined by its minimum slope, is maximum descenting section, its minimum height meters and its minimum difficulty. It has to sufficiently independend from climbs which might lay at parts of the same Track. This class prides an algorithm to calculate all climbs. It is startet by calling the analyse() method. The algorithm works as follows: 1.) put all cross into a height sorted list to serve as a climb start 2.) lowest cross expands and labels the Neighbour cross, sets them active, i.g. put them into the list if they're not active 3.) a cross will be reached by different climbs, some of them have to be stopped if too weak. 4.) climb will only expand as long as the maximum descent fraction is not exceeded 5.) finally the cross list will be empty 6.) Now collect the climbs from the network beginning with the most difficult 7.) only the most difficult and sufficently independend climbs shall survive The resulting climbpool can be used to generate a climblayer and html data etc. The climblayer is a layer on top of the MAP, displaying all climbs. This creates, saves und loads the climblayer.
Definition at line 52 of file ClimbAnalyse.h.
ClimbAnalyse::ClimbAnalyse | ( | ) |
use for tp load climblayer only
Definition at line 20 of file ClimbAnalyse.cpp.
|
private |
starts the actual analysis
Definition at line 39 of file ClimbAnalyse.cpp.
|
private |
makes this climb expand over all Neighbour relations
the used Neighbour relation has to fullfil the mintype and maxtype than the climb tries to expand. Whether the expansion is succesful or not is check by the storeif_climb() method, then the expansion is either accepted or refused.
Definition at line 139 of file ClimbAnalyse.cpp.
climblayer * ClimbAnalyse::get_ClimbLayer | ( | ) |
creates and returns climblayer
Definition at line 536 of file ClimbAnalyse.cpp.
|
private |
put all cross to f recursivly
Definition at line 107 of file ClimbAnalyse.cpp.
|
private |
climb definition
Definition at line 80 of file ClimbAnalyse.h.
|
private |
number of collected climbs
Definition at line 85 of file ClimbAnalyse.h.
|
private |
climbpool, lists stopped climbs
Definition at line 89 of file ClimbAnalyse.h.
|
private |
for evaluating name aspirants
Definition at line 143 of file ClimbAnalyse.h.
|
private |
climb definition
Definition at line 80 of file ClimbAnalyse.h.
|
private |
road type definition
Definition at line 77 of file ClimbAnalyse.h.
|
private |
climb definition
Definition at line 80 of file ClimbAnalyse.h.
|
private |
climb definition
Definition at line 80 of file ClimbAnalyse.h.
|
private |
climb definition
Definition at line 80 of file ClimbAnalyse.h.
|
private |
road type definition
Definition at line 77 of file ClimbAnalyse.h.
|
private |
holds the street network data
Definition at line 142 of file ClimbAnalyse.h.