Code Analysis: International City – Outline

The first pass at analyzing the International City.cga code file begins with an overall outline, which includes

  • other CGA files that are imported, and whose attributes are made available in this main file
  • control attribute groups that are programmed to appear in the shape inspector (so you can adjust variables)
  • the CGA rule “tree” hierarchy

Two things became quickly apparent to me. First, there is certainly a logical structure in the 15-pages of code that spewed out of my printer and second, the tutorials I have completed to date did an excellent job of preparing me to understand what is going on. The diagram is not meant to be exact and certain parts of the hierarchy may appear in different places. Note the recursive nature of the code and how the same basic strategies are used to create different land use mixes.

I will use this outline as I structure my analysis and interpret code blocks in future installments.


You can program the variables that appear in the Shape Inspector (at right) and change them from the panel.  The “random seed” value for the selected feature is outlined at the bottom. Change the seed by clicking the ““update seed and generate models” button, circled at the top, or by entering CTL+SHIFT+G

Leave a Reply

Your email address will not be published. Required fields are marked *