ConvertGeographicToMapCoordinates Task

This task converts geographic (latitude/longitude) coordinates to map (northings/eastings) 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('ConvertGeographicToMapCoordinates')

 

; Define inputs

Task.INPUT_COORDINATE = [-105.20618986,39.99754473]

Task.SPATIAL_REFERENCE = Raster.SPATIALREF

 

; Run the task

Task.Execute

Print, Task.OUTPUT_COORDINATE

Result:

482398.87 4427504.9

Syntax

Result = ENVITask('ConvertGeographicToMapCoordinates')

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 geographic coordinates in [longitude, latitude] 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

ENVI 5.2. 1

Introduced

API Version

4.2

See Also

ENVITask, ENVISubsetRaster, ENVICoordSys::ConvertLonLatToMap, ENVIStandardRasterSpatialRef::ConvertLonLatToMap, ENVIRPCRasterSpatialRef::ConvertLonLatToMap, ENVIPseudoRasterSpatialRef::ConvertLonLatToMap