Aller au contenu principal

Raster Symbolization

In iXGIS, symbols and styles for raster data are key components for map visualization. They convert the original values represented by each cell in a raster dataset, such as elevation, temperature, vegetation index, or land cover type, into readable graphic expressions by defining visual parameters such as colors, patterns, stretch algorithms, and classification methods.

Raster symbolization methods include stretch display, classified display, unique value rendering, and RGB composites. Choose the method based on the raster's data type, such as continuous or discrete values. By configuring color ramps, opacity, value ranges, and NoData handling, you can create diverse and controllable raster visualization effects on the map.

Proper symbol and style configuration improves map appearance and visual hierarchy. It also supports data analysis, pattern recognition, and interpretation of spatial distribution. Raster styles therefore provide important support for map production, spatial modeling, remote sensing imagery interpretation, and thematic analysis.

Symbols and Styles

Stretch Display

Stretch display maps the original range of cell values to a specified color ramp, converting numeric values into colors continuously. This process often uses linear stretching or other statistical transformations, such as standard deviation, logarithmic stretch, or histogram matching, to improve contrast and visual recognition.

For example, if an elevation raster has an original value range of 0-3500 meters, the system can linearly map it to a white-to-green-to-brown gradient color ramp. Higher elevations are shown in deeper brown, while lower elevations are shown in light colors or green, producing a gradual terrain visualization.

Stretch display is suitable for raster data with continuous numeric distributions, such as digital elevation models (DEMs), land surface temperature, precipitation, vegetation indexes such as NDVI, and pollution concentration.

Minimum-Maximum

Principle: This method stretches cell values across the full 0-255 display range, significantly improving overall image brightness and contrast. However, it is sensitive to outliers. If extreme minimum or maximum values exist, most data may be compressed into the middle of the color ramp, resulting in insufficient contrast.

Mapping calculation:

  • Mapping data range: minimum value = actual minimum value; maximum value = actual maximum value.
  • Mapped value = (pixel value - minimum value) / mapping data range * 255.

Special behavior: When using the Minimum-Maximum stretch, you can modify the maximum value, minimum value, and the correspondence between each color and numeric value. This helps apply unified rendering to multiple raster datasets with different value ranges.

Use cases: Use this method when data is evenly distributed and has no significant extreme values. It is simple and efficient, and is suitable for rendering most common continuous data.

Standard Deviations

Principle: This method uses the mean of image cell values as the center and maps values to a color ramp based on a specified standard deviation range, such as +/- 2 SD. Values outside the specified range are clipped to the boundary colors.

Mapping calculation:

  • For n standard deviations: mapping data range = 2n * standard deviation; minimum value = mean - n * standard deviation; maximum value = mean + n * standard deviation.
  • Mapped value = (pixel value - minimum value) / mapping data range * 255.
  • Values greater than the maximum are set to the maximum; values less than the minimum are set to the minimum.
  • The default value of n is 2.5.

Use cases: Use this method when data is close to a normal distribution and contains some extreme values that should not dominate the overall color expression. It enhances contrast in the main value range and weakens the influence of extreme values.

The number of standard deviations defines how far values extend above and below the mean for the stretch range used in the imagery.

For example, assume a band has a mean cell value of 100, a standard deviation of 20, and the number of standard deviations is set to 2.

The stretch range is 100 - 2 x 20 = 60 to 100 + 2 x 20 = 140. Only cell values from 60 to 140 are linearly stretched to the display range, such as 0-255. Values below 60 are set to 0, and values above 140 are set to 255, or clipped to the upper and lower limits.

Notes: This method is not suitable for skewed or multimodal distributions. It requires calculating the mean and standard deviation.

You can use chart statistics to view standard deviation values, value distributions, and related information for raster data.

Percent Clip

Principle: Percent stretch is similar to standard deviation stretch because it discards extreme tails before stretching. The difference is that you directly specify the clipping percentage instead of relying on a data distribution model. For example, if 2% is specified at both ends, iXGIS determines the value threshold for the lowest 2% and highest 2% of cell values from the histogram. Values below the lower threshold are mapped to 0, values above the upper threshold are mapped to 255, and the remaining values are linearly stretched. For example, if the original value range is 33-206, the lowest 2% of cells are concentrated from 33-45, and the highest 2% are concentrated from 198-206, values <= 45 are treated as the darkest value 0, values >= 198 are treated as the brightest value 255, and the main value range between them is linearly redistributed to 0-255.

