Search code examples
sumo

dividing a network into a grid of small cells in a SUMO scenario


Is there a way to divide an already- existing road network into a 2-D grid of equal sized cells? I need to extract some information such as vehicle density, average speed,...etc. from each cell.

are there any libraries, tools, APIs or tutorials? I am new to SUMO so any help would be appreciated.


Solution

  • The easiest way is probably to generate an fcd output (sumo --fcd-output) which gives coordinates for every vehicle and then aggregate the values in a simple script. Depending on the precision needed and the data volume you expect, you can also aggregate the output to edges (and to time intervals) in SUMO using the mean data output but then you will need to handle the case of edges which are in multiple cells yourself. There is some help in parsing a sumo network and sumo outputs in sumolib.