traci.polygon | index /home/behr_mi/sumo/tools/traci/polygon.py

`@file polygon.py
@author Michael Behrisch
@date 2011-03-16
@version $Id: polygon.py 13752 2013-04-27 06:06:24Z behrisch $
Python implementation of the TraCI interface.
SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
Copyright (C) 2011 DLR (http://www.dlr.de/) and contributors
All rights reserved`

Modules
`` |  |
struct | traci.constants | traci |

Functions
`` |  | add(polygonID, shape, color, fill=False, polygonType='', layer=0) getColor(polygonID) `getColor(string) -> (integer, integer, integer, integer) .` getContextSubscriptionResults(polygonID=None) getIDList() `getIDList() -> list(string) Returns a list of all polygons in the network.` getShape(polygonID) `getShape(string) -> list((double, double)) .` 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 .` remove(polygonID, layer=0) setColor(polygonID, color) setShape(polygonID, shape) setType(polygonID, polygonType) 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. A call to this method clears all previous subscription results.` subscribeContext(polygonID, domain, dist, varIDs=(78,), begin=0, end=2147483647)

Data
`` |  | subscriptionResults = <traci.SubscriptionResults instance>