traci.polygon
index
/build/sumo-O79YsN/sumo-0.25.0+dfsg1/tools/traci/polygon.py

@file    polygon.py
@author  Michael Behrisch
@date    2011-03-16
@version $Id: polygon.py 18106 2015-03-19 08:08:16Z behrisch $
 
Python implementation of the TraCI interface.
 
SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
Copyright (C) 2011-2015 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
       
struct
traci.constants
traci

 
Functions
       
add(polygonID, shape, color, fill=False, polygonType='', layer=0)
getColor(polygonID)
getColor(string) -> (integer, integer, integer, integer)
 
Returns the rgba color of this polygon.
getContextSubscriptionResults(polygonID=None)
getIDCount()
getIDCount() -> integer
 
Returns the number of polygons in the network.
getIDList()
getIDList() -> list(string)
 
Returns a list of all polygons in the network.
getShape(polygonID)
getShape(string) -> list((double, double))
 
Returns the shape (list of 2D-positions) of this polygon.
getSubscriptionResults(polygonID=None)
getSubscriptionResults(string) -> dict(integer: <value_type>)
 
Returns the subscription results for the last time step and the given poi.
If no polygon id is given, all subscription results are returned in a dict.
If the polygon id is unknown or the subscription did for any reason return no data,
'None' is returned.
It is not possible to retrieve older subscription results than the ones
from the last time step.
getType(polygonID)
getType(string) -> string
 
Returns the (abstract) type of the polygon.
remove(polygonID, layer=0)
setColor(polygonID, color)
setColor(string, (integer, integer, integer, integer)) -> None
 
Sets the rgba color of this polygon.
setShape(polygonID, shape)
setShape(string, list((double, double))) -> None
 
Sets the shape (list of 2D-positions) of this polygon.
setType(polygonID, polygonType)
setType(string, string) -> None
 
Sets the (abstract) type of the polygon.
subscribe(polygonID, varIDs=(78,), begin=0, end=2147483647)
subscribe(string, list(integer), double, double) -> None
 
Subscribe to one or more polygon values for the given interval.
subscribeContext(polygonID, domain, dist, varIDs=(78,), begin=0, end=2147483647)

 
Data
        subscriptionResults = <{}, {}>