sumolib.net.node
index
/build/sumo-_JnMOZ/sumo-0.30.0+dfsg1/tools/sumolib/net/node.py

@file    node.py
@author  Daniel Krajzewicz
@author  Laura Bieker
@author  Karol Stosiek
@author  Michael Behrisch
@author  Jakob Erdmann
@date    2011-11-28
@version $Id: node.py 23247 2017-03-07 13:46:58Z behrisch $
 
This file contains a Python-representation of a single node.
 
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.

 
Classes
       
Node

 
class Node
    Nodes from a sumo network
 
  Methods defined here:
__init__(self, id, type, coord, incLanes, intLanes=None)
addIncoming(self, edge)
addOutgoing(self, edge)
areFoes(self, link1, link2)
forbids(self, possProhibitor, possProhibited)
getConnections(self, source=None, target=None)
getCoord(self)
getCoord3D(self)
getID(self)
getIncoming(self)
getInternal(self)
getLinkIndex(self, conn)
getOutgoing(self)
getShape(self)
Returns the shape of the node in 2d.
 
This function returns the shape of the node, 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.
 
If no shape is defined in the xml, an empty list will be returned.
getShape3D(self)
Returns the shape of the node in 3d.
 
This function returns the shape of the node, 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.
 
If no shape is defined in the xml, an empty list will be returned.
getType(self)
setFoes(self, index, foes, prohibits)
setShape(self, shape)
Set the shape of the node.
 
Shape must be a list containing x,y,z coords as numbers
to represent the shape of the node.