Is there a way to reference different styles within a cga script?
Say you want to render different facade styles (or other characteristics defined by styles) based on a constraint map reference. How do you do that?
In my case, I want to control the amount of new buildings to replace historical buildings in an urban regeneration area by means of a gray scale map indicating the redevelopment ratios for different parts of the area. I have defined old and new building types with different names within one cga file (quite a hassle and not very clean) but I would like to simplify my script (and my work) by using styles. Only, I can't figure out a way to do it.
Rather than keeping building types in a single cga file, it might be easier to split them into separate files and import the cga file for the appropriate building type into a master.cga. The imported building type cga file can be selected conditionally, based on the value from raster constraint map layer. It will keep the code a bit neater and make it more expandable (for more building types.
I'm working on a similar problem (though hadn't considered using styles); you may find the discussions in this thread informative.