![]() |
GNSS data to OSM format processor and track finder
|
This file provides functions used to find bus line patterns. More...
Functions | |
| def | progressbar (it, prefix="", size=60, file=sys.stdout) |
| Function works as a progressbar in other functions running cycles. More... | |
| def | myratio_calc (list1, list2) |
| Alternative to ratio provided by gestalt or levenstein algorithms. More... | |
| def | gestalt1 (tuple_nodes, range_from, range_to) |
| Function finds repeating patterns of lengths defined by the range_from number ONLY, by crawling through tuple_nodes. More... | |
| def | levenshtein1 (tuple_nodes, range_from, range_to) |
| Check definition at the gestalt1 function. More... | |
| def | manual_trackfinder1 (tuple_nodes, range_from, range_to) |
| Check definition at the gestalt1 function. More... | |
| def | gestalt2 (tuple_nodes, range_from, range_to) |
| Approach difference is in the moment when ratio is calculated. More... | |
| def | levenshtein2 (tuple_nodes, range_from, range_to) |
| For basic principle, read gestalt8 description. More... | |
| def | manual_trackfinder2 (tuple_nodes, range_from, range_to) |
| For basic principle, read gestalt8 description. More... | |
| def | gestalt4 (tuple_nodes, range_from, range_to) |
| For basic principle, read gestalt8 description. More... | |
| def | gestalt5 (tuple_nodes, range_from, range_to) |
| For basic principle, read gestalt8 description. More... | |
| def | gestalt6 (tuple_nodes, range_from, range_to) |
| For basic principle, read gestalt8 description. More... | |
| def | gestalt8 (tuple_nodes, range_from, range_to) |
| Function finds repeating patterns of lengths range_from to range_to by crawling through tuple_nodes. More... | |
| def | levenshtein3 (tuple_nodes, range_from, range_to) |
| For basic principle, read gestalt8 description. More... | |
| def | manual_trackfinder3 (tuple_nodes, range_from, range_to) |
| For basic principle, read gestalt8 description. More... | |
| def | gestalt7 (tuple_nodes, range_from, range_to) |
| For basic principle, read gestalt8 description. More... | |
| def | levenshtein5 (tuple_nodes, range_from, range_to) |
| For basic principle, read gestalt8 description. More... | |
This file provides functions used to find bus line patterns.
| def patternfinding_functions.gestalt1 | ( | tuple_nodes, | |
| range_from, | |||
| range_to | |||
| ) |
Function finds repeating patterns of lengths defined by the range_from number ONLY, by crawling through tuple_nodes.
It returns the information about the position of tracks in tuple_nodes. Similarity is decided by the SequenceMatcher ratio or quick_ratio.
| tuple_nodes | file with repeating patterns in itself. Implemented with its elements as tuples |
| range_from | determines the length of a seeked repeating pattern |
| range_to | IGNORED |
first one is the length of the found track in nodes
second one is the position of first alternative of the found pair in the particular bus line
third one is the position of second alternative of the found pair in the particular bus line
fourth one is the output of the particular method for comparing two trajectories, in this case it compared these two on those mentioned positions
| def patternfinding_functions.gestalt2 | ( | tuple_nodes, | |
| range_from, | |||
| range_to | |||
| ) |
Approach difference is in the moment when ratio is calculated.
Here it initiates by 2 nodes being equal to each other.
| def patternfinding_functions.gestalt4 | ( | tuple_nodes, | |
| range_from, | |||
| range_to | |||
| ) |
For basic principle, read gestalt8 description.
Changes and approaches differ tiny amounts on more places in the body of the function.
| def patternfinding_functions.gestalt5 | ( | tuple_nodes, | |
| range_from, | |||
| range_to | |||
| ) |
For basic principle, read gestalt8 description.
Changes and approaches differ tiny amounts on more places in the body of the function.
| def patternfinding_functions.gestalt6 | ( | tuple_nodes, | |
| range_from, | |||
| range_to | |||
| ) |
For basic principle, read gestalt8 description.
Changes and approaches differ tiny amounts on more places in the body of the function.
| def patternfinding_functions.gestalt7 | ( | tuple_nodes, | |
| range_from, | |||
| range_to | |||
| ) |
For basic principle, read gestalt8 description.
Changes and approaches differ tiny amounts on more places in the body of the function.
| def patternfinding_functions.gestalt8 | ( | tuple_nodes, | |
| range_from, | |||
| range_to | |||
| ) |
Function finds repeating patterns of lengths range_from to range_to by crawling through tuple_nodes.
It returns information about the position of tracks in tuple_nodes. Similarity is decided by the SequenceMatcher ratio or quick_ratio.
| tuple_nodes | file with repeating patterns in itself. Implemented with its elements as tuples |
| range_from | determines the minimal length of a seeked repeating pattern |
| range_to | determines the maximal length of a seeked repeating pattern |
first one is the length of the found track in nodes
second one is the position of first alternative of the found pair in the particular bus line
third one is the position of second alternative of the found pair in the particular bus line
fourth one is the output of the particular method for comparing two trajectories, in this case it compared these two on those mentioned positions
| def patternfinding_functions.levenshtein1 | ( | tuple_nodes, | |
| range_from, | |||
| range_to | |||
| ) |
Check definition at the gestalt1 function.
Differences are in the method for trajectories comparison since here levenshtein is used and therefore its fuzz.ratio
| def patternfinding_functions.levenshtein2 | ( | tuple_nodes, | |
| range_from, | |||
| range_to | |||
| ) |
For basic principle, read gestalt8 description.
Changes and approaches differ tiny amounts on more places in the body of the function.
| def patternfinding_functions.levenshtein3 | ( | tuple_nodes, | |
| range_from, | |||
| range_to | |||
| ) |
For basic principle, read gestalt8 description.
Changes and approaches differ tiny amounts on more places in the body of the function.
| def patternfinding_functions.levenshtein5 | ( | tuple_nodes, | |
| range_from, | |||
| range_to | |||
| ) |
For basic principle, read gestalt8 description.
Changes and approaches differ tiny amounts on more places in the body of the function.
| def patternfinding_functions.manual_trackfinder1 | ( | tuple_nodes, | |
| range_from, | |||
| range_to | |||
| ) |
Check definition at the gestalt1 function.
Differences are in the method for trajectories comparison since here myratio_calc is used.
| def patternfinding_functions.manual_trackfinder2 | ( | tuple_nodes, | |
| range_from, | |||
| range_to | |||
| ) |
For basic principle, read gestalt8 description.
Changes and approaches differ tiny amounts on more places in the body of the function.
| def patternfinding_functions.manual_trackfinder3 | ( | tuple_nodes, | |
| range_from, | |||
| range_to | |||
| ) |
For basic principle, read gestalt8 description.
Changes and approaches differ tiny amounts on more places in the body of the function.
| def patternfinding_functions.myratio_calc | ( | list1, | |
| list2 | |||
| ) |
Alternative to ratio provided by gestalt or levenstein algorithms.
For each point of list1 it finds the nearest point out of all list2 points. It returns the average distance corresponding to one list1 point.
| def patternfinding_functions.progressbar | ( | it, | |
prefix = "", |
|||
size = 60, |
|||
file = sys.stdout |
|||
| ) |
Function works as a progressbar in other functions running cycles.