VIMAGE

Collect image point/polygon statistics


EnvironmentsPYTHON :: EASI :: MODELER
Batch ModeYes
Quick linksDescription :: Parameters :: Parameter descriptions :: Details :: Related

Back to top

Description


Samples a raster image channel for each vector in a vector segment, and adds a column containing the requested sample statistics to the vector segment. Either point sampling or polygon statistics can be computed.
Back to top

Parameters


Name Type Length Value range
Input: Input raster channel * Raster port 1 - 1  
Mask: Area mask Bitmap port 0 - 1  
InputVec:  * Vector port 1 - 1  
Output: Output vector segment * Vector port 1 - 1  
Output Column Names String 0 -    
Sampling Method String 0 -   POINT | MEAN | MODE | MEDIAN | MIN | MAX | SUM | HIST | COUNT | STDEV | VAR
Default: POINT
Value for Undefined Operations Float 0 - 1024 Default: 0.0

* Required parameter
Back to top

Parameter descriptions

Input: Input raster channel

Specifies the raster image channel to be sampled.

Mask: Area mask

Optionally specifies the bitmap that defines the area to be processed within the input raster.

Only the area under the mask is written to the output. If this parameter is not specified, the entire channel is processed.

InputVec:

Specifies the vector segment that contains the points or polygons to use for sampling purposes.

Polygons may be expressed as simple closed polygons, polygons with multiple rings, or polygons stored as a topology.

Output: Output vector segment

Specifies the vector segment to receive the new column of image statistics.

Output Column Names

Specifies the names of the new columns to be added to the table in the output vector segment.

If the specified column already exists, that column's contents will be replaced, instead of adding a new field to the table.

If this parameter is not specified, a default column names will be added, based on the "Sampling Method" operation and the channel being operated on.

If this value is set and there are more than one "Sampling Method" set, one column name per "Sampling Method" must be set. Each name is delimited by a comma.

Sampling Method

Specifies the sampling methods used to compute the value of the new column, based on the input image.

Multiple sampling methods can be specified using commas.

Supported methods are:

The sampling methods are described in the Details section.

Value for Undefined Operations

Specifies the values assigned to the output field for which an output value cannot be computed. This value will be used for vectors that fall outside the available image region, as well as to non-point structures when the sampling method is POINT, and to non-polygon structures when a polygon-based sample type is selected.

If this value is set, one value per "Sampling Method" must be specified.

Back to top

Details

VIMAGE reads a single image channel (DBIC) from an input raster file. It then samples all the pixels associated with the polygon and/or point structures in an input vector segment (DBVS) in the input vector file (FILV). These pixels are then used to compute an image statistic related to that point or polygon, and the statistic is written to a new attribute field (OCOLUMN) for that vector structure.

The SAMPTYP (Sampling Method) parameter is used to define the type of statistic generated. Supported sampling methods are:

Vector structures that do not match the criteria for the sampling method (must be a single vertex for POINT, or a closed polygon for the others) have a default undefined operation value (UNDEFVAL) assigned to the output attribute (OCOLUMN). This also occurs if the vector does not overlay the image, or in the case of polygons with no pixels (based on the center of the pixels) within the polygon.

Vector polygons may be expressed as simple whole polygons (closed polylines), as multi-ring polygons (via RingStart field), or as topological polygons.

The statistics for polygons are based on all pixels for which the center of the pixel falls within, or on the boundary of, the pixel. Pixel contributions are not weighted according to the amount of the pixel within the polygon.

The HIST, MODE, and MEDIAN statistics are computed based on building an in-memory histogram for floating point channels, but the histogram bins the values to integers in the range -32768 to 65536. In many cases, this means the HIST, MODE and MEDIAN results for floating point channels will be inaccurate, or even meaningless.

The VIMAGE program computes statistics by looping over all vectors and, for each appropriate vector, reads the image rectangle containing the vector for sampling purposes. This means that if several large vector polygons are being processed, the overall processing time can be very slow.

© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.