Component

Description

Component represents the basic properties of render style like field and band to render, type of component based on type of render style, and color transformation options to be used.
Note: The Component can be used only for MRRs.

Context

Table 1 lists the elements that can contain, or be contained by, a Component element.

Table 1. Context
Contained by Element Contains

RenderStyle

Component

ColorTable: ColorTable is the color look up table used to apply color to the raster.

Attributes

Table 2 lists the attributes of a Component element.
Table 2. Attributes
Attributes Description
type
Represents different types of components. There are five types of components:
  1. Red: RGB render style should have this component.
  2. Green: RGB render style should have this component.
  3. Blue: RGB render style should have this component.
  4. Color: LUTColor render style should have this component.
  5. Image: Image render style should have this component
    Note: This attribute is required.
field
Represents the field to be rendered when the raster file has multiple fields.
Note: This attribute is required.
band Represents the band to be rendered when the raster file has multiple bands.
Note: This attribute is required.
dataTransform

Represents the color transformation option used to change the input raster's quality of display and improve its contrast.

Note: There must be a DataTransform element in the DataTransformList which has the same name as that of the value of this attribute.
Note: This attribute is required.

Example

This example specifies a grid image style that contains a RenderStyle of type LUTColor, a Custom DataTransform having a collection of six color breaks, and a collection of three grid inflection points.

<?xml version="1.0" encoding="UTF-8"?>
<NamedStyle xmlns="http://www.mapinfo.com/mxp" version="MXP_WorkSpace_1_5">
   <GridStyle id="migridstyle" name="migridstyle" contrast="0.5" brightness="0.5" opacity="1" grayscale="false" show-hillshade="false" null-color="black" null-transparent="true">
      <RenderStyle type="LUTColor" underviewInterpolation="None">
         <Component type="color" field="0" band="1" dataTransform="MapInfoDataTransform">
            <ColorTable>Pseudocolor.lut</ColorTable>
         </Component>
         <Hillshade>
            <SunShadow enable="True" />
            <Highlight enable="True" />
         </Hillshade>
      </RenderStyle>
      <DataTransformList>
         <DataTransform type="Custom" name="MapInfoDataTransform">
            <ColorBreaksList>
               <ColorBreak value="-182.586959838867" color="#0000ff" />
               <ColorBreak value="57420.302986145" color="#1919ff" />
               <ColorBreak value="115023.192932129" color="#5e5eff" />
               <ColorBreak value="172626.082878113" color="#eeeeff" />
               <ColorBreak value="230228.972824097" color="#7f7f7f" />
               <ColorBreak value="287831.862770081" color="#a5a5a5" />
            </ColorBreaksList>
         </DataTransform>
      </DataTransformList>
      <GridInflectionList>
         <GridInflection value="0.4" color="yellow" />
         <GridInflection value="0.5" color="green" />
         <GridInflection value="0.6" color="blue" />
      </GridInflectionList>
   </GridStyle>
</NamedStyle>