ConvertMapToPixelCoordinates Task
This task converts map (northings/eastings) coordinates to pixel coordinates.
Example
; Start the application
e = ENVI(/HEADLESS)
; Open an input file
File = Filepath('qb_boulder_msi', Subdir=['data'], $
Root_Dir=e.Root_Dir)
Raster = e.OpenRaster(File)
; Get the task from the catalog of ENVITasks
Task=ENVITask('ConvertMapToPixelCoordinates')
; Define inputs
Task.INPUT_COORDINATE = [482399.0584,4427505.0643]
Task.SPATIAL_REFERENCE = Raster.SPATIALREF
; Run the task
Task.Execute
; Get the output coordinates
Print, Task.OUTPUT_COORDINATE
Result:
761.37946 526.21429
Syntax
Result = ENVITask('ConvertMapToPixelCoordinates')
Input parameters (Set, Get): INPUT_COORDINATE, SPATIAL_REFERENCE
Output parameters (Get only): OUTPUT_COORDINATE
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
INPUT_COORDINATE (required)
Specify array of map coordinates in [x,y] format.
SPATIAL_REFERENCE (required)
Specify an ENVIStandardRasterSpatialRef object indicating the spatial reference of the input coordinates.
Output Parameters
OUTPUT_COORDINATE
An array of pixel coordinates in [x,y] format.
Methods
Properties
Version History
|
ENVI 5.2.1 |
Introduced |
See Also
ENVITask, ENVISubsetRaster, ENVIStandardRasterSpatialRef::ConvertMapToFile, ENVIRPCRasterSpatialRef::ConvertMapToFile, ENVIPseudoRasterSpatialRef::ConvertMapToFile