GIS Diven Building.cga and building footprints

1016
3
08-29-2017 05:35 AM
alexiapaterson
New Contributor

Hello, I am new to CityEngine. I was wondering if someone has GIS Driven Buildings cga? I am building up attributes table and it would ideal to apply a rule which will generate all the buildings within their respective heights and other atrr. 

Also what is the easiest way to get building footprints. Lidar? Your help would be amazing. 

 Urban Planner from OZ!

0 Kudos
3 Replies
Luiz_AmadeuCoutinho
Occasional Contributor III

I´m not the best to talk about CGA rules, but You can find a lot of CGA samples to learn how to create your rules or apply some rules to create buildings from Footprint.Here to samples for you.

Check here Tutorial 16: Urban planning—CityEngine Tutorials | ArcGIS Desktop 

Or download the Project - 05 - Urban Design from CityEngine(see attached)

And about the best way to get Footprints: LIDAR is a good option but is expensive if you don´t have budget.

Openstreetmap it´s a free alternative

Or create your own Footprint using Satellite images on ArcMap.

0 Kudos
CaseyBox
New Contributor II

Hi,

I have a simple code which extrudes footprints by the average height of the building (taken from LiDAR) and then colours the shape:

## Annotations ##
@Building_Height
attr BuildingHeight = 5
@Range("Gable", "Hip")
attr RoofType = RandomRoofType
RandomRoofType =
 35%: "Gable"
 else: "Hip"

## Rules ##
@StartRule
 BuildingShell -->
  cleanupGeometry(all,0.5)
  extrude(world.up, BuildingHeight)
  comp (f) {top : Roof| all : ColourBuilding}
  ColourBuilding
 
 Roof -->
  case RoofType == "Gable" : GableRoof
  else : HipRoof
 GableRoof -->
  roofGable(25,0.2)
  ColourRoof
 
 HipRoof -->
  roofHip(30, 0.5)
  ColourRoof
 ColourBuilding -->
  color("#E1E1E1")
 ColourRoof -->
  color("#9C9C9C")
You can link the attribute "BuildingHeight" above to a field in your attribute table; in this case, the attribute table contains a field which has been populated with mean heights for the building footprints.
You could do the same thing for any number of attributes.
0 Kudos
CherylLau
Esri Regular Contributor

An easy way to get OpenStreetMap data into CityEngine is to use File -> Get Map Data.

For some cities, sometimes the building footprints have height data.  If this data is present, the ESRI.lib Building_From_OpenStreetMap.cga rule (which is automatically assigned to building footprints downloaded from Get Map Data) will create a building with the specified height.  This rule also takes into account these attributes:  height, building__levels, roof__height, roof__shape, building__colour, roof__colour.

Of course, you can make your own rule that takes into account the attributes that you want to consider.

0 Kudos