PyANGKernel.GKPedestrianCrossing

class GKPedestrianCrossing

Area where pedestrians can cross a section

Details

A pedestrian crossing that can be set at the beginning or end of a section. For crossings in the middle in a node (Japanese style) use decorated turns.

Inheritance diagram of PyANGKernel.GKPedestrianCrossing

Synopsis

Methods

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

__init__()
__init__(arg__1)
Parameters:

arg__1GKPedestrianCrossing

getAllowCrossingInRed()
Return type:

bool

Returns if the pedestrian crossing allows pedestrians to cross in red

getConsiderAsYellowBox()
Return type:

bool

Gets whether this pedestrian crossing will be considered as yellow box or not.

getGiveWayToVehiclesBefore()
Return type:

bool

Gets whether vehicles will halt at the stop line (true) or at the end of the section, meaning they enter and wait *on* the crossing (false).

getLeftWaitingArea()
Return type:

GKPoints

Returns the waiting area at left. If it does not exist, it creates the waiting area with width equal to section lane width.

getNode()
Return type:

GKNode

Returns the node this pedestrian crossing affects to, that is, the section’s origin node when located at the beginning of the section and the section’s destination node when located at the end

getPedestrianCrossingColor()
Return type:

QColor

It will return the color to be used in 2D views to colour the pedestrian crossing. White in editing mode. Red, green or amber depending on the signal state during the simulation

getPedestriansYieldToVehicles()
Return type:

bool

getPolygon([_margin=1.0])
Parameters:

_margin – float

Return type:

.std.pairGKPoints,uint

Gets the pedestrian crossing polygon enclosed in the section and parallel to the entranceLineAngle if the pedestrian crossing is at the beginning of the section or to the exitLineAngle if it is located at the end of the section. The width of the returned polygon will be the same as the pedestrian crossing minus the margin parameter.

The uint value also returned is the number of points in the left part (that is, first part) of the returned polygon

getRightWaitingArea()
Return type:

GKPoints

Returns the waiting area at right. If it does not exist, it creates the waiting area with width equal to section lane width.

getSafetyMarginBack()
Return type:

float

Safety margin (in m) to apply to a pedestrian back. 3 m by default.

getSafetyMarginFront()
Return type:

float

Safety margin (in m) to apply to a pedestrian front. 3 m by default.

getTurningsOnTop()
Return type:

.list of GKTurning

Returns all the turns in the node this pedestrian crossing affects to, that intersect with this pedestrian crossing

isAtTheBeginning()
Return type:

bool

Is this pedestrian crossing at the beginning of the section? By beginning meaning the first part of the section a vehicle goes through.

isAtTheEnd()
Return type:

bool

Is this pedestrian crossing at the end of the section? By end meaning the last part of the section a vehicle goes through.

isDisableUpdateOnConnections()
Return type:

bool

isLeftWaitingAreaActive()
Return type:

bool

Returns whether the LEFT waiting area is active or not. They are only visible when the pedestrian crossing is inside a pedestrian area

isRightWaitingAreaActive()
Return type:

bool

Returns whether the RIGHT waiting area is active or not. They are only visible when the pedestrian crossing is inside a pedestrian area

isShowingWaitingAreas()
Return type:

bool

Returns whether the waiting areas are visible or not. They are only visible when the pedestrian crossing is inside a pedestrian area

isSignalized(masterPlan)
Parameters:

masterPlanGKMasterControlPlan

Return type:

bool

Returns true if the pedestrian crossing is signalised in the masterPlan. False, otherwise. Pedestrian crossings can only be in signal groups belonging to either section’s origin node or section’s destination node

rebuildWaitingAreas()
setAllowCrossingInRed(allowCrossingInRed)
Parameters:

allowCrossingInRed – bool

Sets if the pedestrian crossing allows pedestrians to cross in red

setConsiderAsYellowBox(value)
Parameters:

value – bool

Sets this pedestrian crossing to be considered as yellow box or not.

setDisableUpdateOnConnections(val)
Parameters:

val – bool

setGiveWayToVehiclesBefore(value)
Parameters:

value – bool

Sets whether vehicles will halt at the stop line (true) or at the end of the section, meaning they enter and wait *on* the crossing (false).

setLeftWaitingArea(points)
Parameters:

pointsGKPoints

Sets the left waiting area points

setPedestrianCrossingColor(color)
Parameters:

colorQColor

setPedestriansYieldToVehicles(val)
Parameters:

val – bool

setRightWaitingArea(points)
Parameters:

pointsGKPoints

Sets the right waiting area points

setSafetyMarginBack(margin)
Parameters:

margin – float

Safety margin (in m) to apply to a pedestrian back. 3 m by default.

setSafetyMarginFront(margin)
Parameters:

margin – float

Safety margin (in m) to apply to a pedestrian front. 3 m by default.

updateConnections()

Force update the connections if any