| Environments | PYTHON :: EASI :: MODELER |
| Quick links | Description :: Parameters :: Parameter descriptions :: Return Value :: Details :: Example |
| Back to top |
| Back to top |
oepntthin(oeproji, oeprojo, ptype, numgrid, ppcell, pointopt, residual)
| Name | Type | Caption | Length | Value range |
|---|---|---|---|---|
| OEPROJI * | str | Input OrthoEngine project file | 1 - | |
| OEPROJO * | str | Output OrthoEngine project file | 1 - | |
| PTYPE * | str | Point Type | 1 - | BOTH | GCP | TP Default: BOTH |
| NUMGRID * | List[int] | Grid size for thinning | 1 - | 3 - 1000 Default: 3,5 |
| PPCELL * | List[int] | Points per cell | 1 - | 1 - 1000 Default: 1,2 |
| POINTOPT * | str | Point option | 3 - | INACT | DEL Default: INACT |
| RESIDUAL * | str | Residual calculation | 1 - | YES | NO Default: NO |
| Back to top |
OEPROJI
The name of the input OrthoEngine project file that contains the points to refine.
OEPROJO
The name of the output OrthoEngine project file.
PTYPE
The type of points in the OrthoEngine project file to thin.
NUMGRID
The number of grid cells to use when dividing the image extents for the thinning process.
The parameter is defined as follows:
NUMGRID=PARAM1, PARAM2
You can specify one or two values for this parameter.
If you specify a single value, it will be used for thinning of both GCPs and TPs (based on what you specify for PTYPE). If you specify two values, the first applies to thinning GCPs and the second applies to thinning TPs, regardless of what is specified for PTYPE.
PARAM1=3: Represents "the square image will be divided into three-by-three grid for GCP thinning".
PARAM2=5: Represents the image is divided into five-by-five grids for TP thinning.
The value entered will be used for both the x and y direction if the imagery is square. If the image is not square, the number entered will be used on the short-side of the image and the long side will be calculated automatically.
For example, if you specify 3,5, the image will be divided into a three-by-three grid for GCP thinning and a five-by-five grid for TP thinning. If you enter a single value of 5, the image will be divided into a five-by-five grid for thinning both GCPs and TPs.
Default values are 3,5
PPCELL
The number of points to retain after thinning each grid cell.
The parameter is defined as follows:
PPCELL=PARAM1, PARAM2
You can specify one or two values for this parameter.
If you specify a single value, it will be used for thinning of both GCPs and TPs (based on what you specify for PTYPE). If you specify two values, the first applies to thinning GCPs and the second applies to thinning TPs, regardless of what is specified for PTYPE.
PARAM1=1: Represents "each cell retains one GCP."
PARAM2=2: Represents "each cell retains two TP points".
Note that PARAM2 = 1,2,3,....; must be 1 or greater.
Default values are 1,2.
POINTOPT
RESIDUAL
Whether to calculate residual values during thinning.
| Back to top |
Returns: Execution status
Type: PCI_INT
| Back to top |
OEPNTTHIN removes redundant TPs and GCPs from an OrthoEngine project.
Automatic TP or GCP collection sometimes provides too many points in each image, and the point distribution may vary. OEPNTTHIN can reduce the number of points while maintaining a more consistent distribution of points across the image. This is achieved by dividing the image into a configurable number of grid cells and selecting points to retain in each grid cell.
OEPNTTHIN reduces the number of points as follows: with each grid cell, the points with the lowest connectivity (smaller number of rays) are removed, leaving the desired number of points in the cell. In this sequence, the points with the best connectivity will remain. If the you select to use residuals for thinning, the residual will also be considered. Points with the lowest connectivity and highest residuals are prioritized for removal.
OEPNTTHIN can be set up to designate the removed points as inactive, or remove them. You can manually examine the points designated inactive in OrthoEngine to decide if they should be removed.
After running OEPNTTHIN, an even distribution of points and proper number of points can be achieved. The model computation time and the error-detection effort should be reduced significantly.
| Back to top |
The following example removes both redundant GCPs and TPs. With GCP thinning, each image will be divided into three-by-three grids, with one point in each grid cell. With TP thinning, the image will be divided into five-by-five grids, with two points in each grid cell. Redundant points will be removed. Redundant points will be identified by residual calculations.
from pci.oepntthin import oepntthin oeproji = "airphoto_model.prj" oeprojo = "a.prj" ptype = "BOTH" numgrid = [3,5] ppcell = [1,2] pointopt= "INACT" residual= "YES" oepntthin (oeproji, oeprojo, ptype, numgrid, ppcell, pointopt, residual)
© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.