sumolib.net.lane | index /home/delphi/gcc/sumo/tools/sumolib/net/lane.py

`# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
# Copyright (C) 2011-2022 German Aerospace Center (DLR) and others.
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
# https://www.eclipse.org/legal/epl-2.0/
# This Source Code may also be made available under the following Secondary
# Licenses when the conditions for such availability set forth in the Eclipse
# Public License 2.0 are satisfied: GNU General Public License, version 2
# or later which is available at
# https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later`

Modules
`` |  |
sumolib |  |  |

Classes
`` |  | builtins.object Lane
class Lane(builtins.object)
`` | `Lane(edge, speed, length, width, allow, disallow) Lanes from a sumo network`
| Methods defined here: __init__(self, edge, speed, length, width, allow, disallow) `Initialize self. See help(type(self)) for accurate signature.` addOutgoing(self, conn) allows(self, vClass) `true if this lane allows the given vehicle class` getBoundingBox(self, includeJunctions=True) getClosestLanePosAndDist(self, point, perpendicular=False) getConnection(self, toLane) `Returns the connection to the given target lane or None` getEdge(self) getID(self) getIncoming(self, onlyDirect=False) `Returns all incoming lanes for this lane, i.e. lanes, which have a connection to this lane. If onlyDirect is True, then only incoming internal lanes are returned for a normal lane if they exist` getIndex(self) getLength(self) getNeigh(self) getOutgoing(self) `Returns all outgoing connections from this lane.` getOutgoingLanes(self) `Returns all outgoing lanes from this lane.` getParam(self, key, default=None) getParams(self) getPermissions(self) `return the allowed vehicle classes` getShape(self, includeJunctions=False) `Returns the shape of the lane in 2d. This function returns the shape of the lane, as defined in the net.xml file. The returned shape is a list containing numerical 2-tuples representing the x,y coordinates of the shape points. For includeJunctions=True the returned list will contain additionally the coords (x,y) of the fromNode of the corresponding edge as first element and the coords (x,y) of the toNode as last element. For internal lanes, includeJunctions is ignored and the unaltered shape of the lane is returned.` getShape3D(self, includeJunctions=False) `Returns the shape of the lane in 3d. This function returns the shape of the lane, as defined in the net.xml file. The returned shape is a list containing numerical 3-tuples representing the x,y,z coordinates of the shape points where z defaults to zero. For includeJunction=True the returned list will contain additionally the coords (x,y,z) of the fromNode of the corresponding edge as first element and the coords (x,y,z) of the toNode as last element. For internal lanes, includeJunctions is ignored and the unaltered shape of the lane is returned.` getSpeed(self) getWidth(self) setNeigh(self, neigh) setParam(self, key, value) setShape(self, shape) `Set the shape of the lane shape must be a list containing x,y,z coords as numbers to represent the shape of the lane` Data descriptors defined here: __dict__ `dictionary for instance variables (if defined)` __weakref__ `list of weak references to the object (if defined)`

Functions
`` |  | addJunctionPos(shape, fromPos, toPos) `Extends shape with the given positions in case they differ from the existing endpoints. assumes that shape and positions have the same dimensionality` get_allowed(allow, disallow) `Normalize the given string attributes as a set of all allowed vClasses.` is_vehicle_class(s) reduce(...) `reduce(function, sequence[, initial]) -> value Apply a function of two arguments cumulatively to the items of a sequence, from left to right, so as to reduce the sequence to a single value. For example, reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]) calculates ((((1+2)+3)+4)+5). If initial is present, it is placed before the items of the sequence in the calculation, and serves as a default when the sequence is empty.`

Data
`` |  | SUMO_VEHICLE_CLASSES = {'army', 'authority', 'bicycle', 'bus', 'cityrail', 'coach', ...}