User's Guide

TRANSLAS

Converts between TRANSFER and LAS image files.

Function:

TRANSLAS receives input in either a TRANSFER or LAS image file format. The TRANSLAS-IN routine is used for TRANSFER to LAS conversions; whereas, TRANSLAS-OUT is for LAS to TRANSFER conversions. A TRANSFER format image is an image containing image data with or without header records.

Parameters:

Subcommand -IN:
Converts the input TRANSFER image file to a LAS format image.

INFILE
Input image. The name of the input TRANSFER image to be converted. The user may specify either one file name which contains all the bands to be converted or a separate file name can be entered for each band. If each band of the image is contained in a separate file, the number of names specified must equal the number of bands defined by NBANDS, and all files must contain the same data type. The input TRANSFER image(s) may contain BYTE, INTEGER*2, INTEGER*4, or REAL*4 data. If all the image bands are contained in one file, the image may be stored in band sequential format (BSQ) or band interleaved by line format (BIL). The user may specify a window option for each file name, but all window specifications must be the same. The user may specify a band option when converting a BIL format image. Directory paths may be specified using the host syntax or LAS syntax file naming conventions.

OUT
Output image(s). The name of the LAS image(s) to be created. The number of images specified in OUT must either be one or equal to the number of bands to be converted. If one output image was specified, all bands will be placed in that image. If multiple output images are specified, each output image will contain 1 band.

NL
Number of lines. The number of lines in the input TRANSFER image.

NS
Number of samples. The number of samples in the input TRANSFER image.

NBANDS
Number of bands. The number of bands in the input TRANSFER image being converted. If only one input image file is specified in INFILE and that file contains multiple bands, NBANDS must be the total number of bands in the image.

NHEADER(0)
Number of header bytes. The number of bytes that will be skipped in the input TRANSFER image and will not be translated to the LAS image.

IDTYPE(BYTE)
Input data type. The data type of INFILE.


  = BYTE: BYTE     (8-bit unsigned integer)
  = I*2: INTEGER*2 (16-bit signed integer)
  = I*4: INTEGER*4 (32-bit signed integer)
  = R*4: REAL*4    (32-bit signed real)

ODTYPE(SAME)
Output data type. The data type of the output LAS image. If SAME is entered the output image will be created with the same data type as IDTYPE. If each band of the output image is input from a separate file, all bands must be of the same data type.


  = SAME: Same as IDTYPE
  = BYTE: BYTE     (8-bit unsigned integer)  
  = I*2: INTEGER*2 (16-bit signed integer)
  = I*4: INTEGER*4 (32-bit signed integer)
  = R*4: REAL*4    (32-bit signed real)

BFORM(BSQ)
Band format. The format of the data in the TRANSFER image. If the image has more than one band, the data will be read from the TRANSFER image either in band sequential or band interleaved by line format.


  = BSQ:  Band sequential
  = BIL:  Band interleaved by line.
Subcommand -OUT:
Converts the input LAS image to a TRANSFER image file.

IN
Input image. The LAS image to be converted may be a single or multi-band image. Multiple image strings, windowing and band specifications are allowed. The image to be converted may contain BYTE, INTEGER*2, INTEGER*4, or REAL*4 data.

OUTFILE
Output image. The name of the output TRANSFER image to be created. The user may specify either one file name to contain all the bands of the output image or a separate file name can be entered for each band. If each band of the image is to be contained in a separate file, the number of names specified must equal the number of bands to be processed from the input LAS image. If all image bands are to be contained in one file, they will be written in either band sequential format (BSQ) or band interleaved by line format (BIL) as specified in BFORM. If a separate file is used for each band, they will be written in BSQ. The output TRANSFER image will be the same data type as as the input LAS image. Directory paths may be specified using the host computer file naming conventions.

BFORM(BSQ)
Band format. The format in which the input LAS image data is to be stored in the TRANSFER image. If the LAS image has more than one band and the data is to be stored in one TRANSFER image, the data will be stored in either band sequential or band interleaved by line format.


  = BSQ:  Band sequential
  = BIL:  Band interleaved by line.

Examples:

  1. LAS> translas-in infile="/sg2/example/temp/d.file" out="[sg1.example]redbarn" nl=512 ns=512 nbands=3

    The TRANSFER image file, D.FILE, is located in the directory /SG2/EXAMPLE/TEMP which is specified in host syntax. D.FILE is a 512 x 512, three-band image containing BYTE data. D.FILE is converted to the corresponding LAS image name REDBARN located in [SG1.EXAMPLE] directory in BSQ format.

  2. LAS> translas-in infile=(d.red d.green d.blue) out=redbarn nl=512 ns=512 nbands=3 odtype=i*4

    The headerless TRANSFER image files D.RED, D.GREEN, and D.BLUE are converted to the LAS image file REDBARN. All three input files contain BYTE data. The output image will be a 512 x 512, three-band image. Bands 1, 2, and 3 of the output image will be output data type INTEGER*4 data.

  3. LAS> translas-in infile="[sg1.example.temp]d.file(100,200,500,512:1,3)" out="out1 + out2" nl=1024 ns=1024 nbands=6 bform=bil

    A 500 x 512 window will be copied from the TRANSFER image file, D.FILE, starting at line 100, sample 200. D.FILE is located in directory [SG1.EXAMPLE.TEMP], which is specified in LAS syntax. Band 1 will be copied to OUT1 and band 3 will be copied to OUT2. D.FILE is a 1024 x 1024, 6 band image in BIL format.

  4. LAS> translas-out in="redbarn + whtbarn" outfile="/dg6/example/temp/d.file" bform=bil

    All bands of the LAS images REDBARN and WHTBARN are converted to TRANSFER image file D.FILE in band interleaved by line format. D.FILE will be located in the directory /DG6/EXAMPLE/TEMP. The size, number of bands, and the data type of the TRANSFER image will be the same as those of the input images.

  5. LAS> translas-out in="redbarn(1,1,512,512:2,3,4)" outfile=(d.red d.green d.blue)

    A 512 x 512 window starting at line 1 and sample 1 of bands 2, 3 and 4 of the LAS image REDBARN.DAT is converted to the TRANSFER image files D.RED, D.GREEN, and D.BLUE, respectively. The TRANSFER image will be the same data type as the LAS input image.

