.cga for generating buildings based on block type (lot)

1690
8
07-18-2018 08:12 PM
JRAdams
New Contributor III

Have seen users with something similar in youtube videos, but unable to locate anything worthwhile. Looking mainly for residential. 

Finding it hard to locate cga rules altogether. 

0 Kudos
8 Replies
CherylLau
Esri Regular Contributor

There are simple building rules in ESRI.lib.  Building_From_Footprint.cga takes as input a 2D initial shape representing the building footprint.  Building_From_Mass_Texturizer.cga takes as input a 3D mass model of the building and puts textures on it.  Building_From_OpenStreetMap.cga is for 2D footprints from OpenStreetMap data which may have object attributes specifying heights or colors (i.e. height, building__levels, roof__height, roof__shape, building__colour, roof__colour).

0 Kudos
JRAdams
New Contributor III

Thank you Cheryl! I have previously looked over the rules you mentioned. 

I am looking for something similar to what is mentioned in this video Webinar: 3D Planning with SketchUp and CityEngine - YouTube 

They implement a cga that uses block size to generate a building, along with landscaping too it appears. 

0 Kudos
CherylLau
Esri Regular Contributor

Devin Lavigne‌ mentions in the comments of that video that they sell their rules and create custom rules.

You can also check out examples like Philadelphia and Redlands Redevelopment or Tutorials 6 and 9 (Help -> Download Tutorials and Examples) .

JRAdams
New Contributor III

Thank you! Missed that comment 

I may contact them if unable to sort it out for myself- very much new to CityEngine. Got time for one more question?

I've been struggling with trying to figure out how to subdivide a polygon that includes some streets, but the streets do not go all the way around the polygon (not a closed loop). As in a way to link the polygon with the drawn streets, so that when subdivided, the streets are honored. Thanks again for all your help!! I will keep making my way through videos & tutorials 

0 Kudos
CherylLau
Esri Regular Contributor

I don't really understand what you want to do, but if you want to subdivide a shape, you can use any combination of the operations in the "Geometry Subdivision" section in the CGA reference page, such as split, offset, setback, shapeL, U or O.

CGA Reference Index 

0 Kudos
JRAdams
New Contributor III

Cheryl thank you for the response! I have seen the different options for subdivision.

I drew up a quick paint sketch to better explain:  

It may be that what I am asking is not possible. From my understanding the streets (red) must close loop for blocks to be auto-generated. The drawing I've attached shows that I do not have a closed loop street. The issue I am having is that I want blocks to be created within the polygon (black) and have the street honored, so that when I choose skeleton geometry, all blocks will line up with the street. When trying this, blocks (blue) were splitting across the street (pink oval), instead of the full block being on one side of the street or the other. My polygon is a shape, and not part of the street network. 

I was also getting double blocks on the southern portion, where they would not have street access (yellow oval). If the polygon subdivision honored the streets, blocks should only show where street access is available (i.e. their fronts align with street). Lastly, I am trying to sort out how to assign an obstacle (green rectangle), so this portion would not be included in subdivision.

Any suggestions in the right direction are very much appreciated! I know that's a lot, so definitely understand if it's just too much. I am very grateful for all your help! 

0 Kudos
CherylLau
Esri Regular Contributor

Shapes automatically created from a graph network (streets) are dynamic shapes.  Blocks are only created when there are closed loops in the graph network.  Blocks can then be subdivided to create lots.

Creation of Shapes from Graph Networks 

Blocks can be subdivided according to the chosen subdivision algorithm (type):  Recursive subdivision, offset subdivision, skeleton subdivision, no subdivision.

Block Parameters 

Since you have a polygon which is not a dynamic shape (it is not created automatically from a street network), the polygon doesn't know about the street.  The block subdivision algorithms are not available for the polygon.  With the polygon, you can apply the cga operations in the "Geometry Subdivision" section in the cga reference.  You can also use labeled occlusion testing (touches, inside, overlaps) to see if a shape occludes another shape.  But, without knowing where exactly the street shape or obstacle shape are, it will be hard to know exactly where you need to split your shapes in order to avoid the street or obstacle and align to them.

I can't think of a solution for you, but maybe someone else has an idea.

0 Kudos
DevinLavigne
Occasional Contributor III

Thanks Cheryl Lau‌ ,Brita Austin‌ happy to help out if you need it. 


What I've learned working in CityEngine is that our built environment is diverse and even when I think I have a cga rule that I can reuse from project to project its not the case, and almost always needs to be calibrated or rewritten to fit the unique site/city/or project.

Feel free to contact me - dlavigne@hlplanning.com

0 Kudos