RenderStyle

Description

RenderStyle enhances the display of a raster by applying color palettes and various transformation methods. Different types of render styles have different components. The LUTColor render style can also have Hillshade properties, which can be used to obtain hypothetical illumination of a surface by determining the illumination values.
Note: The RenderStyle can be used only for MRRs.

Context

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

Table 1. Context
Contained by Element Contains

GridStyle

RenderStyle

Attributes

Table 2 lists the attributes of a RenderStyle element.
Table 2. Attributes
Attributes Description
type Represents different types of render styles. There are three types of renderstyles:
  1. LUTColor: It can be used for Continuous or Imagery MRRs.
  2. Image: It can be used for Classified or Image Palette MRRs.
  3. RGB: It can be used for Imagery MRRs.
    Note: This attribute is required.
underviewInterpolation Represents different type of interpolation methods. When underviewInterpolation is used, the raster images maintain a smooth and high quality appearance even if you zoom in beyond the resolution of the individual pixels. There are five types of interpolations:
  1. None: It behaves the same as that of Nearest interpolation method.
  2. Nearest: It calculates the value of each cell by performing a nearest neighbor assignment. This is the most basic technique that requires the least processing time of all the interpolation algorithms. This technique selects the nearest pixels to replace the original pixels when images are zoomed in.
  3. Bilinear: It considers the closest 2x2 neighborhood and calculates the new value of a cell based on a weighted distance average of the four nearest input cells. It provides smoother appearing images than the Nearest neighbor. Use this method for continuous data.
  4. Cubic (Local): It considers the closest 4x4 neighborhood and calculates the new value of a cell based on fitting a smooth curve through the 16 closest input cells. It requires more processing time. Use this method for continuous data.
  5. Cubic (Global): It considers the closest 4x4 neighborhood and calculates the new value of a cell based on fitting a smooth curve through the 16 closest input cells. It requires more processing time. Use this method for continuous data.
enableAlpha

Alpha is enabled (set as true) by default for MRR with RGBA. If there are invalid (null or non-existent) cells in the MRR with RGB band, then it is rendered as transparent for those invalid cells with alpha set to 0.

To disable Alpha, set enableAlpha to “false”.

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" enableAlpha="true">
         <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>