Analogous to conditional rules, the CGA Shape grammar permits stochastic rules, i.e. creating variation using randomness.
PredecessorShape --> percentage%: Successor1 percentage%: Successor2 ... else: SuccessorNThe sum of all percentages must not be greater than 100.
Lot --> 30% : Lot("residential") 20% : Lot("retail") else : Lot("industrial")
In this example, there is a 30% chance the first successor is chosen and a new Lot shape with parameter "residential" is generated, a 20% chance for the second successor and a 50% chance for the last successor to be chosen.
All random numbers, also the choice of the percentages above, depend on the current shape's seed (the seedian shape attribute).
Again, condition blocks can be nested:
Lot --> 30% : 50% : Lot("residential") else : NIL 20% : Lot("retail") else : Lot("industrial")
Note that a condition block always needs to be finished with an else: and percentages and successors must not be mixed up.
Copyright ©2008-2017 Esri R&D Center Zurich. All rights reserved.