Selection with image maps

If you need to work with selections, depending on a map layer or a map, define a Boolean attribute for the selection that you require.

Use the terrain for a selection

Your terrain layer contains an elevation attribute of a similar form as below:

attr elevation = map_01(brightness, 100, -100)

You want to select all elements that have an elevation of 10 meters or higher. Add a new attribute that evaluates to true when elevation is higher than 10.

attr high = elevation > 10

Boolean attributes in map layers are automatically added to the selection menu. Click Select > Select Objects in Map Layer > terrain: high in the main menu.

The resulting selection is shown in the image below:

Selected objects in Map layer
Selected objects in Map layer

By selecting a layer before selecting objects by map layer, you can select only objects from the selected layer. If you have a layer selected that does not contain objects, this leads to nothing being selected.

Use a land-use map for selection

Land-use types are often used to define certain areas of a scene. The map below defines commercial (red), urban residential (blue), and residential areas.

Land-use map in red, blue, and green
Land-use map in red, blue, and green
Land-use map placed in the scene.
Land-use map placed in the scene.

After adding a new map layer with the land-use map, three new Boolean attributes are defined in the Inspector view of the new layer. Depending on the color of the map, land-use types are evaluated.

attr industrial = green > 0.8
attr retail = red > 0.8
attr residential = blue > 0.8
Land-use types defined by Map layer.
Land-use types defined by Map layer.

Selection using the u,v coordinates of a map layer

For the following land-use attribute definition:

attr landuse =
	case u > 0.5:
		50%: "industrial" 
		else: "retail" 
	else: "residential"

Add the following attributes to the same map layer:

attr isIndustrial = landuse == "industrial"
attr isRetail = landuse == "retail"
attr isResidential = landuse == "residential"

This will give you additional choices in the Select > Sect Objects by Map Layer menu:

  • Landuse: isIndustrial
  • Landuse: isRedential
  • Landuse: isRetail