PyANGKernel.GKRoute¶
- class GKRoute¶
-
Inherited by:
GKSubPath,GKPublicLine,GKODRouteSynopsis¶
Methods¶
def
__init__()def
getRoute()def
getRouteIds()def
getSection()def
isOnlyMicro()def
length3D()def
setSection()
Virtual methods¶
def
add()def
clear()def
insert()def
isCorrect()def
prepend()def
remove()def
setRoute()def
use()
Static functions¶
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description¶
A continuous route between two points of the network specified as a ordered collection of sections.
See also
- __init__()¶
- __init__(route)
- Parameters:
route –
GKRoute
Adds a section to the route either to the end (after == nullptr or after is not in the route) or after the section “after” (as many times as after is in the route).
- static add(routeItems, section[, after=None])
Adds a section to the route either to the end (after == nullptr or after is not in the route) or after the section “after” (as many times as after is in the route).
Returns the position where the section have been added.
- clear()¶
Clear the route
Get the middle section of the route
Returns all sections that are part of a route (in route order).
- getRouteIds()¶
- Return type:
.std.vectoruint
Returns all sections IDs that are part of a route (in route order).
Returns the section at position “pos” or NULL is the index is incorrect.
Returns a list of all the appearances of the given section and the position in the route (being 0 the first section and Number of sections in the route - 1 if it is the last section
returns the turns in the route
Inserts a section in the route immediately before pos
- isCorrect([errorID=None[, indexSection=None[, previousSection=None[, scenario=None]]]])¶
- Parameters:
errorID – int
indexSection – int
previousSection – int
scenario –
GKGenericScenario
- Return type:
Returns true if the route is connected (we can go from section to section from the beginning of the route to the end and in the same order as specified in the route). If the route is not complete the ID of first section that is not connected is returned in the errorID if it has been supplied. Also, the previous section to the error one and its position in the list of sections are returned.
Returns total length of the route (including all sections and turns)
Adds a section to the route either as the first section of the route (before == nullptr or before is not in the route) or before the section “before” (as many times as before is in the route).
- static prepend(routeItems, section[, before=None])
Removes a section from the route and return the sections that was before the section (a section can be N times in a line).
- setRoute(sections)¶
- Parameters:
sections – .list of GKSection
Sets the sections used by this route. No check is done on the sections navegability.
Changes the section at position “pos”.
Returns true if section is in the route
Returns true if turning is in the route (connects two consecutive sections of the route).