After clipping, the lowest and highest 2% of cells are excluded. This prevents a few outliers from compressing the contrast of the main data range.

Percent Clip is still a linear stretch. It only uses a different method to determine the lower and upper stretch limits.

Mapping calculation:

Mapping data range: after removing the specified low-value percentage pmin%p_{\min}\%, use the minimum value of the current bucket range as MinCut. After removing the specified high-value percentage pmax%p_{\max}\%, use the maximum value of the current bucket range as MaxCut. The interval [MinCut,MaxCut][{\rm MinCut},{\rm MaxCut}] is linearly stretched to the output range, commonly 0-255 for 8-bit display. Values outside the interval are clipped to the endpoints.

Mapping_Value=(xMinCutMaxCutMinCut)255{\rm Mapping\_Value}=\Big(\frac{x-{\rm MinCut}}{{\rm MaxCut}-{\rm MinCut}}\Big) *255

Use cases: Use this method when the data contains a small number of extreme outliers. It preserves the main data distribution and improves detail contrast.

Example: A remote sensing imagery dataset has reflectance values from 0-10000, with most values concentrated from 1000-3000:

  • Values below the minimum percentile are mapped to the lightest color.
  • Values above the maximum percentile are mapped to the darkest color.
  • All remaining values are linearly stretched.

Notes: Excessive clipping can cause information loss. Determine clipping thresholds based on the histogram to avoid removing important data.

Histogram Equalization

Histogram Equalized filling refers to Histogram Equalization Stretch. This image processing technique improves global image contrast, especially when pixel values are unevenly distributed in the color space. Histogram equalization expands common brightness ranges so that brightness is more evenly distributed across the whole image.

How histogram equalization stretch works:

  1. Histogram calculation: First, calculate the histogram of the raster data. A histogram is a statistical chart that shows the distribution of pixel values or data values. Each bin or bar represents the number of pixels in the dataset with a specific pixel value.
  2. Cumulative distribution function (CDF): Next, calculate the CDF based on the original histogram. The CDF maps each pixel value to a cumulative probability, indicating the proportion of pixels with values less than or equal to that value.
  3. New pixel value mapping: Then, use the CDF to map original pixel values to new pixel values with an approximately uniform distribution. Pixel values that were previously concentrated in a certain brightness range are mapped across the full possible brightness range, increasing image contrast.
  4. Apply the new mapping: Finally, reassign the pixel value of each pixel in the original image based on the CDF-generated mapping to produce a new image with pixel values more evenly distributed across the possible output range.

Under normal conditions, some parts of an image may be too bright or too dark, indicating insufficient contrast. Histogram equalization can improve overall image contrast and make image details clearer.

Advantages:

  • Clearly presents the spatial distribution and gradient changes of continuous variables.
  • Provides natural color transitions that make high values, low values, and transition areas easy to identify.
  • Suitable for expressing natural phenomena such as terrain relief, concentration distribution, and temperature variation.

Limitations:

  • Colors have no universal quantitative meaning. The same color may represent different value ranges in different layers, so it does not provide standardized quantitative expression.
  • Extreme values have a strong influence. Abnormally high or low values may compress the display effect of the main value range, so statistical stretch methods may be needed.
  • It is not suitable for classified or discrete data. Data such as land use types and soil types are better displayed with classified or unique value rendering.

Classified Display

Applicable data: Classified display is suitable for raster data with discrete attributes or explicit classification semantics. Each cell represents a predefined category, grade, or state. Common examples include land cover types such as forest, grassland, and water, soil types, land use functional zones, and administrative area codes.

Principle: Classified display divides cell values into several non-overlapping intervals or unique value categories and assigns a unique symbol, usually a color, pattern, or fill style, to each category. Each category is symbolized with clearly differentiated colors or styles to improve map distinction and readability.

Equal Interval

Principle: The data value range, from minimum to maximum, is evenly divided into a specified number of intervals. Each interval has the same width, regardless of the data distribution.

Use cases: Use this method when data is relatively evenly distributed, or when a fixed interval is required for representation, such as elevation or temperature.

Example: Elevation data ranges from 0-1000 meters and is divided into 5 classes: 0-200, 200-400, 400-600, 600-800, and 800-1000. Each class interval is 200.

Advantages: The classification rule is simple and easy to understand. Consistent interval widths support standardized map production.

Disadvantages: This method is not suitable for skewed distributions or data with many extreme values. Some classes may contain very few cells while others contain too many.

Quantile

Principle: After sorting the data, this method divides it into classes with approximately equal counts. Each class contains roughly the same number of cells or records, but interval widths may differ.

Use cases: Use this method when you need to display data distribution evenly on the map, when a thematic map focuses on spatial proportion or distribution density, or when visualizing resource distribution, population density, market levels, and similar data.

Example: A raster contains 10,000 cells and is divided into 5 classes. Each class contains about 2,500 cells, and class break values are calculated by the program based on the classification.

Advantages: Classes are visually balanced on the map and less likely to let one class dominate the display. This helps compare spatial distribution density or regional differences.

Disadvantages: If some values occur frequently in the dataset, image classes may not be visually distinct. Adjacent classes may also have very small value range differences, making visual transitions unclear.

Natural Breaks

Principle: This method uses the natural distribution characteristics of the data. It minimizes variance within classes and maximizes differences between classes, using a statistical optimization algorithm to automatically find the best break points.

Use cases: Use this method when data is unevenly distributed or has obvious clustering patterns. It emphasizes natural grouping and spatial pattern recognition, and is commonly used for thematic maps, geoscience models, and socioeconomic data maps.

Break point selection steps:

  1. Sort data: Sort the original data from low to high.
  2. Initialize class division: Specify the number of classes, such as 5.
  3. Dynamic programming search: Traverse all possible combinations of break points and calculate the within-class sum of squares (WSS) for each combination.
  4. Select the optimal solution: Choose the set of break points that produces the smallest total within-class variance. These are the natural breaks.

These break points are not manually defined equal-distance or uniform values. They are grouping boundaries that naturally exist in the data distribution, such as the separation between dense value areas and sparse areas.

Example:

Dataset: [3, 4, 4, 5, 6, 7, 15, 16, 17, 25, 26, 30, 45, 48]

If the data is divided into 3 classes, the system may select the following breaks:

  • Class 1: 3-7, dense low values.
  • Class 2: 15-26, clustered middle values.
  • Class 3: 30-48, dispersed high values.

This division follows the clustering structure of the data instead of forcing equal intervals or equal counts.

Advantages: Classification results better match the data characteristics, emphasize internal consistency and external differences between classes, and improve the authenticity of spatial pattern expression.

Disadvantages: Classification intervals are irregular and difficult to reuse across multiple datasets. This method is not suitable for unified comparison across layers or time periods, and the classification process is less transparent and harder to control manually.

Standard Deviation

Principle: This method uses the data mean as the center and divides intervals by multiples of standard deviation, such as +/- 1 sigma and +/- 2 sigma. It emphasizes how much values deviate from the mean. Common intervals include less than -2 sigma, -2 sigma to -1 sigma, -1 sigma to the mean, the mean to +1 sigma, +1 sigma to +2 sigma, and greater than +2 sigma.

Use cases: Use this method when data is approximately normally distributed, when analyzing deviation from the mean, such as standardized evaluation or outlier analysis, or for spatial visualization of socioeconomic and statistical indicators, such as income or incidence rate.

Example: For income data with a mean of 5,000 and a standard deviation of 1,000, classes may be < 3,000, 3,000-4,000, 4,000-5,000, 5,000-6,000, 6,000-7,000, and > 7,000.

Advantages: This method emphasizes areas above or below the average, helps identify abnormal areas with extremely high or low values, and can be used for standardized map rendering.

Disadvantages: It is not suitable for non-normal data. Extreme values may make classification boundaries too wide.

