Selection with image maps

If you need to work with selections depending on an Map Layer or a map, simply define a boolean attribute for the selection that you require.

Using the terrain for selection

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

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

You want to select all elements that have an elevation of 10 meters or higher. Simply add a new attribute that evaluates to true when elevation is bigger 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
Note:

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 any objects this leads to nothing being selected.

Use a landuse map for selection

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

Landuse map in red, blue and green
Landuse map in red, blue and green
Landuse map placed in the scene
Landuse map placed in the scene

After adding a new Map Layer with the landuse map, three new boolean attributes are defined in the Inspector view of the new layer. Depending on the color of the map, landuse types are evaluated.

attr industrial = green > 0.8\
attr retail = red > 0.8
attr residential = blue > 0.8
Landuse types defined by Map layer
Landuse types defined by Map layer

Selection using the u,v coordinates of a Map Layer

For the following landuse attribute definition,

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

just 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