Select to view content in your preferred language

ArcGIS Urban Parcels in CityEngine - Accessing zoning code as attribute in CGA

198
2
10-10-2025 08:50 AM
RidleySoudack
Esri Contributor

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:

RidleySoudack_0-1760111196662.png

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!

0 Kudos
2 Replies
ThomasFuchs
Esri Regular Contributor

Hi @RidleySoudack 

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:

  1. Find the ArcGIS Urban Database View of your plan in the portal contents. It contains a table named ZoneTypes
    ThomasFuchs_0-1760539452591.png

     

  2. Export this ZoneTypes table to a CSV file and then download it
    ThomasFuchs_1-1760539532443.png
  3. Inside CityEngine, add the ZoneTypes CSV file to your project's data folder
    ThomasFuchs_4-1760542154472.png
  4. Now you can connect the rule attribute Zone_Type_Table to the downloaded ZoneTypes CSV file.
    ThomasFuchs_6-1760543009825.png
  5. To get the parcel's Zone Type information, simply connect the rule attribute ZoneTypeID to the matching attribute in the scene's Zone Boundaries layer:
    ThomasFuchs_2-1760540184344.png
  6. The final result should look like this:
    visulalizeZoneType.png
Tags (2)
0 Kudos
ThomasFuchs
Esri Regular Contributor

Please Note:

The "EFFECTIVE REGULATIONS" on a parcel are the defined by Zoning + OverlaysParcel overrides.
Zoning regulation management—ArcGIS Urban | Documentation
ArcGIS Urban integration—ArcGIS CityEngine Resources | Documentation

0 Kudos