NEWGCP

Update GCPs with transformation


EnvironmentsPYTHON :: EASI
Quick linksDescription :: Parameters :: Parameter descriptions :: Details :: Example :: Related

Back to top

Description


Reads a ground control point (GCP) segment from a PCIDSK file and extracts the forward and inverse transformations. These transformations are then used to calculate a new set of GCPs, which will be placed in the output file. Normally, IMGFUSE is used to automate the entire fusion process.
Back to top

Parameters


newgcp(fili, dbseg, dbsn, dbsd, filo)

Name Type Caption Length Value range
FILI * str Input file name 1 -    
DBSEG * List[int] Input segment number 1 -    
DBSN * str Output segment name 1 - 8  
DBSD str Output segment description 0 - 64  
FILO * str Output file name 1 -    

* Required parameter
Back to top

Parameter descriptions

FILI

Specifies the name of the PCIDSK file that contains the transformation segment.

DBSEG

Specifies the number of the transformation text segment from the input file (FILI).

DBSN

Specifies a name (up to 8 characters) for the output GCP segment.

DBSD

Describes (in up to 64 characters) the contents or origins of the output GCP segment.

FILO

Specifies the name of the PCIDSK file to receive the new output GCP segment.

Back to top

Details

NEWGCP reads a ground control point (GCP) segment from a PCIDSK file and extracts the forward and inverse transformations. NEWGCP is mainly used to create a new GCP segment that will allow a transformation of the image with REG.

NEWGCP loads in the forward and backward transformation matrices. The new GCP points are then saved to a GCP segment in the output file (FILO). Currently, only the backward transformation matrix is used. Using REG and specifying the new GCP segment, the image may be transformed back to its original coordinates.

NEWGCP expects to read in a text segment with the 3x3 transformation matrices in the following order:

This function should be used with TRANSFRM to convert the text segment (DBSEG) used in NEWGCP to the correct format.

Typically, IMGFUSE is used to automate the entire fusion process.

Back to top

Example

Using text segment number 7 (DBSEG) generated by TRANSFRM and placed in FILI (p2.pix), calculate the new GCPs to perform a backward transformation. Save the new GCP segment in eltoro.pix, in a new segment.

from pci.newgcp import newgcp

fili	=	"p2.pix"
dbseg	=	[7]	# use text segment 7
dbsn	=	'GCP_seg'	# new GCP segment name
dbsd	=	'GCP segment to inverse transform this image'	# segment description
filo	=	'eltoro.pix'	# file to receive new GCP segment

newgcp( fili, dbseg, dbsn, dbsd, filo )

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