Raster Pixel Editor
The Pixel Editor is an interactive editing tool for raster data. It lets you manually edit, correct, fill, and enhance individual cells or selected cell regions in a raster layer. The tool is designed for image processing, remote sensing analysis, and map production, and is commonly used for data cleaning, thematic map production, and imagery refinement.
Select a raster layer. On the Raster tab, click Pixel Editor to start pixel editing.
Selection
Select a region before editing its cells.
Drawing Mode
-
New: Draw a new rectangular region when no region has been drawn on the source raster.
-
Add to: Append the newly drawn region to the current selection and merge it with the existing selection. For example, if the drawing mode is Add to, the region type is Rectangle, and the raster already has one rectangular selection, the newly drawn rectangle is merged with the original rectangle into a new polygon.
-
Remove from: Remove the newly drawn region from the existing selection. This applies a difference operation to the current selection. For example, if the drawing mode is Remove from, the region type is Rectangle, and the raster already has one rectangular selection, removing part of it creates a new polygon.
-
Intersect: Keep only the overlapping part between the newly drawn region and the existing selection. All other parts are removed. For example, if the drawing mode is Intersect, the region type is Rectangle, and the raster already has one rectangular selection, drawing another rectangle keeps only the intersection of the two rectangles. If they do not overlap, the result is empty.
Keep Old Region
When enabled, existing regions are kept while you draw a new region. When disabled, drawing a new region clears all previous regions.
Region Color
Set the display color of the drawn region to distinguish different regions or improve visual recognition.
Draw Region
Rectangle: Create a new selection region or modify an existing region by drawing a rectangular extent. Draw two vertices first, then drag to generate the rectangle.
Polygon: Draw a custom polygon boundary to create a selection region or edit the current region extent. Click each polygon vertex in sequence, then double-click to close the boundary and create the polygon.
Lasso: Draw a freehand boundary to flexibly create or adjust a selection region. This is useful for selecting irregular areas.
Circle: Draw a circular region from a specified center point and radius to create or modify a selection region. Select the center point first, then drag the pointer to set the radius.
Feature to region: Select one or more features from an existing feature layer and automatically convert them to selection regions.
Select a feature from vector data in the same coordinate system and convert it to a selection region. You can then use operations such as intersecting or adding the region.
Line segment to region: Select one or more line segments and generate a corresponding selection region based on their extent or buffer.
Selection Options
- Select: Move the pointer over a drawn region and click it to select that region for subsequent operations.
- Zoom: Zoom and pan the map view to the selected region extent.
- Clear: Clear the currently selected region without affecting other regions on the map.
- Visible: Control region visibility. When enabled, the drawn region is visible on the map. When disabled, the region is hidden but retained by the system.
- Remove: Delete the currently selected region from the map.
- Remove all: Clear all drawn regions from the map and return to a state with no regions.
Editing Tools
Apply pixel editing operations to the selected region.
Set Mean Value
Description: Set all cell values in the selected region to the mean cell value of that region.
Use cases:
-
Remove local outliers, such as abnormal elevation points caused by acquisition errors.
-
Smooth terrain areas to generate a more regular surface model.
-
Standardize values in a region for thematic mapping or simulation analysis, such as assigning a uniform soil thickness or water depth.
Steps:
Click Set Mean Value. The data in the selected region is changed to the mean cell value of that region.
Set Constant
Description: Set all pixel values in the selected region to a specified constant value.
Use cases:
-
Build a reference surface, such as assigning a uniform elevation value to a water surface.
-
Simulate a specific condition area, such as land reclamation or a building base elevation.
-
Build a mask region for extracting or excluding a specific area in subsequent analysis.
Steps:
Click Set Constant, enter the value to set, and the cell values in the selected region are changed to the entered constant.
Add To
Description: Add or subtract a value from all pixel values in the selected region. Enter a positive value to add it to each pixel, or enter a negative value to subtract it from each pixel.
Use cases:
-
Raise or lower the overall elevation of a region, for example to simulate terrain changes before or after excavation or filling.
-
Correct a uniform error, such as applying an offset to an entire LiDAR dataset.
-
Simulate environmental changes to values, such as an overall temperature increase or pollutant concentration increase.
Steps:
Click Add To and enter the value to add.
Pixelate
Description: Increase the cell size through resampling to obscure or simplify the selected region.
Use cases:
-
Mosaic sensitive areas, such as military targets or private locations.
-
Simplify image representation, reduce data volume, and improve rendering efficiency.
-
Preprocess remote sensing imagery or maps for stylized display, such as generating an icon-like raster effect.
Parameters:
-
Factor: A positive integer that controls how many original cells are combined into one new cell during pixelation.
Notes:
-
Factor = 1: No pixelation is applied and the original image resolution is retained.
-
Factor = 3: A 3 x 3 group of cells is processed as one larger cell region.
-
Factor = 8: An 8 x 8 region is merged into one supercell.
The larger the factor, the coarser the image and the blurrier the details.
-
-
Sampling mode: Determines how the final value is derived for each merged block, or supercell.
Mode Description Recommended Use Mean Uses the mean value of all cells in the selected region. Smooths the image and is commonly used to remove noise. Minimum Uses the minimum value in the region as output. Provides a conservative estimate and preserves low-value features. Maximum Uses the maximum value in the region as output. Highlights high-value areas, such as high ground or hot spots. Median Uses the middle value after sorting. Robust against outliers and suitable for removing extreme noise.
Blur
Description: Apply a blur operation to pixel values in the region to reduce local detail.
Use cases:
-
Obscure sensitive content, such as vehicles or people in satellite imagery.
-
Smooth high-frequency noise in remote sensing imagery and improve image quality.
-
Preprocess image data for deep learning model input and reduce texture interference.
Parameters:
-
Factor: A positive integer that controls the blur strength or filter window size, that is, how many neighboring cells are referenced when processing each cell.
-
Notes:
-
Factor = 1: The blur is very light and the neighborhood is small.
-
Factor = 3: Equivalent to using a 3 x 3 blur kernel.
-
Factor = 5: Uses a 5 x 5 blur kernel and produces a larger blurred area.
The larger the factor, the stronger the blur and the more image detail is lost.
-
-
Sharpen: Usually implemented by enhancing edge contrast. When Sharpen is enabled, the data is contrast-enhanced along image edges after blurring to compensate for edge softening caused by the blur.
Steps: Select Blur, enter a factor, enable Sharpen if needed, and apply the blur to the selected region.
Set NoData
Description: Set all pixels in the selected region to the NoData value for each band. This operation can mask invalid areas so they are ignored in subsequent analysis.
Use cases:
-
Remove erroneous areas, such as scan borders or occluded parts in scanned images.
-
Mask extents that should not participate in analysis, such as invalid value areas along data edges.
-
Use with masks for image segmentation or valid-area extraction.
Steps:
Select Set NoData to set pixel values in the selected region to NoData.
Fill Voids
Description: Generate reasonable pixel values by interpolation where null values or NoData exist.
Use cases:
- Fill missing areas in remote sensing imagery caused by water bodies, cloud cover, shadows, and similar factors.
- Reconstruct terrain surface models, commonly used for void repair in digital elevation model (DEM) creation.
- Preserve completeness for continuity analysis or watershed analysis and avoid calculation interruptions caused by holes.
Parameters:
-
Interpolation method: Defines the interpolation algorithm used to fill voids.
Interpolation Method Principle Advantages Disadvantages Recommended Data Types and Use Cases Kriging interpolation Performs optimal linear unbiased estimation by building a spatial autocorrelation model based on variograms and statistical principles. High accuracy; reflects spatial structure; provides error estimates. Complex calculation; many parameters; time-consuming. DEM repair and continuous data with spatial correlation, such as precipitation or soil data. Bilinear interpolation Uses the weighted average of the surrounding four cells, with weights varying linearly by distance. Simple calculation; smooth transitions; no obvious stair-step effect. Does not preserve original values; details may be smoothed. Remote sensing imagery resampling and small-area void filling for continuous raster data. B-spline interpolation Fits a surface using piecewise cubic polynomials, or B-splines. Continuous and smooth surface; suitable for terrain surface modeling. Sensitive to outliers; poor prediction for large holes. Smooth DEM surface reconstruction and engineering survey data fitting. Natural neighbor interpolation Interpolates using neighboring sample values based on Thiessen polygon weights. Preserves local features; results do not exceed the sample value range. Poor performance in sparse point areas; may be unstable near boundaries. Weather station data interpolation and land-use classification data repair. Nearest neighbor interpolation Directly uses the value of the nearest cell to fill the void. Preserves original values; fast; does not create new values. Not smooth; produces obvious blocky or jagged effects. Categorical data, such as land use or vegetation type, and remote sensing image mosaicking. Inverse distance weighted interpolation Uses distance-weighted averaging, where closer values receive higher weights. Simple and intuitive; few parameters; efficient calculation. Ignores spatial structure and may create bullseye effects. Environmental variables with local continuity, such as hydrology, water quality, or pollutant monitoring. Linear interpolation Estimates unknown values between known points using a linear function. Simple and efficient; suitable for one-dimensional data or regular grids. Does not represent nonlinear trends well. Filling missing values in time-series imagery and interpolating regular cross-section data. Spline interpolation Builds a smooth curve between known points using high-order polynomials. Smooth surface; preserves trends; suitable for smooth transitions. Sensitive to outliers; may oscillate near boundaries. DEM repair, environmental variable surface modeling, and terrain factor calculation. -
Variogram model: A spatial correlation function model that describes how a variable changes with distance in spatial interpolation.
Variogram Model Principle Advantages Disadvantages Use Cases Linear model Semivariance increases linearly with distance and has no obvious sill, assuming spatial variability increases indefinitely with distance. Simple and intuitive; suitable for data with obvious local trends. May cause over-extrapolation. Data with a significant linear trend, such as local DEM areas with steep slopes. Power model Semivariance increases as a power function with distance and has no obvious upper limit. Captures spatial differences that gradually increase with distance. Like the linear model, it does not converge to a stable value and cannot describe a stationary process well. Geological or soil scenarios where variability continues to increase with scale. Gaussian model Semivariance grows as an exponential square function with distance, changes smoothly at short distances, and gradually approaches the sill at long distances. Smooth fit; suitable for continuous data with strong spatial correlation. Complex calculation; may underestimate short-distance differences. Continuous smooth environmental data such as temperature and humidity, and high-accuracy DEM repair. Spherical model Semivariance increases at first and approaches the sill after the range; a common finite-range model. Classic and widely used; reasonable change process; efficient calculation. Transition fit is relatively abrupt and not smooth enough. Conventional spatial data interpolation for DEMs, precipitation, pollutant concentration, and similar data. Exponential model Semivariance grows exponentially with distance and gradually stabilizes near the range. Captures rapid short-distance decay in spatial correlation. Short-distance variation may be too large and fitting can be biased. Rainfall, runoff, soil moisture, and other data with significant local differences. Hole-effect model Semivariance fluctuates periodically with distance, showing a degree of spatial periodicity. Captures periodic and regular changes in spatial variables. Complex calculation; parameters are difficult to determine; prone to overfitting. Geological or ecological data with spatial periodicity, such as strata deposition, soil profiles, and vegetation distribution. Summary:
-
Spherical, Gaussian, and exponential models are common and practical for most continuous geographic variables.
-
Linear and power models are suitable for non-stationary data or data with strong trends.
-
The hole-effect model is used for geoscience phenomena with obvious periodic patterns.
-
-
Number of lag groups: The number of distance intervals used when calculating the experimental variogram. More groups describe spatial correlation in finer detail but increase computation.
-
Short-lag distance weighting: Specifies whether point pairs at shorter distances receive higher weights. In variogram modeling, this intentionally increases the influence of short-distance point pairs so the model fit better reflects local spatial structure. It is commonly used for geospatial data, especially variables with strong local differences.
-
Anisotropy scaling factor: Used when spatial autocorrelation has different strengths in different directions. If a phenomenon extends more strongly in one direction, such as along a ridge or river valley, the scaling factor adjusts distance calculations.
-
Anisotropy rotation angle: Specifies the angle between the main anisotropy direction and the coordinate system X-axis, up to 360 degrees. It identifies the direction with the strongest spatial correlation, such as river flow direction or mountain range orientation.
-
Use exact values: Specifies whether interpolation results must exactly equal observed values at known point locations.
-
Enabled: Keeps known values unchanged. This is suitable for DEM repair and other scenarios that require strict preservation of original points.
-
Disabled: Allows smoothing adjustments. This is suitable for observations with more noise.
-
-
Use pseudo-inverse matrix: Specifies whether a pseudo-inverse matrix is used to approximate a solution to the Kriging equations when the covariance matrix is ill-conditioned or non-invertible.
-
Variogram fitting method: A mathematical method used to fit the experimental variogram. In spatial interpolation, especially Kriging interpolation, the experimental variogram is only a statistical result based on sample point pairs. A smooth mathematical function is needed to describe its spatial structure.
Method Principle Advantages Disadvantages Use Cases Least squares Determines model parameters by minimizing the sum of squared residuals between the experimental variogram and theoretical variogram. Common methods include ordinary least squares and weighted least squares. Simple and intuitive; computationally efficient; easy to implement. Sensitive to outliers; only ensures overall fit and does not guarantee positive definiteness of the covariance matrix. DEM and soil attribute scenarios that require fast model fitting; preferred for experimental research or large-scale data fitting. Variogram eigenvalue method Uses eigenvalue decomposition of the covariance or semivariance matrix to select and adjust model parameters while ensuring positive definiteness of the covariance matrix. Ensures positive definiteness of the covariance matrix; more stable results; suitable for Kriging applications that require strict positive definiteness; handles complex spatial correlation structures. Theoretically complex; computationally expensive; sensitive to data distribution and sample size; parameter interpretation is weak and not intuitive. High-accuracy spatial interpolation such as Kriging; geological exploration and resource evaluation where model stability is important; sparse or irregularly distributed data.
Interpolate from Vertices
Description: This function extracts the vertex, or corner, pixel values in the selected region and uses them as known data sources to interpolate the remaining cells in the region and reconstruct the surface. The interpolation method usually uses bilinear or spline methods so the result is smooth and natural.
Use cases:
- Remove non-ground features: In a digital surface model, buildings, tree canopies, and other non-ground structures may appear in a region. Interpolating from surrounding vertices can restore the original ground elevation.
- Fill data holes: When holes or damaged areas exist during data acquisition, such as NoData regions, vertex interpolation can quickly fill these locations. It is especially suitable for restoring regular raster holes.
- Repair noise and smooth locally: When the central area contains abrupt changes or outliers, vertex interpolation can create a natural transition and smooth correction.
Parameters are the same as Fill Voids.
Interpolate from Edges
Description: This function uses values from pixels along the selected region boundary as known conditions and interpolates inward to reconstruct the values of other pixels in the region. This method emphasizes preserving boundary information and gradually estimating central region values. Interpolation is commonly based on weights, distance, or spline models.
Use cases:
-
Remove non-ground features: High objects such as buildings, bridges, and trees can be replaced with reasonable ground values estimated from ground elevation information along the edge, restoring bare-earth elevation.
-
Restore blank areas: Fill large missing areas in imagery or elevation data, especially when edge data remains intact and can support accurate reconstruction of interior data.
-
Integrate elevation data: When boundaries between merged data sources do not match well, this method can create a transition on one side of the join boundary and improve seamless integration.
Steps:
Select Interpolate from Edges and choose Bilinear interpolation as the interpolation method.
Parameters are the same as Fill Voids.
Mean Filter
Description: Apply a mean filter to the selected region to smooth pixel values. This operation calculates the mean of surrounding pixels to reduce local elevation fluctuation. It is suitable for removing small-scale noise or outliers.
Use cases:
-
Remove local fluctuation or noise from elevation data.
-
Smooth DEM or DSM data for visualization or modeling.
-
Reduce small-scale undulation in areas such as mountain or water boundaries and improve overall terrain continuity.
Parameters:
- Filter: Selects the filter window size used when running the operation. A filter size of 8 means an 8 x 8 filter window is used. Larger values produce stronger smoothing.
Median Filter
Description: Apply a median filter to the selected region. This method replaces the current pixel with the middle value in the pixel neighborhood. It effectively suppresses isolated outliers while preserving edge information, and is commonly used to remove salt-and-pepper noise.
Use cases:
-
Remove local elevation outliers from LiDAR data, such as individual mismeasured points.
-
Clean noise while preserving slope and boundary clarity.
-
Preprocess elevation models for watershed analysis or landform extraction.
Steps:
Select Median Filter and set the filter size to 3.
Constrained Filter
Description: Apply a threshold-controlled mean filter in the selected region. This operation smooths values while ensuring that pixel values do not exceed the specified maximum change range, reducing noise while preserving important elevation-change features.
Use cases:
- Preserve building edges or abrupt elevation changes in urban terrain while removing slight undulations.
- Repair small-scale errors on linear feature surfaces, such as roads or embankments.
- Apply limited smoothing to terrain with abrupt structures, such as cliffs or steep slopes.
Parameters:
| Parameter | Description | Effect | Notes |
|---|---|---|---|
| Filter size | Defines the filter window size, commonly 3 x 3, 5 x 5, 7 x 7, and similar sizes. Larger windows include more neighboring cells in the mean calculation and produce stronger smoothing. | Small window, such as 3 x 3: removes small-scale noise while preserving more detail. Large window, such as 5 x 5 or larger: stronger smoothing but may blur terrain details. | Choose based on data resolution. Fine DEM data commonly uses 3 x 3, while remote sensing imagery denoising may use a larger window. |
| Threshold | Controls the maximum allowed difference between the filtered cell and the original value. If the mean result differs from the original value by more than the threshold, the original value is retained. | Prevents over-smoothing and preserves abrupt terrain features, such as steep slopes or gullies. Larger threshold: closer to a normal mean filter with stronger smoothing. Smaller threshold: preserves more detail and weakens smoothing. | If the threshold is too large, details may be lost. If it is too small, noise removal may be insufficient. Set it based on data noise level or elevation change range, such as 1 to 3 meters. |
Outlier Filter
Description: Detect and remove outlying elevation values or obvious noise points in the selected region, such as birds, cloud points, and other non-surface targets in LiDAR data. This operation improves terrain realism in the source data and the accuracy of subsequent analysis.
Use cases:
-
Clean outliers in DSMs generated from LiDAR point clouds or imagery, such as those caused by birds, clouds, or vehicles.
-
Remove abnormal data generated during DEM acquisition because of occlusion, echo interference, and similar issues.
-
Provide a more accurate surface model for modeling or volume calculation.
Parameters:
| Parameter | Description | Effect | Notes |
|---|---|---|---|
| Filter size | Defines the neighborhood range for detecting outliers, commonly 3 x 3, 5 x 5, and similar sizes. Within each neighborhood, the center cell is compared with neighborhood statistics such as the mean or median. | Small window: detects local spikes or isolated noise. Large window: better for detecting large-scale anomalies, such as striping noise. | Too small may fail to identify broad anomalies, while too large may treat real terrain variation as abnormal. Select a value that matches data resolution and noise characteristics. |
| Threshold | Controls the maximum allowed difference between a cell and neighborhood statistics. A common rule is: absolute value of center cell minus neighborhood mean greater than threshold means the cell is classified as an outlier. A dynamic threshold based on standard deviation or interquartile range may also be used. | Small threshold: detects more subtle anomalies but may remove real features by mistake. Large threshold: removes only obvious noise and may miss slight anomalies. | Select the threshold based on the data noise level. DEMs commonly use 2 to 5 meters, while LiDAR point clouds can use a dynamic threshold based on statistical distribution. |
Example:
-
3 x 3 neighborhood mean = 105
-
Center cell value = 160
-
Threshold = 20
-
|160 - 105| = 55 > 20. The value is classified as an outlier and replaced with the neighborhood mean.
Terrain Filter
Description: Remove above-ground objects, such as buildings and trees, from a digital surface model while preserving natural terrain features. This is suitable for extracting terrain surfaces or analyzing landform features such as slope and drainage.
Use cases:
- Obtain terrain without building interference for landslide, flood, drainage, and other geohazard simulations.
- Provide clean terrain data for ecological analysis and surface modeling.
Parameters:
-
Ground detection method: The process of distinguishing ground points from non-ground points, or above-ground objects such as buildings, trees, and vehicles, in LiDAR, UAV photogrammetry, stereo image extraction, or other digital surface model data.
Goals:
-
Extract the natural terrain surface for hydrology, slope, landform, and related analysis.
-
Remove interference from above-ground objects so the model better represents real terrain.
Ground Detection Method Principle Advantages Disadvantages Use Cases Conservative Tends to keep more points as non-ground and only marks points as ground when there is high certainty. Preserves real terrain as much as possible and rarely removes terrain features by mistake. Friendly to complex terrain such as steep slopes and gullies. More above-ground objects may remain, such as buildings or trees. Additional processing may be required later. Dense urban high-rise areas where road surfaces should not be removed by mistake; mountain, canyon, and other complex terrain where slopes should not be removed by mistake. Aggressive Quickly and strictly removes points that are higher than surrounding terrain, treating most abnormal high values as non-ground. Effectively removes trees, buildings, and other above-ground objects. Produces a cleaner output surface. May remove real terrain protrusions, such as ridges or small hills, by mistake and cause excessive terrain smoothing. Flat areas such as farmland or grassland, especially where DEM cleaning requirements are high. Effective for removing birds and buildings from LiDAR data. Standard Balances conservative and aggressive behavior by using thresholds and local elevation differences for classification. Balances terrain preservation with removal of above-ground objects. General-purpose and suitable for most cases. In special cases, such as dense building areas or extreme terrain, it is less effective than the two more extreme methods. General DEM creation and moderately undulating areas where trees and buildings must be removed while terrain is preserved. -