AVMODEL

Generates geometric models for AVHRR images


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

Back to top

Description


AVMODEL uses AVHRR data to calculate the mathematical models required for orthorectification.
Back to top

Parameters


avmodel(mfile, dbgc, orbit, mmseg)

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 1 -
ORBIT List[int] Orbit segment or layer 0 - 1 1 -
MMSEG List[int] Output math model segment or layer 0 - 1 1 -

* Required parameter
Back to top

Parameter descriptions

MFILE

Defines a specific file or multiple files to be processed. 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:

DBGC

Specifies the ground control point (GCP) segment or layer number in the input raw image to be processed.

DBGC must be specified either in the task or in the text file. If a folder is specified for MFILE, this segment number applies to all images. If MFILE specifies a text file, the value for DBGC is read from the file and this parameter is ignored.

ORBIT

Specifies the input orbit segment or layer to use to compute the model.

If a folder is specified for the MFILE parameter, the segment number applies to all images. If MFILE specifies a text file, the value for ORBIT (InputOrbit) is read from the text file and the folder for the MFILE need not be specified. If no value is specified, the last orbit segment is automatically used.

MMSEG

Specifies the geomateric math model segment or layer in which to store the model.

If a folder is specified for MFILE, the segment number applies to all images. If MFILE specifies a text file is specified, the value for MMSEG is read from the text file and this parameter is ignored. If a file is not specified, a new math model segment is created.

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.

Back to top

Details

AVMODEL calculates the mathematical model required for orthorectification using AVHRR data. Only PCIDSK files with ORBIT and ground control point (GCP) segments are supported

If MFILE specifies a text file, AVMODEL processes the files listed in the .txt with the parameters listed:

[MFILE];[DBGC];[ORBIT];[MMSEG]

For example:

"C:\pci\Irvine.pix";3;2;4
is equivalent to:

In the following example, the text file specifes only the input file and the orbit segment:

"C:\pci\Irvine.pix"; ;2
is equivalent to:

The MMSEG (OutputMM) value is interpreted as the number of a GCP segment or layer that exists or is to be created in the file. The MMSEG value must be 1 or the greatest existing math model segment number plus 1.

If any of the DBGC, ORBIT, or MMSEG values on a line in the text file are invalid, the process stops and throws an exception.

If MFILE specifies a directory name, all image files in the directory are processed with the GCP segment number, orbit segment number, and math model segment number assigned to the parameters DBGC, ORBIT, and MMSEG, respectively. If any of these segment numbers are invalid with respect to a file in the directory, that file is not processed and the function moves on to the next file. This is considered to be successful execution.

If MFILE specifies an image file name, the specified image is processed with the GCP segment number, orbit segment number, and math model segment number assigned to the parameters DBGC, ORBIT, and MMSEG, respectively. If any of these segment numbers are invalid with respect to the specified file, the file is not processed and the function returns. This is considered to be successful execution.

If any of the input image files are not PCIDSK files, a PCIDSK file that links to the input image file is created to hold the computed math model for the image. The PCIDSK file will have the same path and file name as the image model, but with a ".pix" extension.

If the attempt to open an image or text file is unsuccessful, this function will throw an exception.

Back to top

Example

Calculate the mathematical models for "imported_avhrr_raw_data.pix", using database ground control segment number 2 and orbit segment 3.

from pci.avmodel import *

mfile = "imported_avhrr_raw_datapix"
dbgc = [2]
orbit = [3]
mmseg = []

avmodel(mfile, dbgc, orbit, mmseg)

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