How to change the domain of a map

This topic contains five sections to change the domain of a map:

  1. From system domain Value to a user-defined value domain
  2. From the Image domain to system domain Byte or to system domain Value
  3. From a Class domain to an ID domain or vice versa
  4. From a Picture domain to a Class domain
  5. From a Class or ID domain to another Class, ID, or to a value domain
  6. From a Class, ID or Value domain to the Color domain
  7. From the Color domain to the Image domain

1. From system domain Value to a user-defined value domain:

When a map uses system domain Value and when for instance in the map's Display Options dialog box you create a new representation for this domain, you can choose in the Create Representation dialog box whether a representation value or a representation gradual should be created.

 

A representation value shows boundary values in values. Advised for final maps, when you want to assign specific ranges of colors to specific ranges of values.
To create your own representation value for system domain Value:

A representation gradual shows boundary values in percentages. This may be fine for intermediate calculation results. All value maps can be displayed with a representation gradual; all system representations are representations gradual.
To create your own representation gradual for system domain Value:

However, when the values you are using refer to the same kind of values, with a specific meaning, are always in a certain range, and when these values should be represented by 'standard' colors, it is advised to create a user-defined value domain.

Subsequently, you can create your own representation value for your value domain, and edit your own default colors in this representation value. Then you can use your value domain with your default colors for all maps for which it is applicable.

To convert a map (e.g. Map1) with system domain Value to another map (e.g. Map2) with a user-defined value domain:

To create a user-defined representation value for your map (Map2) with the user-defined value domain:

2. From domain Image to system domain Byte or to system domain Value:

To convert a map with system domain Image (values 0-255, no undefs):

Use a very simple MapCalc statement; type on the command line something like:

mapval = mapimg

where mapimg is the name of your image and mapval is the name of the output map.

In the Raster Map Definition dialog box that follows directly after you typed the statement:

3. From a Class domain to an ID domain or vice versa:

In some cases you may want to change from classes to IDs or vice versa.

Mind:

When converting classes to IDs, you should keep in mind that an ID domain does not use a representation.

4. From a Picture domain to a class domain:

After import, you may find that a raster map has a Picture domain. The colors of the map seem OK but when you want to perform calculations with this map, it is strongly advised to first convert the domain of the map from a Picture domain to a Class domain.

The domain will contain as many classes as you had colors before. The classes will obtain default class names, like Class1, Class2, etc. In the domain Class/ID editor, you can change these default class names. The colors of the Picture domain will now be available in the representation of the Class domain.

5. From a Class or ID domain to another Class, or ID domain or to a value domain:

In short, you have to add a column with the correct domain to an attribute table of the original map and then you have to create an attribute map of the original map.

When your original map does not have an attribute table yet:

When your original map already has an attribute table:

For more information, see the Attribute map of raster map, Attribute map of polygon map, Attribute map of segment map, Attribute map of point map.

6. From a Class, ID, or Value domain to the Color domain:

To convert a raster map with a Class, ID or Value domain to system domain Color, type on the command line of the Main window:

OUTMAP = MAPCOLOR(InputMap)

To convert possible undefined values to color white, type subsequently on the command line of the Main window:

OUTMAP2 = IfUndef(InputMap, COLOR(255,255,255), OUTMAP)

If you like, you can of course combine these formulae into one formula:

OUTMAPCOL = IfUndef(InputMap, COLOR(255,255,255), MapColor(InputMap))

For more information on the MAPCOLOR or the COLOR functions, refer to Color functions.

7. From the Color domain to the Image domain:

When you have two scanned colored images with overlap and when you wish to show these as an anaglyph, you first have to transform the Color maps to maps which use the Image domain. You can use the Color Separation operation with the Intensity option to obtain maps with the Image domain.

 

The output raster map will be default use system domain Image.

Repeat these steps for the other scanned colored image.

 

Tip: Instead of using the Color Separation operation, you can also use the CLRINTENS function in a Map calculation formula, as in:

 

OUTMAP = CLRINTENS(InputMap)

 

where the input map must use the Color domain.

See also: