Hi there,
I'm looking for confirmation on whether the following is currently possible. I'm currently writing a CGA rule for use alongside my ArcGIS Urban scenarios. The rule I'm writing leverages CityEngine functionality to check for and handle conditional zoning regulations that go beyond what is possible directly in Urban. One of the conditions I am exploring is instances where the zoning of an adjacent parcel effects buildable requirements (e.g. an industrial zone might require additional setbacks where a property borders a residential zone).
I understand the principles of how to build logic for this in CityEngine using occlusion queries, but before I can build that logic, I need a way to access the zoning assigned to each parcel via CGA. However, the zoning designation from ArcGIS Urban comes in within this special "Zoning" section of the inspector, rather than as an object attribute:
Is there a way to link the "Zone Type" value within this section to an attribute within my CGA?
I know this would be easy to achieve using Python/by leveraging ArcGIS Pro, but as I am leveraging CGA for other components of this modeling, I would prefer avoiding having to bring in an additional step to the workflow if possible.
Thanks!
I'm excited to see you are leveraging CityEngine functionality to check for and handle conditional zoning regulations.
This example rule for Parcel shapes shows how to work with the ZoneTypeID attribute obtained from in the scene's Zone Boundaries layer:
version "2025.0"
@Order(1)
@Enum(valuesAttr=zoneTypeIDs,restricted=false)
@DisplayName("Zone Type ID")
attr ZoneTypeID = ""
@Hidden
attr zoneTypeIDs = getKeys(zoneTypeTable)
@Order(2)
@DisplayName("Zone Type Label")
attr Zone_Type_Label = getValue( zoneTypeTable, ZoneTypeID, "Label")
@Order(3)
@Color
@DisplayName("Zone Type Color")
attr Zone_Type_Color = getValue( zoneTypeTable, ZoneTypeID, "Color")
@Order(4)
@DisplayName("Zone Type HeightMax")
attr Zone_Type_HeightMax = float(getValue( zoneTypeTable, ZoneTypeID, "HeightMax"))
@Order(0)
@File
@DisplayName("Zone Type Table")
attr Zone_Type_Table = "data/Urban_for_CE_Database_View.csv"
const zoneTypeTable = readStringTable(Zone_Type_Table)
getKeys(table) = transpose(table[1:nRows(table) - 1, 0])
getValue(table, key, columnName) with(
keysColumn := getKeys(table)
rowIndex := findFirst(keysColumn, key) + 1
columnIndex := findFirst(table[0, 0:nColumns(table)], columnName)
) =
case (rowIndex == 0) || (columnIndex == -1): "Error"
else: table[rowIndex, columnIndex]
@StartRule
Parcel -->
print(ZoneTypeID)
print(Zone_Type_Label)
color(Zone_Type_Color)
extrude(Zone_Type_HeightMax)
Unlike the space type info, the zoning info doesn't get added to the project as a CSV when importing a plan form ArcGIS Urban. Here is what you can do to work with the zoning information:
Please Note:
The "EFFECTIVE REGULATIONS" on a parcel are the defined by Zoning + Overlays + Parcel overrides.
Zoning regulation management—ArcGIS Urban | Documentation
ArcGIS Urban integration—ArcGIS CityEngine Resources | Documentation