The Add method lets you add ground control points (GCPs) to an ENVIGCPSet object. You can optionally use the Export method to save the modified GCP list to a new text file.

Example


; Start the application
e = ENVI()
 
; Open an existing GCP file
GCPFile = Dialog_Pickfile(TITLE='Select an ENVI .pts file')
GCPs = ENVIGCPSet(GCPFile)
 
; Add a new GCP
GCPs.Add, X=-106.3D, Y=31.8D, Z=1185.0D, COLUMN=3369.58D, $
   ROW=7025.48D, NAME='RoadIntersection'

Syntax


ENVIGCPSet.Add [, Keywords=value]

Arguments


None

Keywords


X

Set this keyword to a double-precision floating-point value representing the longitude or easting value of the GCP.

Y

Set this keyword to a double-precision floating-point value representing the latitude or northing value of the GCP.

Z (optional)

Set this keyword to a double-precision floating-point value representing the elevation (in meters) of the GCP.

COLUMN

Set this keyword to the pixel x-coordinate value of the GCP.

ROW

Set this keyword to the pixel y-coordinate value of the GCP.

NAME (optional)

Set this keyword to a string with a unique name for the GCP.

ID (optional)

Set this keyword to a integer with a unique id for the GCP.

ERROR (optional)

Set this keyword to a named variable that will contain any error message issued during execution of this routine. If no error occurs, the ERROR variable will be set to a null string (''). If an error occurs and the routine is a function, then the function result will be undefined.

When this keyword is not set and an error occurs, ENVI returns to the caller and execution halts. In this case, the error message is contained within !ERROR_STATE and can be caught using IDL's CATCH routine. See IDL Help for more information on !ERROR_STATE and CATCH.

See Manage Errors for more information on error handling in ENVI programming.

Version History


ENVI 5.1

Introduced

ENVI 5.3.1 Added the ID keyword

API Version


4.2

See Also


ENVIGCPSet