| Environments | PYTHON :: EASI :: MODELER |
| Quick links | Description :: Parameters :: Parameter descriptions :: Return Value :: Details :: Example :: Related |
| Back to top |
| Back to top |
model2rpc(fili, filo, mmseg, rpczref)
| Name | Type | Caption | Length | Value range |
|---|---|---|---|---|
| FILI * | str | Input-file name | 1 - | |
| FILO | str | Output-file name | 0 - | |
| MMSEG | List[int] | Input-math-model segment | 0 - 1 | |
| RPCZREF | str | RPC-elevation reference | 0 - 6 | Default: ELLIPS |
| Back to top |
FILI
The name of the input file that contains the math-model segment to convert.
FILO
The name of the output file to receive the RPC segment. Currently, only a PCIDSK (.pix) file can properly support the creation of a math model.
If the output file is not specified, a new rational-function-model (RFMODEL) segment is created in the input file (FILI).
If the output file name has a .txt/.rpb extension, the RPC output is written to a text file. If the output file name has a .xml extension, the RPC output is written to an xml file. There are two different RPC text file formats with different extensions, i.e., _rpc.txt and .rpb. _rpc.txt format is mostly used by satellites such as IKONOS and GeoEye old formats and .rpb is mostly used by satellites such as QuickBird and WorldView. This program will output the RPC according to the file extension.
MMSEG
The input-math-model segment from which to generate the RPC model. If MMSEG is zero, it will generate RPC model from the geocoded image.
RPCZREF
The computed RPC-elevation reference.
Available options are:
The default is ELLIPS (ellipsoid).
| Back to top |
Returns: execution status
Type: PCI_INT
| Back to top |
MODEL2RPC converts a math model inside an image file to a rational-function-model segment.
If no value is specified for the output file (FILO), a new segment is created in the input file (FILI). If the the value specified for FILO is a file name with a .txt extension, MODEL2RPC writes the RPC information to that text file.
| Back to top |
Generate a rational-function model for a given PCISDK file.
from pci.model2rpc import model2rpc
fili = "image.pix" # input file containing math model
filo = "" # create new output segment in FILI
mmseg = [] # use last segment in FILI
rpczref = "ELLIPS" # use ellipsoidal
model2rpc( fili, filo, mmseg, rpczref )
© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.