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 in which the water is marked in a dark color (in other words, brightness below 0.5) and the land in a bright color. The obstacle attribute layer can then be selected in the automatic street generation wizard and streets are generated accordingly (in other words, no streets in dark regions).
You can create an obstacle map by clicking Layer > New Map Layer in the main-menu, and choosing Obstacle.
Obstacle layer options
You can modify the following options when you open the Obstacle dialog box:
Obstacle file | Choose an image from your workspace that will be used 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 nonobstacle. 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 any cell value 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. |
Create an 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 the 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.
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.