The obstacle map defines a Boolean attribute that guides the creation of street networks.
Obstacle map
A common usage of the obstacle map is to create a land-water map where the water is marked in a dark color (i.e. brightness below 0.5) and the land in bright color. The obstacle attribute layer can then be selected in the automatic street generation wizard and streets are generated accordingly (i.e. no streets in dark regions).
You can create an obstacle map by clicking Layer > New Map Layer in the main-menu, and choose Obstacle.
Obstacle Layer options
You can modify the following options when you open the Obstacle dialog:
Obstacle file | Choose an image from your workspace which will be used to as the obstacle in your scene. |
Channel | Choose the source channel from the image that is used to read the data for the elevation. For most images brightness is the best choice. |
Obstacle Threshold | The Obstacle Threshold defines the image brightness, which distinguishes between obstacle and non obstacle.For example, if you set the Obstacle Threshold to 0.5 in the brightness channel, any cell value below 0.5 is considered dark and above is bright and part of the obstacle. |
Bounds Dimensions | The Width and Height of the resulting texture in meters. When a georeferenced image is selected, this value is set automatically. |
Bounds Location | The location of the resulting texture in meters. When a georeferenced image is selected, this value is set automatically. Note:The button right of Location can be used to change the reference point of the obstacle's position. |
Obstacle layer in a CityEngine scene
After the obstacle type has been selected in the wizard the obstacle attribute layer can be created as follows:
- Browse your project and select the image map.
Note:
Only image maps in the workspace can be selected. Therefore the image has to be copied or imported into corresponding project folder (typically maps).
- Select the source channel and the corresponding threshold. Values below the threshold are interpreted as obstacles.
- Set the dimensions and location of the attribute layer in the scene.
- Click Finish.
As a result an obstacle attribute layer is selected where the channel threshold function is represented as a function returning a boolean function. This function and all other attribute layer properties can still be edited after creation.
Note:
All attribute layer functions that evaluate a boolean value such as the obstacle layer can also be used for selecting objects in the scene by using the Select > Select by Map Layer menu. See also Selection with Image Maps.