Description/Algorithm:

TRANSLAS-IN converts TRANSFER image files, with or without headers, to a LAS format image. The bands for the input can reside all in one TRANSFER file in either band sequential format or band interleaved by line format, or in separate TRANSFER files one per band. The user must input the image characteristics such as number of lines, number of samples, number of bands, and the data type of the image. If one file contains multiple bands, then band format may be entered. The input image may contain BYTE, INTEGER*2, INTEGER*4, or REAL*4 data. If the input image contains headers, the entered number of header bytes is skipped on image conversion.

TRANSLAS-OUT converts LAS image files used in the LAS system to TRANSFER image files that contain data with no headers. The user may specify a subset of bands and/or a window to be processed. The input image may contain BYTE, INTEGER*2, INTEGER*4, or REAL*4 data. All bands of the output TRANSFER image may be written to the same file, or each band may be written to separate files. Band sequential or band interleaved by line format may to used to convert multiple bands to one TRANSFER image file.

Nonfatal Error Messages:

  1. [translas-dkfree] Error freeing disk space

    Excess software reserved disk space was not freed after the TRANSFER file was closed. Contact system manager when this error occurs.

  2. [translas-warn] Nonfatal error encountered

    A nonfatal error was encountered during processing. The message that is displayed immediately preceding this message is the specific error that was encountered. Processing continues.

  3. [translas-number] Too many <xxxxx> specified

    Too many lines/samples were specified. The window size is reset to include all of the remaining lines/samples.

Fatal Error Messages:

  1. [translas-alloc] Error allocating dynamic memory

    An error occurred while allocating dynamic memory for processing. Rerun the function. If the error reoccurs, notify the system manager.

  2. [translas-disk] Error searching for disk space

    An error occurred while searching for disk space. Rerun the function. If the error reoccurs, notify the system manager.

  3. [translas-dkcre] The TRANSFER file already exists

    The output TRANSFER image file currently exists under the current directory. Rerun the function using unique output file names.

  4. [translas-eof] Unexpected EOF encountered

    An unexpected EOF was encountered reading the input file. Verify that the values for NBANDS, NL, and NS were entered correctly.

  5. [translas-fatal] Fatal error encountered

    A fatal error was encountered during processing. Processing is terminated. The message that is displayed immediately preceding this error message is the specific error that was encountered.

  6. [translas-header] Error reading header record of input image

    Unable to read the specified header. Verify that the value for NHEADER is correct.

  7. [translas-inopen] Error opening input TRANSFER image <xxxxx>

    An error occurred while opening the specified input TRANSFER image file <xxxxx>. Verify that the specified input file exists.

  8. [translas-names] Error specifying number of TRANSFER files

    The number of TRANSFER file names (OUTFILE or INFILE) must either be 1 (indicating the same file for all bands of the image) or the number of file names must equal the number of bands in the LAS image (indicating a separate file for each band). No other combinations are allowed.

  9. [translas-out] Number of output images must equal number of bands

    If more than one output image is specified, the number of output images must equal the number of bands specified. Respecify OUT and/or the band specification so that the number of output images is equal to the number of bands specified. If no band specification was given, verify that the number of output images is equal to NBANDS.

  10. [translas-outopen] Error opening output TRANSFER image

    An error occurred while creating the output TRANSFER image. Verify that the current working directory has the correct privileges.

  11. [translas-parse] Input image parse was unsuccessful.

    An error occurred while trying to parse the window and/or band specification for INFILE. Verify that the specification follows LAS standards.

  12. [translas-read] Error reading input TRANSFER image

    An error occurred while trying to read data from the input TRANSFER image specified. Verify that image characteristics are correct.

  13. [translas-size] Input images do not have the same window size

    Input images must have the same window size. When using multiple input images, all of the images must be the same size. Check the size of the images and specify windows as necessary.

  14. [translas-start] Starting <xxxxx> must be less than total <xxxxx>

    The starting line/sample must be less than the total lines/samples. Use another starting line/sample that is less than the total number of lines/samples.

  15. [translas-write] Error writing output TRANSFER image

    An error occurred while trying to write data to the output TRANSFER image specified. Verify that there is disk space.

  16. [translas-wind] <xxxxx> must be positive

    The starting line, starting sample, number of lines, and number of samples in the window specification must be positive. Verify that the window specification contains no negative values.

User Notes:

  1. TRANSFER images containing BYTE data may be transferred to a system other than the one on which they were created.

  2. TRANSFER images containing INTEGER*2 or INTEGER*4 data may be transferred to a system other than the one they were created on as long as the byte ordering scheme of the target system is the same as that of the original system. If it is not, the transfer mechanism must provide a method for byte swapping the data.

  3. TRANSFER images containing REAL*4 data should not be transferred to other systems due to differences in how systems store real numbers.