Drive streetWidth by Rule.. how?

1100
4
08-09-2012 02:48 PM
RobertHexter
New Contributor III
Guys I see that by looking at these:

http://forums.arcgis.com/threads/55547-Accessing-Street-Attributes?highlight=street

http://forums.arcgis.com/threads/52304-Deriving-block-parameters-from-landuse-maps


That the streetWidth can be driven by a map.
I wasn't wanting to have to numerically set the dimension for the streetWidth or paint an image map to control it.

I was wanting to put in a ui :

@Range("Narrow", "Side", "Main", "Highway")
attr myStreetWidth="Main"

and then driven the streetWidth by simply changing this value, and workout and set the road dimensions how can I make this possible?
0 Kudos
4 Replies
RobertHexter
New Contributor III
original post removed to redirect focus on issue
0 Kudos
RobertHexter
New Contributor III
So re-reading your reply here again Matthias:
http://forums.arcgis.com/threads/55547-Accessing-Street-Attributes?highlight=street


important :
Attributes on Start Shapes, such your specific Lot's StreetWidth attributes are constant for the Model since those Attributes are specific INPUTS for CGA to create the Model on this shape.
Once the Model Generation is started, CGA works just with the input it gets.
CGA just executes a series of geometric operations.

Once the Model Generation is started, CGA can not go back and check the environment around the shape and read more info to further process that data in the current Model.
That is currently not possible, but may change with an upcoming release. [same is true with sampled map layer information: it is constant during the Model Generation process.]



Does this also mean that once a generation process starts it can't be interrupted, it has to complete generation and end in a resulting leaf(or error)?

i.e. by the changing of an attribute during the generation process such as streetWidth Attr does it not halt execution and restart the generation? Not that i require this I'm just interested.

What I am not understanding is if I place a list to appear in a UI (@Range) for a shapeNode, for a user to select a streetWidth, for the initialStreetShapeSegment, why the result of this change can not set the attribute on that initialStreetShapeSegment and have it start the regeneration of the initialStreetShape leaf. Yet a map layer can alter this value?

Is there a way to customise per project the attributes and settings on those initialShapes(non user StartShapes)?
0 Kudos
MatthiasBuehler1
Frequent Contributor
Does this also mean that once a generation process starts it can't be interrupted, it has to complete generation and end in a resulting leaf(or error)?
i.e. by the changing of an attribute during the generation process such as streetWidth Attr does it not halt execution and restart the generation? Not that i require this I'm just interested.

yes. but usually this happens so fast that it does not matter. of course it can happen that the attr values are changed during the generation phase, but that's rule defined. the generation process itself just runs until finished.



What I am not understanding is if I place a list to appear in a UI (@Range) for a shapeNode, for a user to select a streetWidth, for the initialStreetShapeSegment, why the result of this change can not set the attribute on that initialStreetShapeSegment and have it start the regeneration of the initialStreetShape leaf. Yet a map layer can alter this value?

Is there a way to customise per project the attributes and settings on those initialShapes(non user StartShapes)?



important :
distinguish a] shape creation from b] model generation.

a]
the 'Dynamic Street Layout' creates street shapes, blocks and their subdivision into Lots, .. basically it creates just 'shapes'. nothing in this process uses CGA.

b]
1 shape and 1 CGA rule produce 1 model.

some of the PARAMETERS of the dynamic street layout's shape creation are passed on to the created shapes. the shapes, e.g. street shapes thus inherit those values as ATTRIBUTES. inherited attributes are written italic.

so CityEngine can map block subdivision parameters and street widths from other sources like map layers ( images ). but anything related to the final 3d model comes afterwards with CGA's attributes ( which can also be mapped of course).

makes sense ?
0 Kudos
DavidWasserman
Occasional Contributor III

I have struggled with this as well. Generally, my way around this was to set the streetWidth attributes in python in GIS then import into CityEngine, but my focus was creating hundreds of cross sections. In a Street Rule, I don't think it is currently possible to have a CGA parameter set a shape parameter (as much as I wish it was possible). In most urban planning use cases it is less annoying because we typically assume we have to keep the ROW constant (so changing sidewalk and street width is a more intentional action). 

If your use case is in entertainment, you could write a python script that reacts to your 'width' attribute by setting the streets to match that width. The python examples for setAttribute provide some good code samples. This however would require running your script in the background or when you want to change all your widths. Not great, but a "solution". 

David Wasserman, AICP
0 Kudos