Consider a simple example based on two 2-dimensional coordinate
systems. Suppose that to convert from one to the other we must swap
the coordinate order and multiply both coordinates by 5, so that the
coordinates () transform into (
). This can be done
in two stages:
The PermMap and ZoomMap are then said to operate in series, because they are applied sequentially (c.f. Figure 2). We can create a CmpMapCmpMap that applies these Mappings in series as follows:
Here, the third argument (1) of the constructor function astCmpMapastCmpMap indicates “in series”.
When used to transform coordinates in the forward direction, the resulting CmpMap will apply the first component MappingMapping (the PermMap) and then the second one (the ZoomMap). When transforming in the inverse direction, it will apply the second one (in the inverse direction) and then the first one (also in the inverse direction). In general, although not in this particular example, the order in which the two component Mappings are supplied is significant. Clearly, also, the NoutNout attribute (number of output coordinates) for the first Mapping must equal the NinNin attribute (number of input coordinates) for the second one.