| Environments | PYTHON :: EASI |
| Quick links | Description :: Parameters :: Parameter descriptions :: Details :: Example :: Related |
| Back to top |
| Back to top |
mosrun(silfile, mdfile, outdir, tilist, crsrcmap, extirule, delempti, proc, resample)
| Name | Type | Caption | Length | Value range |
|---|---|---|---|---|
| SILFILE * | str | Source-image list file | 1 - | |
| MDFILE | str | Mosaic-definition file | 0 - | |
| OUTDIR | str | Output folder | 0 - | |
| TILIST | str | List of subset tiles | 0 - | |
| CRSRCMAP | str | Create output source map | 0 - 3 | YES | NO Default: NO |
| EXTIRULE | str | Rule for processing existing tiles | 0 - 6 | SKIP | REGEN | UPDATE Default: SKIP |
| DELEMPTI | str | Delete empty tiles | 0 - 4 | NONE | NEW Default: NONE |
| PROC | str | Memory use of algorithm | 0 - | |
| RESAMPLE | str | Resampling method to use | 0 - 5 | NEAR | BILIN | CUBIC Default: CUBIC |
| 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 the input images, and the specified order thereof, from which to create the mosaic. The file can also define the map projection, pixel size, mosaic extents, and other characteristics; however, the settings may be overridden by a mosaic-definition file created by MOSDEF.
MDFILE
The name of a mosaic-definition file created in XML format by MOSDEF. The file contains or references the layout necessary to create a mosaic.
This parameter is optional.
OUTDIR
The name of an existing folder to which to write the tiles created. Tiles are named and written to the folder according to the value of TILEID in the mosaic-definition file. If a tile ID from the tile-definition polygon layer includes a path, the output folder is appended with the path name. If the tile ID includes a full-absolute path, the path is used as the file-naming convention for the output folder, superseding the value of the OUTDIR parameter for that tile. By default, the mosaic results are stored in the active working folder.
This parameter is optional.
TILIST
A string or text file of tiles to process.
After running successfully, MOSDEF creates a mosaic-definition file in XML format, which you use as input for the MDFILE parameter. The file references a list of tiles (TileDefFile) and corresponding tile IDs.
The value of this parameter is a comma-separated subset of the tiles listed in the tile-definition vector-polygon file (TileDefFile). You specify each tile by its tile ID.
TILIST = "1_1, 1_2"
7_8 8_8 9_8 7_9 8_9 9_9 7_10 8_10 7_11 8_11
You then specify the text file as input for this parameter
If you do not specify a value for this parameter, all tiles are processed by default.
This parameter is optional.
CRSRCMAP
Whether to create a source map when the mosaic is created. A source map is a polygon layer created and stored in a separate file that contains an attribute to identify the predominant, source-input image used for each pixel in the output mosaic. As images are added to the mosaic, each source image is recorded in a separate raster, which, at the end of the process, is converted to a polygon layer.
If you do not specify a value for this parameter, a source map is not created. When you specify YES, a source map is created in a separate file. The name of the file is based on the mosaic-definition file specified and appended with *_SourceMap.
This parameter is optional.
EXTIRULE
The rule to apply to process existing tiles. The rule defines how processing occurs when an output tile exists already.
Use this option when you do not want to modify the output of your existing mosaic. This is the default option.
Unlike SKIP or UPDATE, the output is in the same projection and extents as the new polygon-tile definition.
The existing information is not removed; rather, any new information from the mosaic process is written to the tile. The georeferencing of the existing file is retained.
This parameter is optional.
DELEMPTI
Whether to delete empty tiles. A tile is considered empty when all pixels in it have the value defined as NoData. Deleting empty tiles is the final step in the MOSRUN process.
This parameter is optional.
PROC
The amount of memory (in megabytes) for the algorithm to use during processing.
If you do not specify a limit for the host memory, a default of 1 GB or half the available physical memory, whichever is smaller, is applied.
RESAMPLE
The resampling method to use during orthorectification.
| Back to top |
The MOSRUN algorithm creates a continuous mosaic from the specified source images and tiling scheme.
When you are satisfied with the mosaic preview, you can process a subset of mosaic tiles and, if the quality is satisfactory, process the next subset, and so on.
After running successfully, MOSRUN creates one or more raster files from the files created by MOSPREP and MOSDEF or a mosaic project created by CATALYST Professional Mosaic Tool. When the value of CRSRCMAP is YES, MOSRUN creates a PCIDSK file of the source map.
| Back to top |
The following example creates a mosaic tile or tiles based on the information in the source-image list and mosaic-definition file.
from pci.mosrun import mosrun silfile = "Halifax/Halifax.mos" # Mosaic project created by MOSPREP mdfile = "Halifax/Neighborhoods_def.xml" # Mosaic-definition file created by MOSDEF outdir = "Halifax/mosaic" # output folder tilist = "" # all tiles defined in MDFILE are created crsrcmap = "" # default, no source map is created extirule = "" # default, skip existing tiles delempti = "" # default, no tiles are deleted proc = "" # default, use maximum available memory resample = "" # default, cubic convolution resampling mosrun(silfile, mdfile, outdir, tilist, crsrcmap, extirule, delempti, proc, resample)
© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.