STITCH

Stitch Image Tiles


EnvironmentsPYTHON :: EASI :: MODELER
Quick linksDescription :: Parameters :: Parameter descriptions :: Return Value :: Details :: Example

Back to top

Description


Some satellite imagery can be provided in different tiles with orbital data information for each tile. STITCH lets you merge individual tiles that are obtained from the same orbit on the same day, into one complete scene. If the input files are PIX files with ORBIT segments, this program will rebuild a new orbital data for the whole strip to maintain the ephemeris information. If the input files are TIF/NITF files with RPC, this program will rebuild a new RPC for the whole strip. Having a single scene simplifies math modeling, orthorectification, mosaicking, and other image post-processing.
Back to top

Parameters


stitch(mfile, filo)

Name Type Caption Length Value range
MFILE * str Input file name, directory, or text file 1 - 192  
FILO * str Output file name 1 - 192  

* Required parameter
Back to top

Parameter descriptions

MFILE

Specifies the name of a folder, image file, or text file that contains the images to be stitched into one scene. Wildcards (*) can be used.

MFILE can be set using any of the following options:

If a wildcard character (*) is used, the list of files that match the format and specified naming convention are processed with the set parameters. If MFILE specifies a folder name, all recognized image files are processed using the set parameters. If a text file is specified for MFILE, the files and parameters listed in the text file are used.

If the text file option is used, the following general rules apply:

FILO

Specifies the output PCIDSK file that will contain the stitched images. If the specified file already exists, it will be overwritten.

Back to top

Return Value

Returns: Execution status

Type:  PCI_INT

The return value is 0. This function returns only if it executes successfully; otherwise, it throws an exception instead of returning.

Back to top

Details

STITCH lets you stitch ASTER, IKONOS, QuickBird, Worldview and SPOT image tiles acquired on the same day in a single pass of a satellite. This program supports PIX files with ORBIT segments or TIF/NITF files with RPC. A new orbit segment or RPC segment for the whole strip will be created.

The following data types are supported:
Back to top

Example

Stitch all the files that fall into the scene*.pix list and generate an output file named stitched_scene.pix.

from pci.stitch import stitch

mfile="scene*.pix"
filo="stitched_scene.pix"

stitch(mfile, filo)
	

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