Environments | PYTHON :: EASI :: MODELER |
Quick links | Description :: Parameters :: Parameter descriptions :: Return Value :: Details :: Examples :: Related |
Back to top |
Back to top |
rfmodel(mfile, dbgc, mmseg, adjorder, numcoeff, mapunits)
Name | Type | Caption | Length | Value range |
---|---|---|---|---|
MFILE* | str | Input file name, directory, or text file | 1 - | |
DBGC | List[int] | Input GCP segment or layer | 0 - 1 | |
MMSEG | List[int] | Math model segment or layer | 0 - 1 | |
ADJORDER | List[int] | RPC adjustment order (0, 1, 2) | 0 - 1 | 0 - 2 |
NUMCOEFF | List[int] | Number of coefficients (3 to 20) | 0 - 1 | 3 - 20 |
MAPUNITS | str | Map units | 0 - | PIXEL, UTM, METER, and others |
Back to top |
MFILE
Specifies the name of a folder, image file, or text file that contains the input images. Wildcards (*) can be used.
MFILE can be set using any of the following options:
If the text file option is used, the following general rules apply:
If MFILE is a directory name or if multiple file names are entered, then all images in MFILE should be processed using the parameters set for RFMODEL.
If a directory is specified, then the DBGC, MMSEG, ADJORDER, and NUMCOEFF parameters are set to a single value for all input images. If a text file is specified, the DBGC, MMSEG, ADJORDER, and NUMCOEFF parameters are read from the text file for each image, and those parameters can be empty.
If one file is specified for MFILE, the model computed will be an independent model (one image).
If a text file is specified for MFILE, the listed files in the text file are processed with the listed parameters.
DBGC
Specifies the ground control point (GCP) segment or layer to use to compute the model.
If a directory is specified for MFILE, then this segment number will be applied to all images. If a text file is specified, DBGC is read from the text file, and this parameter can be empty.
MMSEG
Specifies the math model segment or layer that stores the model.
If a directory is specified for MFILE, then this segment number will be applied to all images. If a text file is specified, MMSEG is read from the text file, and this parameter can be empty. If no value is specified, a new segment is created.
ADJORDER
If RPC data is supplied with the data, this value specifies the RPC adjustment order to be used in the RPC model refinement. Valid values are 0, 1 or 2.
NUMCOEFF
If RPC data is not supplied with the data, this value specifies the number of coefficients to be used to calculate the rational function. Valid values are 3 to 20.
MAPUNITS
Specifies the projection string for the output model.
The standard definitions are as follows:
For a complete list of supported projections and Earth models, see Understanding map projections. The format of the map units string is described in Output units.
If this parameter is not specified, the map units of the GCP segment are used.
Back to top |
Returns: A list of statistical values.
Type: PCI_DOUBLE
Parameter: IMSTAT
Back to top |
RFMODEL calculates the mathematical model required for orthorectification using rational functions. It computes an updated rational functions solution, based on provided GCPs or rational function coefficients, or both.
Back to top |
You have an IKONOS image and would like to correct it using rational functions.
from pci.rfmodel import rfmodel mfile ="ikonos.pix" # input image file dbgc = [2] # use gcp segment 2 mmseg = [] # create a new math model segment adjorder = [0] # use 0 order RPC adjustment numcoeff = [] # Leave none for RPC coefficient number mapunits = "UTM 11 d0" # output projection rfmodel (mfile, dbgc, mmseg, adjorder, numcoeff, mapunits)
You have an image without existing RPC math model and would like to generate a new RPC segment.
from pci.rfmodel import rfmodel mfile ="17029_pan.pix" # input image file dbgc = [3] # use gcp segment 3 mmseg = [] # create a new math model segment adjorder = [] # leave none for RPC adjustment order numcoeff = [20] # use 20 for RPC coefficient number mapunits = "" # output projection rfmodel (mfile, dbgc, mmseg, adjorder, numcoeff, mapunits)
© PCI Geomatics Enterprises, Inc.®, 2024. All rights reserved.