Designate Multiple Street Edges

1394
5
08-04-2017 01:37 PM
LesiMai1
New Contributor II

Hi all,

I know I can designate multiple edges as street edges in CityEngine using the Set Street Edges tool. But I'm wondering if I can further distinguish the street edges so that I can have different setbacks depending on the street type the edge is facing. I'm looking for a workflow that can automate this process if possible.

Any pointers are greatly appreciated!

Thank you!

Lesi

0 Kudos
5 Replies
CherylLau
Esri Regular Contributor

When you set some edges of a polygon shape to be street edges (Shapes -> Set Street Edges), then there is an object attribute called streetWidth which contains a list of street widths.  It's just a workaround, but you can change the values in this list (numbers separated by semicolons, and ending with a semicolon).  The list starts with the first edge of the polygon (shown in orange when shape is selected) and goes counterclockwise around the polygon.  Then, you can connect a rule attribute to this object attribute to access the values in the cga code where the setbacks are called.

LesiMai1
New Contributor II

Hi Cheryl,

Thank you for the reply! Calling the streetWidth attribute in cga rules sounds like a good workaround! I'll give it a try and post the results here.

But I have a follow-up question. Our ultimate goal is to export the rule package and use it in Pro and potentially GeoPlanner down the road. Is there a way I can keep the streetWidth attribute when I export the shapes out?

Lesi

0 Kudos
CherylLau
Esri Regular Contributor

I don't know about Pro or GeoPlanner, but you can certainly export object attributes when you export the shapes, for example, to a GDB file.  Make sure that "Export object attributes" is checked in the FileGDB dialog.

Esri FileGeodatabase (FileGDB) Export 

0 Kudos
CherylLau
Esri Regular Contributor

On second thought, when I read your other post, I realized that doing setbacks of different distances according to street width is not that easy, especially when you have lot shapes with rounded corners.  Here is the link to my reply to the other post:

https://community.esri.com/message/717450-select-a-range-of-edge-index?et=watches.email.thread#comme... 

0 Kudos
CherylLau
Esri Regular Contributor

Note that to access the streetWidth object attribute, you can create a rule attribute with a parameter for the index like this:

attr streetWidth(i) = 0

Then, you can access the street width values by specifying the index as the parameter:

print(streetWidth(0))     // print first street width in list