| Environments | PYTHON :: EASI |
| Quick links | Description :: Parameters :: Parameter descriptions :: Details :: Example :: Related |
| Back to top |
| Back to top |
| Name | Type | Caption | Length | Value range |
|---|---|---|---|---|
| SILFILE | String | Source-image list file | 0 - 192 | |
| MDFILE * | String | Mosaic-definition file | 1 - 192 | |
| DBIC | Integer | List of input raster channels | 0 - | |
| TISPEC | String | Tile specification | 0 - 192 | |
| TIPOSTRN | String | Tile-positioning transformation | 0 - 192 | |
| MAPUNITS | String | Map units | 0 - 192 | PIXEL, UTM, METER, and others |
| PXSZOUT | Double | Output pixel ground-size | 0 - 2 | |
| BLEND | Integer | Blend width (in pixels) | 0 - 1 | Default: 0 |
| NODATVAL | Float | No-data image value | 0 - 48 | |
| FTYPE | String | Output file type | 0 - 4 | PIX | RAW | TIF | XWD Default: PIX |
| FOPTIONS | String | Options for output format | 0 - 64 | |
| MONITOR | String | Monitor mode | 0 - 3 | ON, OFF Default: ON |
| Back to top |
SILFILE
The name of an existing source-image list file created by the MOSPREP algorithm or a mosaic project created by CATALYST Professional Mosaic Tool. The file identifies all of the input images to mosaic and the order thereof along with other characteristics of the mosaic to create.
MDFILE
The name of the mosaic-definition file, in XML format, to create.
The file name you specify must not exist already. MOSRUN uses this file, along with the file specified for the SILFILE parameter in MOSPREP, during mosaicking.
The name of the file you specify is used as the base name for the definition polygon, which delineates the boundaries of the output mosaic.
DBIC
The channel or channels to mosaic and include in the output.
Each output channel is a mosaic of all of the data in the input images that exists in the corresponding channel number. If you do not specify a value for this parameter, all channels are processed.
This parameter is optional.
Ranges of channels or segments can be specified with negative values. For example, {1,-4,10} is internally expanded to {1,2,3,4,10}. When you are not specifying a range in this way, only 48 numbers can be specified explicitly.
TISPEC
The tiling scheme to apply to the output mosaic.
When mosaicking large volumes of data, it is more practical to store the mosaic results as a series of smaller tiles than one (potentially) large file. MOSDEF creates the tile-definition layout as a vector-polygon layer.
If you do not specify a value for this parameter, the entire mosaic is created as one continuous file. The output mosaic in this scenario always has this suffix: 1_1
VECTOR, <vector_file>, [<field_name>], [<segment_number>], [<buffer_distance>]
Use VECTOR when you have an existing vector-polygon layer that contains the tile definitions you want to use for this mosaic. You can use the vector_file field to specify the name of the file that contains the tile-definition layer.
In the vector layer you specify, there must be a field (attribute) that has unique identifiers for each tile, which you specify using field_name. MOSRUN uses the values in this field as base names of the mosaic-tile files. If you do not specify a value for field_name, the attribute ShapeID will be used. If you do not specify a value for segment_number, the last segment specified for vector_file will be used.
Optionally, the polygons can be extended with a buffer, if specified. The buffer distance is in the units of the vector-layer coordinates. When the input polygons abut and a buffer distance is specified, the mosaic pieces will overlap.
For example:
TISPEC="VECTOR, c:\data\NTS_1_to_50000.shp, NTS_Code, 1, 100"
DIMENSIONS, <ho_pixel_count>, [<vert_pixel_count>, <ho_pixel_overlap>, <vert_pixel_overlap>]
Use DIMENSIONS to create tiles of a specific size with optional overlap between tiles.
You can use the ho_pixel_count field to specify the number of pixels and vert_pixel_count to specify the number of lines that define the tile size. If you do not specify a value for vert_pixel_count, the value of ho_pixel_count will define both dimensions.
The union of the extents of all of the source images will be divided into a series of evenly sized rectangular tiles with the specified dimension.
You can use the ho_pixel_overlap field to specify the horizontal overlap of each tile (in pixels).
With the vert_pixel_overlap field, you can specify the vertical overlap of each tile (in pixels). If you do not specify a value for vert_pixel_overlap, the value of ho_pixel_overlap is used to define the size of both overlaps.
Only tiles that actually intersect at least one of the source images will be written to the output. Tiles at the far right and those on the far bottom may overhang the extents of the source images. This is done to ensure that all tiles have the same dimensions.
The TileID values are generated using the convention <column_number>_<row_number>. For example, the upper-left tile will always have a TileID of 1_1, while the one immediately below it will be 1_2, and so on.
For example:
TISPEC="DIMENSIONS, 5000, 10000"
NUMTILES, <ho_tiles>, <vert_tiles>, [<ho_pixel_overlap>, <vert_pixel_overlap>]
Use NUMTILES to create a specific number of tiles with the size of each computed automatically with optional overlap between tiles.
You can use the ho_tiles, and vert_tiles fields to specify the number of horizontal and vertical tiles respectively to divide the whole mosaic. The union of the extents of all of the source images will be divided into a series of evenly sized rectangular tiles such that the number of tiles requested in each dimension is respected.
You can use the ho_pixel_overlap field to specify the horizontal overlap of each tile (in pixels).
With the vert_pixel_overlap field, you can specify the vertical overlap of each tile (in pixels). If you do not specify a value for vert_pixel_overlap, the value of ho_pixel_overlap is used to define the size of both overlaps.
Only tiles that actually intersect at least one of the source images will be written to the output. Tiles at the far right and those on the far bottom may overhang the extents of the source images. This is done to ensure that all tiles have the same dimensions.
The TileID values are generated using the convention <column_number>_<row_number>. For example, the upper-left tile will always have a TileID of 1_1, while the one immediately below it will be 1_2, and so on.
For example:
TISPEC="NUMTILES, 4, 5"
SCRIPTFILE, <text_file>, [<coordinate_type>]
Use SCRIPTFILE when you have a text file that defines the coordinates of each tile you want to create. Each line in the text file contains five elements, separated by spaces: the first two define the upper-left coordinate in the x and y dimension, respectively, the next two define the lower-right coordinate in the x and y dimension, respectively, and the last one specifies the output file name of the tile.
When the file name includes an extension, the extension is removed when the value is stored as the TileID attribute in the tile-definition polygon. When the file name includes a path, the entire path is transferred and appended to the value of OUTDIR, if specified, in MOSRUN.
RASEXT and RASOFFSZ make use of pixel/line raster as defined by the union of the extents of all input source images. If you do not specify a value for coordinate_type, GEOEXT will be used.
For example:
TISPEC="SCRIPTFILE, C:\data\Toronto\Sites.txt, GEOEXT"
Regardless of which option you specify for TISPEC, MOSDEF creates a vector file containing polygons that define the tiles using the naming convention MDFILE_tilepoly.pix. The file is written to the folder specified for the MDFILE parameter.
When you specify VECTOR as the value of TISPEC, tiles are not generated; rather, they are copied from the specified existing polygon layer. Only the shapes that partially intersect at least one of the source images are transferred to the MDFILE_tilepoly.pix file. Tiles must be in the same projection as the output mosaic: if the provided vector layer is not in the same projection, the tiles are reprojected.
This parameter is optional.
TIPOSTRN
Whether to adjust the starting position of the output tile.
You specify the value by entering a keyword and either two or four values. The keyword indicates whether the remaining values are relative to the upper-left corner of the first pixel in the output tile, CORNER, or relative to the center of the first pixel, CENTER.
After you specify the keyword, the general form of the remaining values are Stride_X, Stride_Y, Ref_X, and Ref_Y. The values define the tile locations in the output mosaic.
You can use keyword RELATIVE to indicate that reference corner point should be the UL point of your input images. Then only Stride_X and Stride_Y can be specified. If they are left blank then output pixel size is used as stride value.
For example, the following statement specifies that the upper-left corner of the upper-left pixel of each tile will be an even 20-meter multiple from the reference point (432345.000, 5438882.000):
TIPOSTRN="CORNER, 20, 20, 432345.000, 5438882.000"
Depending on the distance of the tile from that point, its upper-left corner coordinate can be 432345.000, 432045.000, or any other multiple, but will never be 432346.000 or 432355.000.
MAPUNITS
The projection string or units of the output mosaic.
If you do not specify a value for this parameter, the projection is taken from the first image occurring in the source-image list file. If the projection you specify differs from that of the input data, the data is reprojected. A projection string must fully identify the projection and Earth model you want, such as UTM 17 D000. A projection is written to the output mosaic-definition file in the MapProj metadata tag.
The standard definitions are as follows:
For a complete list of supported projections and Earth models, see Map projections. For information on the format of the map-units string, see Output units.
PXSZOUT
The horizontal and vertical pixel size, in the units specified for the MAPUNITS parameter. If you specify only one value, it defines the pixel size in both dimensions. If you do not specify any values, the resolution of the output mosaic is determined automatically by examining the resolution of the input images. The resolution occurring most frequently; that is, the mode, will be used as the output resolution. If the mode is not unique, the coarsest of the tied resolutions will be used.
This parameter is optional.
BLEND
The perpendicular distance from the cutlines to which to apply image blending.
Image blending is to average the gray value of each pixel in the blending strip along a cutline from both overlapped input images.
This parameter is optional.
NODATVAL
The pixel values to use as the NoData values in the output mosaic.
Pixels covered by some of the input images will have those values overwrite the initial values of the NODATVAL parameter.
The value of the NODATVAL must be a number within the range defined by the bit depth of the data being mosaicked. For example, when mosaicking 8U data, the value of NODATAVAL must be an integer between 0 and 255.
If you do not specify a value for this parameter, the NoData value of the input channels is used. When NoData is neither specified nor available from any source, the minimum storable value for the channel type is used, by default, except with a channel type of 32R.
For example, when mosaicking 8U data, a default NoData value of 0 is used when no value is specified for NODATVAL and the input channels do not have a defined NoData value. With a 32R channel type, however, a value of -32768 is used, by default, when you do not specify a value for the parameter.
If necessary, you can enter more than one NoData value for your output mosaic. For example, to specify that channel 1 has a NoData value of -9999, channel 2 is 0, and channel 3 is 255, enter -9999,0,255.
This parameter is optional.
FTYPE
The format of the output file.
The default value is PIX.
FOPTIONS
The options specific to the format to apply when creating the output file. With each, the default of no options is allowed (empty string).
Typically, the available options for a format include a compression scheme, format subtype, or other information.
MONITOR
The program progress can be monitored by printing the percentage of processing completed. A system parameter, MONITOR, controls this activity.
Available options are:
| Back to top |
You create mosaics by running several algorithms. With MOSDEF, you use the source-image list file created by the MOSPREP algorithm as input to create a mosaic-definition XML file. You then can use MOSRUN to combine the MOSPREP and MOSDEF outputs.
After running successfully, MOSDEF creates an output file, in XML format, and a polygon-vector file, in PCIDSK format, of the defined tiles.
| Back to top |
This example generates a mosaic-definition file for the specified source-image list file and an existing polygon to create a tile-definition file.
EASI>silfile = "Halifax.mos" ! Mosaic project created by MOSPREP
EASI>mdfile = "Neighborhoods_def.xml" ! Mosaic-definition file to create
EASI>dbic = 1,2,3 ! Use image channels 1,2,3
EASI>tispec = "VECTOR, Neighborhoods.pix, MapCode" ! The 'MapCode' attribute will be used as TileID
EASI>tipostrn = ""
EASI>mapunits = "" ! The map units will be the same as the input images
EASI>pxszout = "1" ! Output pixel size, same for x and y
EASI>blend = 3 ! Blend will be three pixels from the cutlines
EASI>nodatval = ! The output NoData value will be same as input
EASI>ftype = "TIF" ! Output mosaic file type
EASI>foptions = "TILED256"
EASI>monitor="" ! Monitor will be 'ON'
© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.