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

@file    lane.py
@author  Daniel Krajzewicz
@author  Laura Bieker
@author  Karol Stosiek
@author  Michael Behrisch
@author  Jakob Erdmann
@date    2011-11-28
@version $Id: lane.py 22929 2017-02-13 14:38:39Z behrisch $
 
This file contains a Python-representation of a single lane.
 
SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
Copyright (C) 2011-2017 DLR (http://www.dlr.de/) and contributors
 
This file is part of SUMO.
SUMO is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.

 
Modules
       
sumolib

 
Classes
       
Lane

 
class Lane
    Lanes from a sumo network
 
  Methods defined here:
__init__(self, edge, speed, length, allow, disallow)
addOutgoing(self, conn)
getBoundingBox(self, includeJunctions=True)
getClosestLanePosAndDist(self, point, perpendicular=False)
getEdge(self)
getID(self)
getIndex(self)
getLength(self)
getOutgoing(self)
getParam(self, key, default=None)
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)
isInternal(self)
Returns True, if the lane is an internal lane. 
 
Raises a ValueError if the lane does not yet have an edge yet.
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

 
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 list of all allowed vClasses.

 
Data
        SUMO_VEHICLE_CLASSES = ('public_emergency', 'public_authority', 'public_army', 'public_transport', 'transport', 'lightrail', 'cityrail', 'rail_slow', 'rail_fast', 'private', 'emergency', 'authority', 'army', 'vip', 'passenger', 'hov', 'taxi', 'bus', 'coach', 'delivery', ...)