Hi,
Now I finally have some time allocated to CItyEngine.
I would like to create a rule file, that I can use to automatically generate 3D buildings with attributes assigned to the building polygons from a geodatabase.
I saw Matthias??? thread ???GIS data mini tutorial??? and it???s almost similar to what I would like, but I face some issues.
I would like to automatically assign textures to my buildings, and it need to change the texture depending on the year the building is from, and the building use. So a building from 1940 to 1960 used as a office, would randomly take textures from folder A. Then a building from 1960 to 1980 used as office, would randomly take a texture from folder B. A building from 1940 to 1960 used as a school would randomly take a texture from folder C etc. but of course with a little more folder structure. Depending on how many building uses the geodata brings this can result in a lot of different folders and a lot of rule typing, but I need some help to get this to work.
When I read the ???GIS data mini tutorial??? it had me start thinking how this could actually be done. If I set a attr to 0, it will take the data given from the GIS data. But this would not work for me, since the attribute is not giving me an information I can actually use.
What my thought was, was to create for example ???attr dateBuilt = 0 (next line) attr buildingUse = 0, but then I would need the rule to actually read the attributes from the GIS data and calculate which folder to choose from. IF dateBuilt = 1943 and buildingUse = school ; lookup folder C.
Has this been done?
Can it be done?
And how is it done? (I only need some guidance not a complete rule;-)