This task generates ground control points (GCPs) for an input raster by matching and using the geographic coordinates of a reference image. The elevation values of GCPs are calculated from a DEM raster. The input raster must have an RPC spatial reference.
            You can use the resulting GCPs in ENVI applications such as RPC Orthorectification, Image-to-Map Registration, DEM Extraction,  and Rigorous Orthorectification.
            Note: Use the RPCOrthorectificationUsingReferenceImage task to generate GCPs and to perform refined RPC Orthorectification in one step.
            Example
            This example uses sample images from the RPC Orthorectification tutorial. Tutorial files are available from our ENVI Tutorials web page. Click the RPC Ortho link to download the .zip file to your machine, then unzip the files. Update the file references in the example with the correct locations.
            
            e = ENVI()
             
            
            inputFile = 'OrbViewSubset.dat'
            inputRaster = e.OpenRaster(inputFile)
             
            
            
            
            referenceFile = 'NAIPReferenceImage.dat'
            referenceRaster = e.OpenRaster(referenceFile)
             
            
            DEMFile = 'DEM.dat'
            DEMRaster = e.OpenRaster(DEMFile)
             
            
            Task = ENVITask('GenerateGCPsFromReferenceImage')
             
            
            Task.INPUT_RASTER = inputRaster
            Task.INPUT_REFERENCE_RASTER = referenceRaster
            Task.INPUT_DEM_RASTER = DEMRaster
             
            
            Task.Execute
             
            
            Print, Task.OUTPUT_GCPS
            The GCPs are written to a .pts file in your system's temporary directory.
            Syntax
            Result = ENVITask('GenerateGCPsFromReferenceImage')
            Input parameters (Set, Get): DEM_IS_HEIGHT_ABOVE_ELLIPSOID, INPUT_DEM_RASTER, INPUT_RASTER, INPUT_REFERENCE_RASTER, OUTPUT_GCPS_URI, REQUESTED_NUMBER_OF_GCPS, SEARCH_WINDOW
            Output parameters (Get only): OUTPUT_GCPS
            Parameters marked as "Set" are those that you can set to specific values. You can also retrieve their current values any time. Parameters marked as "Get" are those whose values you can retrieve but not set.
            Input Parameters
            DEM_IS_HEIGHT_ABOVE_ELLIPSOID (optional)
            Set this parameter to true if the DEM is already expressed as the height above the ellipsoid and no geoid correction is required. Most DEM data contain orthometric heights, which are elevations above mean sea level (for example, GMTED2010 or National Elevation Dataset, NED). In these cases, keep the default selection of false.
            INPUT_DEM_RASTER (required)
            Specify a digital elevation model (DEM) raster. The elevation values of GCPs are calculated using the DEM raster. If you do not have a DEM file readily available, you can use the Global Multi-resolution Terrain Elevation Data 2010 (GMTED2010) DEM named GMTED2010.jp2 that is provided under the ENVI installation folder. The GMTED2010 dataset has a mean resolution of 30 arc seconds. However, for best results, you should use a DEM raster with a higher resolution than GMTED2010. Many DEM products are available from the U.S. Geological Survey National Map and Download Platform or EarthExplorer.
            INPUT_RASTER (required)
            Specify a raster on which to generate GCPs.
            INPUT_REFERENCE_RASTER (required)
            Specify a reference image from which to match and find the geographic coordinates of the GCPs. The reference raster should be a true orthorectified image with the same or slightly higher spatial resolution than the input raster. Try to choose a reference image that is close to the year and season of the input raster. Automatic GCP generation is based on image matching between the reference image and source image, so the scene contents should not be vastly different. Automatic GCP generation is more robust if the reference image and input image have similar resolution. If the reference image has a much higher resolution than the input image (i.e., the ratio is greater than 2.5), consider down-sampling the reference image first.
            OUTPUT_GCPS_URI (optional)
            Specify a string with the fully qualified path and filename for OUTPUT_GCPS.
            REQUESTED_NUMBER_OF_GCPS (optional)
            Specify the requested number of GCPs. The default value is 25. After ENVI generates and filters tie points (used to create GCPs) for radiometric and geometric criteria, the actual number of generated GCPs may be less than requested.
            SEARCH_WINDOW (optional)
            Specify the search window size. Increase the value if there is a big misalignment between the input raster and the reference raster.
            Output Parameters
            OUTPUT_GCPS
            This is a reference to the output ENVIGCPSet associated with the input raster.
            Methods
            Execute             
            Parameter             
            ParameterNames
            
            Properties
            DESCRIPTION             
            DISPLAY_NAME
            
             NAME
            
             REVISION
            
             TAGS
            
            Version History
            
                                 
                                 
                                     
                        | ENVI 5.3. 1 | Introduced | 
                     
                        | ENVI 5.4.2 | Added the SEARCH_WINDOW parameter | 
                 
            
            See Also
            ENVITask, GenerateGCPsFromTiePoints Task, RPCOrthorectificationUsingReferenceImage Task, ENVIGCPSet, ENVITiePointSet, RPCOrthorectification Task