Advantages:

  • Clearly represents each classified object and is suitable for thematic maps.
  • Provides a clear visual effect and supports comparison of the spatial distribution of different categories.
  • Supports automatic legend generation, with intuitive and readable symbol meanings.
  • Can be linked with charts and tables for quantitative analysis.

Limitations:

  • Because class boundaries are explicit, category jumps in the image are obvious and transitions are limited. It is not suitable for natural phenomena with continuous variation, such as temperature or elevation.
  • The classification method strongly affects the result. Improper manual classification can cause misunderstanding or distortion.
  • Too many classes may cause repeated or confusing symbols and reduce visualization quality.

Unique Value Display

Principle:

In unique value display, the system identifies every unique cell value in the raster data and assigns an independent color, pattern, or symbol to each value. The rendering process does not involve numeric calculation or statistical division. It is based entirely on the discreteness and uniqueness of values.

Applicable data: Unique value display is suitable for raster data with clear discrete classification meaning, where each value in the value range represents a specific category. Each cell value has an independent semantic label, such as:

  • Administrative division codes, such as city, county, or township codes.
  • Land use type codes, such as 1 = cultivated land, 2 = forest land, and 3 = residential area.
  • Remote sensing classification results, such as land cover classes after supervised classification.
  • Numbered thematic data, such as geological structural units, soil types, and ecological zones.

Characteristics:

  • Each category corresponds to a unique visual symbol.
  • The classification structure is clear and the legend is intuitive.
  • Layer legends, legend numbers, and color annotations can be synchronized automatically.
  • Image expression requires almost no explanation for users, making it suitable for public display, reporting, and map output.

Advantages:

AdvantageDescription
Clear classificationCategory boundaries are clear and easy to identify.
Clear semanticsEach color directly corresponds to a unique category and is intuitively readable.
Map-production friendlySupports legend generation, color annotations, map printing, and explanations.
Stable and controllableThe same value is always mapped to the same color, making it suitable for multi-period comparison or layer overlay.

In iXGIS, the number of unique values is configurable. The default is 1,000, and you can increase it to display more unique values.

RGB Composite

Applicable data: RGB composites are suitable for multiband remote sensing imagery data with multiple spectral bands, such as:

  • Satellite imagery, such as Landsat, Sentinel-2, and MODIS.
  • Aerial photography imagery, such as multispectral aerial photography.
  • UAV multispectral imagery.

These imagery datasets usually contain multiple bands. Each band records the reflectance or radiance of ground objects in a specific electromagnetic band. RGB composite selects three bands and maps them to the red (R), green (G), and blue (B) color channels to visualize a color image.

Principle:

RGB composite uses human perception of red, green, and blue. It maps three selected bands to the R/G/B channels and presents a composite image through color mixing.

  • True color: Maps the red, green, and blue visible-light bands, usually Band 3/2/1 or 4/3/2, to the RGB channels. The result is close to natural scenery as seen by the human eye.
  • False color: Maps non-visible bands, such as near-infrared or short-wave infrared, to visible channels to enhance certain ground object features, such as vegetation, water bodies, and urban areas.

Advantages:

AdvantageDescription
Realistic or enhanced colorsReproduces natural scenery or highlights specific ground object features.
Strong adaptabilityDifferent band combinations can meet different analysis needs.
Supports remote sensing interpretationHelps identify vegetation, water bodies, farmland, cities, clouds, and other ground object types.
Supports change detectionRGB composites of multitemporal imagery make it easier to analyze ground object changes, such as urban expansion or forest degradation.

Limitations:

LimitationDescription
Requires band expertiseBand order and meaning differ greatly across remote sensing sources, so combinations require knowledge of spectral characteristics.
Not quantitativeRGB composite is mainly for visualization and is difficult to use directly for quantitative analysis, such as classification or calculation.
Same color may mean different thingsUnder different band combinations, the same color may represent completely different ground object types.
Color mixing may occurIf bands are selected improperly, ground object boundaries may become blurred and colors may look unnatural.

Hillshade

Hillshade, also called terrain shading or shaded relief, is a common terrain visualization technique in GIS. It simulates light and shadow effects on terrain based on a digital elevation model (DEM), making terrain relief more intuitive.

