PNTREFN

Refines tie points and ground control points


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

Back to top

Description


PNTREFN refines tie points (TP) and ground control points (GCP) in a CATALYST Professional OrthoEngine project file.
Back to top

Parameters


pntrefn(oeproji, refnmode, gcpres, tpres, oeprojo, pointopt, mintp, refnopt, imstat)

Name Type Caption Length Value range
OEPROJI * str Input OrthoEngine project file 1 -    
REFNMODE * str Refinement mode 4 -   PROG | DIRECT
Default: PROG
GCPRES List[float] Maximum GCP residual 0 - 1 -5 - 1000
TPRES List[float] Maximum TP residual 0 - 1 -5 - 1000
OEPROJO * str Output OrthoEngine project file 1 -    
POINTOPT * str Options for rejected points 3 -   INACT | DEL
Default: INACT
MINTP List[int] Minimum number of TPs 0 - 1  
REFNOPT str Options for rejected points 0 -    
IMSTAT List[float] Output PNTREFN statistics 0 -    

* Required parameter
Back to top

Parameter descriptions

OEPROJI

The path and file name of the OrthoEngine project file (*.prj) containing the points you want to refine.

REFNMODE

The mode of refinement to use: progressive or direct.

In progressive (PROG) mode, points greater than 1,000, 500, 100, 20, and 10 pixels, respectively, are removed iteratively before applying the maximum GCP residual, maximum TP residual, or both, as specified for GCPRES and TPRES, respectively.

In direct (DIRECT) mode, the maximum residual specified is applied exclusively.

GCPRES

The maximum residual for x and y per GCP.

For example, to refine the OrthoEngine project until all GCPs have a residual of two or less in both the x and y direction, enter 2.

If the entered value is negative, it uses outlier method to remove points. Any points within an image have residuals from the mean value greater than -GCPRES * standard deviation of the image would be removed.

TPRES

The maximum residual for x and y per TP.

For example, to refine the OrthoEngine project until all TPs have a residual of two or less in both the x and y direction, enter 2.

If the entered value is negative, it uses outlier method to remove points. Any points within an image have residuals from the mean value greater than -TPRES * standard deviation of the image would be removed.

OEPROJO

The path and file name of the output OrthoEngine project file to which to write the refined TPs, GCPs, or both.

You can specify your input project as your output project; however, by doings so, the input file will be overwritten with the new information.

POINTOPT

The disposition of the rejected points.

That is, on completion of refinement, you can elect to either render the rejected points inactive (INACT) or delete (DEL) them.

MINTP

The minimum number of TPs per image.

Images with fewer than the minimum number of TPs before and after refinement will be rendered inactive.

REFNOPT

Refinement options. Current supported options are UPDATE_ANGLES, NO_CHECK and NO_MESSAGE.

IMSTAT

On completion of processing, PNTREFN updates IMSTAT with information that may be useful in a scripting environment, as follows:
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

PNTREFN refines TPs and GCPs in an OrthoEngine project file.

The algorithm removes points in either a progressive or direct mode according to the specified residual. In progressive mode, large residuals are removed in the following steps:
  1. Remove residuals greater than 1,000 pixels
  2. Remove residuals greater than 500 pixels
  3. Remove residuals greater than 100 pixels
  4. Remove residuals greater than 20 pixels
  5. Remove residuals greater than 10 pixels
  6. Remove residuals according to the specified residual

In direct mode, the specified residual is applied exclusively.

Processing is complete when the specified residual is reached.

Back to top

Example

In the following example, TPs and GCPs are designated inactive until the x and y residual for each meets the specified GCP and TP residual.

from pci.pntrefn import pntrefn

oeproji = "airphoto_model.prj"
refnmode = "prog" #Progressive mode
gcpres = [1.0] #Refine until remaining GCPs have an x-residual and a y-residual of 1
tpres = [2.0] #Refine until remaining TPs have an x-residual and a y-residual of 2
oeprojo = "refined.prj"
pointopt = "inact" #Designate refined points inactive
mintp = [10] #Designate images with fewer than 10 TPs inactive

pntrefn (oeproji, refnmode, gcpres, tpres, oeprojo, pointopt, mintp)

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