This task converts pixel coordinates to map (northings/eastings) coordinates.
Example
e = ENVI(/HEADLESS)
File = Filepath('qb_boulder_msi', Subdir=['data'], $
Root_Dir=e.Root_Dir)
Raster = e.OpenRaster(File)
Task=ENVITask('ConvertPixelToMapCoordinates')
Task.INPUT_COORDINATE = [761.3780,526.1913]
Task.SPATIAL_REFERENCE = Raster.SPATIALREF
Task.Execute
Print, Task.OUTPUT_COORDINATE
Result:
482399.06 4427505.1
Syntax
Result = ENVITask('ConvertPixelToMapCoordinates')
Input properties (Set, Get): INPUT_COORDINATE, SPATIAL_REFERENCE
Output properties (Get only): OUTPUT_COORDINATE
Properties marked as "Set" are those that you can set to specific values. You can also retrieve their current values any time. Properties marked as "Get" are those whose values you can retrieve but not set.
Methods
This task inherits the following methods from ENVITask:
AddParameter
Execute
Parameter
ParameterNames
RemoveParameter
Properties
This task inherits the following properties from ENVITask:
COMMUTE_ON_DOWNSAMPLE
COMMUTE_ON_SUBSET
DESCRIPTION
DISPLAY_NAME
NAME
REVISION
TAGS
This task also contains the following properties:
INPUT_COORDINATE (required)
Specify an array of pixel coordinates in [x,y] format.
OUTPUT_COORDINATE
An array of map coordinates in [x,y] format.
SPATIAL_REFERENCE (required)
Specify an ENVIStandardRasterSpatialRef object indicating the spatial reference of the input coordinates.
Version History
API Version
4.3
See Also
ENVITask, ENVISubsetRaster, ENVIStandardRasterSpatialRef::ConvertFileToMap, ENVIRPCRasterSpatialRef::ConvertFileToMap, ENVIPseudoRasterSpatialRef::ConvertFileToMap