Parameter Overview

LightDirection (sun azimuth) and ZenithAngle (sun altitude)

Together, these parameters determine the light direction vector LL.

Light vector components:

L=(sinAzcosZ,cosAzcosZ,sinZ)L = (\sin A_z \cos Z, \cos A_z \cos Z, \sin Z)
  • LightDirection (Azimuth): Controls the direction from which light comes, such as northwest 315 deg or east 90 deg.
  • ZenithAngle (Altitude): Controls the angle between light and the ground, where 0 deg is the horizon and 90 deg is overhead.

Corresponding effects:

  • Azimuth changes the shadow direction.
  • Altitude changes shadow length and the strength of the three-dimensional effect.

AmbientIntensity and LightIntensity

Together, these parameters define the brightness components of the lighting equation.

Basic form, using the Lambert lighting model:

I=NL×LightIntensity+AmbientIntensityI = N \cdot L \times \text{LightIntensity} + \text{AmbientIntensity}
  • AmbientIntensity: Non-directional soft light that prevents backlit areas from becoming completely black.
  • LightIntensity: Directional direct light that controls light-dark contrast.

ElevationFactor (elevation-to-horizontal conversion factor)

The elevation unit of a DEM, the Z axis, may differ from the horizontal coordinate units, the X/Y axes. This is especially common for DEMs in longitude and latitude.

  • If coordinates are longitude and latitude in degrees, elevation in meters must be converted to an angular scale.
  • If coordinates use meters, such as UTM or Web Mercator, the value can be set to 1.

This keeps the geometric proportion of terrain slope correct when calculating normal vectors. Otherwise, terrain may appear flattened or overly exaggerated.


Extrusion

This is a visual exaggeration factor for Z values, used to emphasize terrain relief.

When calculating normal vectors, Z values are multiplied by:

Z=Z×ElevationFactor×ExtrusionZ' = Z \times \text{ElevationFactor} \times \text{Extrusion}

Effects:

  • For small-scale DEMs with coarse resolution, increase the value moderately, such as 5-8, to enhance the three-dimensional effect.
  • For high-resolution DEMs, such as 10 m DEMs, use 1-2.

Parameter Summary

ParameterCommon valuesMechanismAdjustment effects and suggestions
LightDirection0-360, default 315 deg = northwestSun azimuth. Determines the direction from which light comes and controls shadow direction.Morning effect: 90 deg, east. Midday, slightly south: 180 deg. Common northwest light that highlights south-facing slopes: 315 deg.
ZenithAngle0-90, default 45 degSun altitude in degrees, where 0 = horizon and 90 = overhead.Low angle, 10 deg: longer shadows and stronger three-dimensional effect, but valleys may become too dark. High angle, 60 deg or above: shorter shadows, softer effect, and fewer stacked shadows.
LightIntensity0-1, default 0.7-1.0Direct light intensity, the coefficient of the Lambert term. Higher values create stronger light-dark contrast.The ratio to AmbientIntensity matters most. In general, LightIntensity + AmbientIntensity is approximately 1. To highlight ridges, increase LightIntensity to 1.2 and reduce AmbientIntensity as needed.
AmbientIntensity0-1, default 0.6-0.9Ambient light intensity. Adds soft light that exists everywhere in the Lambert lighting model.Increase it to reveal shadow detail and prevent backlit areas from becoming fully black. Too high: shadows become gray and the three-dimensional effect weakens. Too low: contrast becomes too strong and details are lost. For sunset side lighting, set AmbientIntensity lower, around 0.3.
ElevationFactorDepends on the coordinate system. Longitude/latitude DEM: 1 / (Earth circumference x degrees), approximately 1/(111 km). Projected coordinates using the same unit: 1.Conversion factor that converts Z elevation to the same dimension as X/Y, preventing scale distortion in the 3D cross product.If DEM units are meters and the coordinate system is Web Mercator or UTM meters, set it to 1. If coordinates are longitude/latitude in degrees and elevation is in meters, multiply by about 0.000009, where 1 m is approximately 9e-6 deg.
Extrusion0-10, default 1-5Exaggeration factor multiplied by ElevationFactor to exaggerate terrain relief.Higher values make peaks sharper and valleys deeper. 0 indicates completely flat shading. Large-scale 10 m DEMs usually use 1-2, while small-scale 90 m DEMs can use 5-8.

