Skip to content

generate_test_cities command

Andrés Fortier edited this page Apr 6, 2017 · 1 revision

Note: This is still a work in progress, not all the sample cities have been migrated to each generator test.

generate_test_cities

We have factored out a set of sample city models that should be used to unit test every generator. However, since it is always handy to have visual representations, we also added a command to generate all the output files for those samples (this is roughly equivalent to executing the run_generator command for each sample).

In order to run it just do:

$ python terminus/generate_test_cities.py

you can check the generated contents by doing:

$ ll terminus/tests/samples/
total 4224
drwxrwxr-x 2 andres andres  16384 abr  6 11:05 ./
drwxrwxr-x 3 andres andres  16384 abr  6 11:05 ../
-rw-rw-r-- 1 andres andres    351 abr  6 11:05 cross_monolane.mtl
-rw-rw-r-- 1 andres andres 535642 abr  6 11:05 cross_monolane.obj
-rw-rw-r-- 1 andres andres   1587 abr  6 11:05 cross_monolane.yaml
-rw-rw-r-- 1 andres andres    506 abr  6 11:05 cross.rndf
-rw-rw-r-- 1 andres andres   2329 abr  6 11:05 cross.svg
....
-rw-rw-r-- 1 andres andres    351 abr  6 11:05 y_intersection_one_to_many_monolane.mtl
-rw-rw-r-- 1 andres andres 542580 abr  6 11:05 y_intersection_one_to_many_monolane.obj
-rw-rw-r-- 1 andres andres   1528 abr  6 11:05 y_intersection_one_to_many_monolane.yaml
-rw-rw-r-- 1 andres andres    651 abr  6 11:05 y_intersection_one_to_many.rndf
-rw-rw-r-- 1 andres andres   2480 abr  6 11:05 y_intersection_one_to_many.svg

Finally, the sample cities can be found in the TestCitiesGenerator class

Clone this wiki locally