| Environments | PYTHON :: EASI :: MODELER |
| Quick links | Description :: Parameters :: Parameter descriptions :: Return Value :: Details :: Example :: Related |
| Back to top |
| Back to top |
gcpwrit(file, dbgc, tfile, gcpform, dmsform)
| Name | Type | Caption | Length | Value range |
|---|---|---|---|---|
| FILE * | str | File name of input image | 1 - | |
| DBGC * | List[int] | Input GCP segment or layer | 1 - 1 | |
| TFILE * | str | Output text file | 1 - | |
| GCPFORM * | str | Format of GCP data | 1 - 64 | 2D, 2DERR, 3D, 3DERR, BULK Default: 3D |
| DMSFORM | str | Degrees-minutes-seconds (DMS) format of longitude and latitude | 0 - 3 | ON, OFF Default: OFF |
| Back to top |
FILE
The name of the PCIDSK file that contains the GCP segment from which to read the GCP data.
DBGC
The input GCP layer or segment to read.
TFILE
The path and file name of the output text file to which to write the GCP coordinates.
For more information on the required format for the text file, see the description of the GCP format (GCPFORM) parameter.
GCPFORM
The code for the format of the input GCP data.
The codes are described as follows:
where:
DMSFORM
This parameter is ignored if vector units are not LONG/LAT.
The DMS format for latitude and longitude is as follows:
where N, S, E, and W stand for the north, south, east, and west hemispheres, respectively.
For example:
latitude: 34d01'15.1104"N longitude: 118d14'14.2080"W
| Back to top |
Returns: program execution status
Type: PCI_INT
| Back to top |
The GCPWRIT algorithm writes GCP data from a specified GCP segment or layer to a text file. The GCP data may include check-point data. To specify the format of the GCP data in the output text file, you use the GCP format (GCPFORM) and Deg/Min/Sec format (DMSFORM) parameters.
A GCP may be intended for use with georeferencing control (a "true GCP"), or it may be intended for use in assessing the accuracy of a rectification result (a "check point" or a "check-point GCP"). The data written to the output text file includes a flag value (S) that distinguishes between the two.
| Back to top |
Read GCP data from GCP segment 27 in the file "irvine.pix" and write the data to the newly created file "gcp.txt" in format "2D". Latitude and longitude values will be written as signed floating-point numbers.
from pci.gcpwrit import gcpwrit file = 'irvine.pix' dbgc = [27] tfile = 'gcp.txt' gcpform = '2D' dmsform = '' gcpwrit(file, dbgc, tfile, gcpform, dmsform)
© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.