Four Preset Effects

For ease of use, iXGIS provides four preset modes.

PresetSun azimuthLight source altitude (deg)Direct light intensityAmbient light intensityExtrusionApplicable scenarios and visual effects
Morning light90 deg, due east20-30 deg0.850.42Long shadows and strong contrast, emphasizing shadows cast to the west side of ridges. Suitable for highlighting a morning-light atmosphere.
Noon180 deg, due south70-80 deg0.60.551.5Shortest shadows and a soft three-dimensional effect. Suitable as a basemap when overlaid layers should remain visually dominant.
Sunset270 deg, due west15-25 deg0.90.352Symmetric with morning light but in the opposite direction. Produces warm sunset tones and long shadows extending to the east side of valleys.
Night light, moonlight or low light315 deg, northwest60 deg0.30.71.5Almost no strong direct light. High ambient light creates a soft dark tone. Suitable for dark basemaps or night-view modes.

Raster Data Appearance

Select raster data and use the Raster tab toolbar to adjust its appearance. Available options include resampling type, opacity, brightness, contrast, Gamma, and display quality.

Resampling Type

Two resampling types are available:

  • Nearest neighbor interpolation for discrete data: Each pixel uses the nearest raster value. This is suitable for classified or discrete data and does not change original data values.
  • Linear interpolation for continuous data: Values in the scaled image are estimated through linear interpolation. This is suitable for continuous data.

Appearance Adjustment

You can adjust raster appearance with parameters such as opacity and brightness. These parameters dynamically change the visualization of the raster image without affecting the original data. They only apply to the display layer.

Opacity: Controls how much the layer covers the basemap or other layers.

  • Value range: Usually 0%, fully transparent, to 100%, fully opaque.
  • Explanation: Sets the alpha channel value to blend pixels between layers. For example, when opacity is 50%, the basemap and the raster layer are each partially visible. This is suitable for overlaying NDVI with imagery.
  • Examples:
  • Set hillshade opacity to 50% and blend it with satellite imagery.
  • Overlay NDVI semi-transparently on orthophotos to keep the background readable.

Brightness: Increases or decreases the overall brightness of the image, making imagery brighter or darker.

  • Value range: Usually -100 to +100. The default value in this interface is 0.
  • Explanation: Brightness adjustment linearly increases or decreases the displayed cell values, also known as DN values, without changing the original data. For example, if the DN range is 0-255, brightening may change the display range to 20-275, with the display upper limit clipped to 255.
  • Note: Brightness adjustment may cause image saturation, such as loss of highlight or shadow detail.

Contrast: Enhances or weakens the difference between light and dark pixels in the image, highlighting textures and structures.

  • Value range: Usually -100 to +100. The default value is 0.
  • Explanation: Contrast enhancement stretches cell values to a wider or narrower dynamic range. For example, values near the middle gray level may be compressed while high and low values are stretched, making ground object boundaries clearer.
  • Use cases:
  • Highlight mountain outlines or vegetation changes in low-contrast images.
  • Use high contrast for printed images to improve clarity.

Gamma correction: Adjusts the nonlinear distribution of image grayscale so that more details appear in highlight or shadow areas.

  • Value range: Usually 0.1-10, with a default of 1, which is linear.
  • Explanation:
  • Gamma > 1: Makes the image darker and is suitable for enhancing details in bright areas.
  • Gamma < 1: Makes the image brighter and enhances details in shadow areas.
  • Notes:
  • Gamma is not a linear change, so contrast and brightness are not controlled proportionally.
  • Improper settings may cause color shift or distortion.

Display quality: Controls the trade-off between display precision and performance consumption during image rendering.

  • Options: Usually includes levels such as Standard, Medium, and Coarse.
  • Standard: Default value, suitable for daily browsing.
  • Medium: Balances quality and performance.
  • Coarse: Sacrifices details for faster loading.