Select to view content in your preferred language

GIS Data Mini Tutorial : Building Height and Floor Splits

6919
13
03-15-2012 03:33 AM
by Anonymous User
Not applicable
Original User: matthiasbuehler

Hi !

I've been asked the following and decided to make a quick mini tutorial of this :



How can I import and use my GIS data [ Building Height, Ground Floor Height, Upper Floor Height ] in CityEngine ?


There's a zipped folder attached to this post containing a GDB and a CGA rule file. The GDB contains 3 shapes with specific attributes :

BuildingHeight
UpperFloorHeight
GroundFloorHeight

1]
Once downloaded and unzipped, just copy the GDB folder, then paste it in the 'data' folder of a CityEngine project. From there, you can drag-n-drop the GDB directly into the viewport to import the data (CE 2011.2 or newer).
2]
The FGDB Import dialog will fire up and show you there's one shape layer contained, using the an UTM projection. Click Finish.
3]
If the scene is empty and no SCS (Scene Coordinate System) has been set, an other window pops up which asks to select the SCS, click okay to accept the proposed WGS84 UTM projection. You'll see 3 shapes in your scene.
4]
Select one shape and check the Inspector : There's a tab called Object Attributes. You'll note there's the 3 attributes with the values from ArcGIS ! (yay !)
5]
Copy-paste the CGA rule provided into the 'rules' folder of your project. Double click it to open it and check the code.
6]
Select all 3 shapes in the viewport, then drag-n-drop the CGA rule file from the Navigator directly into the viewport onto the shapes. You'll notice that automatically, the buildings are extruded, then split properly into GroundFloor and as many Upperfloors as possible.


If you follow the steps above, you'll notice that :
- Nevertheless that in the CGA rules, all attributes have a value of zero to initialize the attribte in the rules, the buildings are extruded correctly to the height which is defined in the Object Attibutes !
- When there's a '@StartRule' Decoration set at a specific rule name (usually 'Lot'), the CityEngine automatically checks all attributes available when a rule file is assigned to a shape (e.g. via drag-n-drop) and points to the correct source.
- In our specific example, the CityEngine thus automatically connected the attribute value to the Object Attributes as the source, not the rule value.


Explanations and things to know (Note down !) :

We learn from this that if the CityEngine does not use the attribute values from the GIS data (Object Attributes), but use the value in the rules (in our case, nothing would be extruded since the value was defined as 0), the attribute source is not set correctly. To fix this, just use the attribute connection editor by clicking on the little icon with the black triangle next to the attribute value.

Using this workflow, you can define attributes directly in ArcGIS and then have the CityEngine use those values to drive the building generation.

Use this to colorize buildings, define tree species, roof types, ...


Cheers !
13 Replies
by Anonymous User
Not applicable
Original User: townofbanffgis

I'm dragging the GDB into CityEngine, and it gets to the point where it asks to verify the coordinate system, I click Finish and it constantly crashes CityEngine.  I'd really like to try this tutorial but can't - any suggestions?
Installed CityEngine build 120913 release win32-64bit.  I'm running ArcGIS 10

Steve
0 Kudos
MatthiasBuehler1
Deactivated User
hi,


can you try to import the GDB via RMB click > Import > GDB (instead of drag-n-drop)

let me know ..

matt
0 Kudos
by Anonymous User
Not applicable
Original User: vasso_k

Hello!

I have a problem with the generation of the model in CE.

Actually I want to use the attributes of the GIS data (that I have imported in the CE) for making cases and extrude the parts of the building. As the example of the Redlands that you have provided.

But it only extrudes the doors from the base floor and the underground. The rest in these 2 floors get error color.
And the most weird that I can't find why, is that the 3 floors above are stay as they are in the beginning. Nothing changes.

When I try to change the attr source from the button in the inspector I cannot because is unabled for some attributes that are important in my rule (e.g. the floor).

What am I suppose to do to solve this problem? Your help is very important! Thank you!
0 Kudos
MatthiasBuehler1
Deactivated User
Hi !


Try breaking the problem down to the simplest cases:

Use just 1 shape of each type ( e.g. door, floor slab, wall, .. ) and assign the rule. If this works, add more shapes.


I need a preciser description of your issues, e.g. screenshots, but first, try to track it down more systematically..

Ok ?

m.
0 Kudos