Welcome to the Harris Geospatial product documentation center. Here you will find reference guides, help documents, and product libraries.


Harris Geospatial / Docs Center / ENVI API / ENVI Classic Data Control / ENVI_CONVERT_FILE_COORDINATES

ENVI_CONVERT_FILE_COORDINATES

ENVI_CONVERT_FILE_COORDINATES

This routine has been replaced by ENVIConvertGeographicToMapCoordinatesTask and ENVIConvertMapToGeographicCoordinatesTask.

Use this procedure to convert x,y pixel coordinates to their corresponding map coordinates, and vice-versa, for a given file.

Syntax


ENVI_CONVERT_FILE_COORDINATES, FID, XF, YF, XMap, YMap [, /TO_MAP]

Arguments


FID

Use this argument to specify a named variable that contains the file ID for the open file. The file ID is used to get the appropriate projection information for the conversion. If the file does not have an associated projection, the file coordinates and map coordinates are equal. This value is returned from the keyword R_FID in the ENVI_OPEN_FILE procedure. FID is a long integer with a value greater than 0. An invalid file ID has a value of -1.

XF

If you set the TO_MAP keyword, XF is a variable that contains the x file coordinates to convert. XF can be a single value or an array of values. The first file coordinate is 0.

If you do not set the TO_MAP keyword, XF is a named variable that contains the returned x file coordinates for the input XMap and YMap arrays.

YF

If you set the TO_MAP keyword, YF is a variable that contains the y file coordinates to convert. YF can be a single value or an array of values. The first file coordinate is 0.

If you do not set the TO_MAP keyword, YF is a named variable that contains the returned y file coordinates for the input XMap and YMap arrays.

XMap

If you set the TO_MAP keyword, XMap is a named variable that contains the returned x map coordinates for the input XF and YF arrays

If you do not set the TO_MAP keyword, XMap is a variable that contains the x map coordinates to convert. XMap can be a single value or an array of values.

YMap

If you set the TO_MAP keyword, YMap is a named variable that contains the returned y map coordinates for the input XF and YF arrays

If you do not set the TO_MAP keyword, YMap is a variable that contains the y map coordinates to convert. YMap can be a single value or an array of values.

Keywords


TO_MAP (optional)

Set this keyword to convert the input file coordinates to map coordinates.

Example


The following code converts the first three pixels on the first line to map coordinates.

xf = [0,1,2]
yf = [0,0,0]
envi_convert_file_coordinates, fid, xf, yf, xmap, ymap, /to_map



© 2017 Exelis Visual Information Solutions, Inc. |  Legal
My Account    |    Buy    |    Contact Us