User's Guide

RESAMPLE

Geometric rectification program with optional terrain correction

Function:

Performs the geometric rectification and (optionally) terrain correction of an image as specified by a previously generated mapping grid and elevation model. It uses POSIX pthreads to perform the rectification using multiple processors. Resampling is accomplished using nearest neighbor interpolation, parametric cubic convolution interpolation, bilinear interpolation, or a user-entered table of resampling weights. Terrain correction is supported for TM-P, MSS-P, MSS-X, and "nonstandard" products. Nonstandard images are those not defined by the first three product types and are handled by rough assumptions regarding the satellite information.

Parameters:

Subcommand -GRID:
Resample image based on supplied transformation grid.

IN
Input image. The input image is a single- or multi-band file with any data type. Windowing is not allowed in the image specification. (Windowing is described in the WINDOW parameter.) Band specifications are allowed.

OUT
Output image. The output image is a single- or multi-band file. The output image size is defined by the geometric mapping grid and the input window specification or the output window specification.

INRWT(--)
Input resampling weight table file. A file containing an externally generated table of resampling weights. This parameter is required when RESAMP=TABLE. It is ignored for all other resampling methods.

DEM(--)
Elevation image. This image provides the information necessary to perform the terrain correction. It is expected to be the same size and in the same projection as the non-windowed output image. If it is not the same size, any reference to data outside the elevation image, will return the image's minimum elevation value. If no image is given, terrain correction does not take place.

BACKGRND(0.)
Fill value. The pixel value used in the output image for pixels that do not have a mapping to the input image. If nonstandard image warping is being conducted, this value is also passed to IMGCORNER as the input image's fill value so that it can determine the proper line/sample positions of the image corners.

INTLIM(--)
Interpolation limits. The minimum and maximum intensity allowed as a result of resampling. INTLIM defaults to the maximum range for the output image data type used.

ODTYPE(SAME)
Output data type. The data type of the output image.


  = SAME:  Same as input.
  = 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)

IMGTYPE(TM-P)
Input image type. The type of LANDSAT data being processed. This is only needed for terrain correction.

  = TM-P:     Thematic Mapper Level P 
  = MSS-P:    Multispectral Scanner Level P
  = MSS-X:    Multispectral Scanner Level X
  = NONSTAND: Nonstandard image data

SATNUM(5)
Landsat satellite number. Identification number for the Landsat satellite that acquired the image. This is only needed for terrain correction. Only Landsat 1 through 5 are presently supported.

RESAMP(CC)
Resampling method. Pixel values in the output image are determined by finding the corresponding location in the input image. The pixel location in the input image is a floating point value, i.e., it can fall between pixels. A method of interpolating a brightness value for that pixel location is therefore needed.


  = NN:     Nearest neighbor.  Nearest neighbor interpolation uses the
            brightness value of the pixel closest to the calculated
            floating point pixel position.

  = BI:     Bilinear.  Bilinear interpolation uses a 2 x 2 block of
            input pixels which surround the calculated floating point
            pixel position to determine the output pixel brightness 
            value.

  = CC:     Cubic convolution.  Cubic convolution interpolation uses a
            4 x 4 block of input pixels which surround the calculated 
            floating point pixel position to determine the output pixel
            brightness value.

  = TABLE:  Table-based.  Table-based resampling uses a N x M block of
            input pixels which surround the calculated floating point
            pixel position to determine the output pixel brightness value.
            The dimensions N and M, as well as the resampling kernel
            (resampling weights), are contained in the user-entered file
            of resampling weights.  See User Note 1 and 4 for more
            information.

PCCALPHA(-0.5)
Parametric cubic convolution alpha parameter. Commonly used values are -1.0 and -0.5; values -3.0 through 3.0 produce reasonable results. Other values may cause unpredictable results but are permitted for experimental purposes. PCCALPHA is valid when RESAMP is CC. It is ignored for all other resampling methods.

NTHREADS(--)
Number of threads. The number of processes or threads used to perform the rectification computations. By default, this is half of the CPUs in the machine. See User Note 6 for more information.

CACHESZ(64)
Input cache size. The maximum amount of memory (in megabytes) to use for the input image cache(s). Increasing this value above the default will generally improve performance since the program may not have to read from disk as often. See User Note 7 for more information.

BUFLINES(1000)
The number of input image lines to buffer. Increasing this value will generally improve performance by reducing the number of times processing must be interrupted in order to read more of the input image. This is especially true if the grid is curved enough to require significant overlaps between successive reads.

FULLBUF(NO)
Output image buffer flag. Flag denoting whether to attempt to buffer the entire output image so that it can be written in one step. See User Note 7 for efficiency considerations regarding image buffering. The default is to not do full output image buffering for grid-based resampling and to do full buffering for pixel-based (-NOGRID) resampling. The defaults are based on the idea that grid-based resampling is typically applied to "quasi-linear, well-behaved" transformations, whereas pixelbased resampling is often used for those other cases where the mapping may be highly curved, possibly containing breaks and singularities which make it difficult to ensure efficient completion of the output image based on partial image reads/writes.

INGRID
Input grid file. The geometric mapping grid file contains output line and sample coordinates and their corresponding positions in the input image.

GRIDFLG(YES)
Grid flag. Flag to determine whether grid correctness should be checked. This option may be useful with certain global projections where grid wrapping occurs. If grid checking is not done, invalid data may be produced.

  = YES:  Check for grid correctness
  = NO:   Do not check for grid correctness

WINDOPT(OUT)
Window option. The rectangular image window to be transformed may be specified either in terms of the input image or the output image.


  = IN:   Input window.
  = OUT:  Output window.

If OUT is specified, the window coordinates are used directly to select the desired region of the geometric mapping grid. The output window coordinates are relative to the coordinates used to define the mapping grid.

If IN is specified, output image position is determined by the input window and the output image size is determined by the geometric mapping grid.

WINDOW(--)
Window specification. The values specifying the upper-left corner of the image window and its size (in lines/samples). By default, the entire image is processed according to values contained in the geometric mapping grid and WINDOPT is ignored.
Subcommand -NOGRID:
Resample image using projection transformations.

IN
Input image. The input image is a single- or multi-band file with any data type. Windowing is not allowed in the image specification. (Windowing is described in the WINDOW parameter.) Band specifications are allowed.

OUT
Output image. The output image is a single- or multi-band file. The output image size is defined by the geometric mapping grid and the input window specification or the output window specification.

INRWT(--)
Input resampling weight table file. A file containing an externally generated table of resampling weights. This parameter is required when RESAMP=TABLE. It is ignored for all other resampling methods.

DEM(--)
Elevation image. This image provides the information necessary to perform the terrain correction. It is expected to be the same size and in the same projection as the non-windowed output image. If it is not the same size, any reference to data outside the elevation image, will return the image's minimum elevation value. If no image is given, terrain correction does not take place.

BACKGRND(0.)
Fill value. The pixel value used in the output image for pixels that do not have a mapping to the input image. If nonstandard image warping is being conducted, this value is also passed to IMGCORNER as the input image's fill value so that it can determine the proper line/sample positions of the image corners.

INTLIM(--)
Interpolation limits. The minimum and maximum intensity allowed as a result of resampling. INTLIM defaults to the maximum range for the output image data type used.

ODTYPE(SAME)
Output data type. The data type of the output image.


  = SAME:  Same as input.
  = 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)

IMGTYPE(TM-P)
Input image type. The type of LANDSAT data being processed. This is only needed for terrain correction.

  = TM-P:     Thematic Mapper Level P 
  = MSS-P:    Multispectral Scanner Level P
  = MSS-X:    Multispectral Scanner Level X
  = NONSTAND: Nonstandard image data

SATNUM(5)
Landsat satellite number. Identification number for the Landsat satellite that acquired the image. This is only needed for terrain correction. Only Landsat 1 through 5 are presently supported.

RESAMP(CC)
Resampling method. Pixel values in the output image are determined by finding the corresponding location in the input image. The pixel location in the input image is a floating point value, i.e., it can fall between pixels. A method of interpolating a brightness value for that pixel location is therefore needed.


  = NN:     Nearest neighbor.  Nearest neighbor interpolation uses the
            brightness value of the pixel closest to the calculated
            floating point pixel position.

  = BI:     Bilinear.  Bilinear interpolation uses a 2 x 2 block of
            input pixels which surround the calculated floating point
            pixel position to determine the output pixel brightness 
            value.

  = CC:     Cubic convolution.  Cubic convolution interpolation uses a
            4 x 4 block of input pixels which surround the calculated 
            floating point pixel position to determine the output pixel
            brightness value.

  = TABLE:  Table-based.  Table-based resampling uses a N x M block of
            input pixels which surround the calculated floating point
            pixel position to determine the output pixel brightness value.
            The dimensions N and M, as well as the resampling kernel
            (resampling weights), are contained in the user-entered file
            of resampling weights.  See User Note 1 and 4 for more
            information.

PCCALPHA(-0.5)
Parametric cubic convolution alpha parameter. Commonly used values are -1.0 and -0.5; values -3.0 through 3.0 produce reasonable results. Other values may cause unpredictable results but are permitted for experimental purposes. PCCALPHA is valid when RESAMP is CC. It is ignored for all other resampling methods.

NTHREADS(--)
Number of threads. The number of processes or threads used to perform the rectification computations. By default, this is half of the CPUs in the machine. See User Note 6 for more information.

CACHESZ(64)
Input cache size. The maximum amount of memory (in megabytes) to use for the input image cache(s). Increasing this value above the default will generally improve performance since the program may not have to read from disk as often. See User Note 7 for more information.

BUFLINES(1000)
The number of input image lines to buffer. Increasing this value will generally improve performance by reducing the number of times processing must be interrupted in order to read more of the input image. This is especially true if the grid is curved enough to require significant overlaps between successive reads.

FULLBUF(YES)
Output image buffer flag. Flag denoting whether to attempt to buffer the entire output image so that it can be written in one step. See User Note 7 for efficiency considerations regarding image buffering. The default is to not do full output image buffering for grid-based resampling and to do full buffering for pixel-based (-NOGRID) resampling. The defaults are based on the idea that grid-based resampling is typically applied to "quasi-linear, well-behaved" transformations, whereas pixelbased resampling is often used for those other cases where the mapping may be highly curved, possibly containing breaks and singularities which make it difficult to ensure efficient completion of the output image based on partial image reads/writes.

INPROJ
Input projection definition file. This file contains projection-related information describing the output image projection. INPROJ can contain more than one set of projection parameters. OPROJKEY specifies the projection to be used. If there are two sets of projection parameters with the same projection key, the first one is used.

INPROJ is generated by PROJPRM. A description of the file may be found in the LAS Programmer's Manual. INPROJ is a labeled table file - the format has limited flexibility. It must have attributes of PROJKEY, PROJTYPE, PROJZONE, PROJUNITS, PROJSPH, and PROJPARMS.

OPROJKEY(--)
Output projection key. The key of the projection system in INPROJ which describes the output coordinate system. When the null value is given, the first set of projection parameters in INPROJ is used.

COORS(--)
Coordinates. These coordinates are used to define the frame of the output area. Coordinates are entered as Y (latitude or northing), and X (longitude or easting). Three modes of processing are possible:


o  When four values are specified and COORUNIT = DMS, RAD, SEC, or DEG,
   the upper-left corner and lower-right corner of a geographic input
   space are defined.  These corner coordinates, along with the pixel
   dimensions, make up the framing parameters.  The framing parameters
   are projected into the specified output projection space, and minimums
   and maximums in X and Y are recorded along the borders of the projected
   space.  These minimums and maximums are used to define the boundaries
   of the output space.

o  When four values are specified and COORUNIT = PRO, a coordinate
   somewhere within the output space frame and the lower-right corner
   coordinate in the output projection space are given.  The first
   coordinate is paired with the LSCOOR parameter and is adjusted
   internally to pixel 1,1.  These coordinates are the minimum and
   maximums in X and Y and are used to define the boundaries of the output
   space.

o  When two values are specified and COORUNIT = PRO, a coordinate
   somewhere within the output space frame is given.  This coordinate is
   paired with the LSCOOR parameter to determine the upper-left corner
   coordinate in the output space.  This mode of processing requires that
   NL and NS are also given.  When the NL and NS values are combined with
   the PIXSIZ parameter, the lower-right corner of the output space
   projection can be found, giving minimum and maximum coordinates in X
   and Y, thereby defining the boundaries of the output space.

PIXSIZ(--)
Pixel dimensions. PIXSIZ defines the dimension of each pixel in the transformed (output) coordinate space. The first value is the dimension in the line (Y) direction, and the second value is the dimension in the sample (X) direction.

COORUNIT(DEG)
Coordinate units. The type of units in which COORS are entered.


  = DMS: Deg Min Sec
  = RAD: Radians
  = DEG: Degrees
  = SEC: Seconds
  = PRO: Projection coordinates in output space

LSCOORS(1,1)
Line/sample coordinates. The image coordinates of the first coordinate pair entered in COORS when projection parameters are being specified directly. The default is to the upper-left corner of the output image space (1,1).

NL(--)
Number of lines. The number of lines in the output area, specified when only the first projection coordinate pair is given in COORS.

NS(--)
Number of samples. The number of samples in the output area, specified when only the first projection coordinate pair is given in COORS.

Examples:

  1. LAS> resample-grid in=inimage ingrid=map out=outimage

    The geometric mapping grid file MAP;GRID is used to reproject INIMAGE to OUTIMAGE. Cubic convolution with an alpha parameter of -0.5 is the resampling method used (by default). Since a window was not specified, the output image size is determined by the geometric mapping grid. By default, the process will use a number of threads equal to half the number of CPUs on the system.

  2. LAS> resample-grid in=inimage(:2) ingrid=map out=outimage window=(1,1,512,512) resamp=bi fill=255.0

    Band 2 of INIMAGE will be reprojected to OUTIMAGE. An output window of (1,1,512,512) limits the output image to 512 lines by 512 samples. Bilinear interpolation resampling is used and all fill areas are set to 255.0.

  3. LAS> resample-grid in=inimage ingrid=map out=outimage imgtype="mss-x" dem=elev windopt=in window=(1,1,256,256) resamp=nn nthreads=4

    INIMAGE is reprojected to OUTIMAGE using MAP;GRID. Terrain correction will be applied using the elevation data from ELEV. The first 256 lines and 256 samples of the input image will be mapped. The output image size is determined by the mapping grid. Nearest neighbor interpolation is used. The input image is an MSS-X scene. The process will be divided between four threads.

  4. LAS> resample-grid in=inimage ingrid=map out=outimage dem=elev window=(1,1,512,512) resamp=table inrwt=wgt;tab gridflg=no

    INIMAGE is reprojected to OUTIMAGE using the mapping grid MAP;GRID and table-based resampling. The user-entered table of resampling weights is contained in WGT;TAB. The output image size will be 512 lines by 512 samples. This is the method of operation used when applying a restoration kernel to an image. No grid-wrapping check is performed on the image.

  5. LAS> resample-nogrid in=inimage(:1,3) out=outimage inproj=test oprojkey=goodes coors=(90,-180,60,0) nthreads=2

    Bands 1 and 3 of INIMAGE are reprojected to OUTIMAGE using pixel-based resampling. The input projection information is taken from INIMAGE;DDR, and the output projection information is taken from the GOODES projection key within TEST;PROJ. The output window covers the latitude range 60 to 90 degrees and the longitude range -180 to 0 degrees. The resampling process will be distributed between 2 threads.

Description/Algorithm:

The geometric rectification process for grid-based resampling is performed using a geometric mapping grid to provide the warping parameters. For pixel-based resampling, the projection transformation process is applied for every output pixel. Optionally, a digital elevation model (DEM) of the output image space is used to correct displacement errors due to the terrain. This program uses a mathematical model of the LANDSAT Thematic Mapper and Multispectral Scanner instruments to calculate the displacement errors for TM-P, MSS-P, MSS-X, or nonstandard data (data with an irregular number of lines/samples and fill space).

Four different methods are provided for specifying the output space frame:

  Method 1:

     o  The user defines the upper-left and lower-right corner
        coordinates of the area of interest in geographic
        coordinates.  This forms a rectangle in geographic
        coordinates.

     o  This rectangular space is projected into the output
        projection coordinate system.  This usually results in
        a non-rectangular area.

     o  The boundaries of this projected area are searched for
        minimum and maximum X and Y coordinates in the output
        projection coordinate system.  This forms a minimum
        bounding rectangle in the output space of the area of
        interest.

     o  The upper-left corner (the minimum X, maximum Y) is
        adjusted outward to the next X and Y multiples of the
        pixel size.  This is an arbitrary step which simplifies
        the combining of images with different scales.  It does
        not alter the internal image geometry, it only slightly
        adjusts the size of the image frame.

     o  The upper-left corner projection coordinate is assigned
        to image coordinate (1,1).


  Method 2:

     o  The user defines:

        a.  An output space projection coordinate at some image
            coordinate defined by LSCOOR.  When LSCOOR defaults
            to image coordinate (1,1), the output space
            coordinate given is the upper-left corner of the
            output space.
        b.  The lower-right corner in the output projection
            space.

     o  RESAMPLE adjusts the first coordinate given to image
        coordinate (1,1) to get the minimum X and the maximum Y
        projection coordinate.  The second coordinate pair given
        is the maximum X and the minimum Y coordinate.  The
        output space is now defined.


  Method 3:

     o  The user defines an output space projection coordinate
        at some image coordinate defined by LSCOOR, as in Method
        2.

     o  The user enters the number of output image lines and
        samples.

     o  The coordinate entered is adjusted to image coordinate
        (1,1) to get the minimum X and the maximum Y projection
        coordinates.

     o  The maximum X and minimum Y coordinates are calculated
        using PIXSIZ and the number of lines and samples from
        the minimum X and maximum Y projection coordinate.

   Method 4:

     o  When COORS is NULL, the input image DDR is used.  Image
        windows maybe used with this method.

     o  The projection coordinates of the input image corners
        are transformed into output space coordinates and the
        minimum and maximum projection coordinates are
        determined, forming a minimum bounding rectangle in
        the output space.

     o  The upper-left corner (the minimum X, maximum Y) is
        adjusted outward to the next X and Y multiples of the
        pixel size.  This is an arbitrary step which simplifies
        the combining of images with different scales.  It does
        not alter the internal image geometry; it only slightly
        adjusts the size of the image frame.

     o  The upper-left corner projection coordinate is assigned
        to image coordinate (1,1).

        (The user has little control over the output image framing
         parameters with this method, but this method is the most
         automatic.)

To determine the position of the nadir pixels (which form a line that approximately halves the image data and is used in terrain correction), calculations are performed using the image's scene center latitude and its number of lines, samples, and shift value. For standard TM-P, MSS-P, and MSS-X images, these values are constant. However, for nonstandard image data where these values are unknown, a different algorithm is needed to calculate nadir:

        o IMGCORNER is called to find the corners of the image data
          in line and sample.

        o Using this data, the slope and intercept of the nadir line
          which halves the image data is calculated.

        o From there, the values of the nadir pixels can be calculated
          using a form of the equation  y = mx + b.

The geometric mapping grid file is read from disk and is analyzed. The validity of the grid may be checked at this time if GRIDFLG=YES. Next, the size of the output image is determined. By default, this is determined by the mapping grid. The user may override this by using the WINDOW and WINDOPT.

If input windowing is used, the output image size is determined by the geometric mapping grid. Input image data processed is limited to the window specified.

If output windowing is used, the output image size is specified by WINDOW. The input image window is automatically determined based on the output image window and the geometric mapping grid.

If table-based resampling (RESAMP = TABLE) is used, user-generated resampling weights are read from INRWT and checked for validity.

Nonfatal Error Messages:

  1. [resample-band] Band N appears multiple times in the BAND_LIST. Only the first one was used.

    A band was listed multiple times in the input image request (IN). Check the input image entry for correctness.

  2. [resample-background] BACKGRND out of range. Set to zero.

    BACKGRND was out of range for the data type of the image. The fill is set to zero and processing continues.

  3. [resample-buffer] Full buffering of output image not in use. Performance may be reduced.

    The entire output image is not being buffered. This may reduce performance on systems with ample memory to handle full image buffering. To buffer more of the image, increase the CACHESZ parameter.

  4. [resample-buflines] Not enough input lines buffered. BUFLINES has been increased to N (minimum required).

    The number of input lines to be buffered is not enough to allow for the line curvature inherent in the input space to output space mapping. The value for BUFLINES has been increased to N.

  5. [resample-buflines] BUFLINES too large for CACHESZ. Reducing BUFLINES to N. The number of input lines to be buffered requires more active output lines than CACHESZ will allow. The value for BUFLINES has been increased to N.

  6. [resample-cache] Short N MB of memory to buffer the active lines in the output image. Increasing CACHESZ to M MB.

    The value of CACHESZ is N MB too small to be able to buffer the output image. CACHESZ has been increased to M MB..

  7. [resample-fullbuf] Full output image buffering was found to be required to successfully process the image so it has been forced.

    The required output image buffer size was calculated to the the full output image, so the entire output image is being buffered in memory.

  8. [resample-dtype] The data types of the images are not the same, so the data type of <filename> will be used.

    Two or more input images were specified, and the output data type was entered as "SAME". The input images were of different types, so the data type of the first image entered will be used as the output data type. Processing continues.

  9. [resample-info]

    Informational messages.

  10. [resample-limits] INTLIM out of range. Adjusted to range of data type.

    The minimum and maximum interpolation values given were out of the range of the data type of the image. The minimum interpolation value is set to the smallest value for the data type and the maximum interpolation value is set to the largest value for the data type. Processing continues.

  11. [resample-llconv] Unable to convert LL corner from output space to input space.

    The lower-left output space line/sample could not be converted to an input space line/sample pair. This is probably due to a mapping into a break region. The resampler will make a "best guess" so that processing may continue.

  12. [resample-ncpu] Number of threads requested greater than number of available CPUs. Reducing to N.

    The number of CPUs requested is more than available. The number has been reduced and processing continues.

  13. [resample-ulconv] Unable to convert UL corner from output space to input space.

    The upper-left output space line/sample could not be converted to an input space line/sample pair. This is probably due to a mapping into a break region. The resampler will make a "best guess" so that processing may continue.

  14. [resample-warn] Nonfatal error encountered.

    A nonfatal error was encountered during processing. The program's data is probably valid and therefore saved. The message displayed immediately preceding this error message is the specific error encountered. Processing continues.

Fatal Error Messages:

  1. [resample-alloc] Error allocating memory.

    An error occurred allocating memory. Rerun the function, and if the error recurs, process the image in segments as described by User Note 5. If the error recurs, notify the system manager.

  2. [resample-badgridl] Grid lines wrapped or not strictly increasing.

    The line coordinates in the part of the geometric mapping grid that defines input space locations must be strictly increasing. TPGEOM detected this error in the grid file. It is also possible that the grid is wrapping back onto itself. Correct the mapping grid. This may involve changing control point or tie point distributions or set GRIDFLG= NO.

  3. [resample-badgrids] Grid samples wrapped or not strictly increasing.

    The sample coordinates in the part of the geometric mapping grid that defines input space locations must be strictly increasing. TPGEOM detected this error in the grid file. It is also possible that the grid is wrapping back onto itself. Correct the mapping grid. This may involve changing control point or tie point distributions or set GRIDFLG=NO.

  4. [resample-break] Error determining framing coordinates.

    The output image frame could not be determined from the input image because of "break" regions in the projection. This can be avoided by using the COORS parameter to input the correct coordinates.

  5. [resample-buffer] Error returning buffer to pool.

    An error occurred while attempting to return an output image buffer to the pool of available buffers. Contact LAS personnel if problem persists.

  6. [resample-close] Error closing input image. Error closing dem image.

    Unable to close the image. Contact system administrator if problem persists.

  7. [resample-coor] COORS must contain either 0, 2, or 4 values.

    The input parameter COORS does not contain the required 0, 2, or 4 values. Verify the correctness of the COORS parameter and rerun.

  8. [resample-corner] Invalid corner coordinates for input image.

    The input image DDR says that the corner coordinates are invalid. Verify and replace with a valid input image.

  9. [resample-create] Error creating output image <filename>.

    Unable to create the output image. Contact the system administrator if problem persists.

  10. [resample-ddrcal] Error calculating ddr corners.

    Unable to compute the image corner coordinates while updating the output image DDR. The error occurs within the projection transformation package. Possible causes include unsupported to-from projection combinations.

  11. [resample-ddrget] Error retrieving ddr information.

    Unable to retrieve either the input image or output image DDR. Ensure that the image DDR file exists and has not been corrupted.

  12. [resample-ddrwrite] Error writing to the ddr file.

    Unable to write the DDR information to disk. Contact the system administrator if problem persists.

  13. [resample-dtype] Unknown data type in <filename>.

    The image data type is not supported.

  14. [resample-dtype] Unknown output data type.

    The output image data type is not supported.

  15. [resample-dtype] DEM does not contain 16-bit integer data.

    The terrain image data type must be I*2.

  16. [resample-fatal] Fatal error encountered.

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

  17. [resample-frame] Error computing the output frame coordinates.

    An error occurred while converting the ouput line/sample to the output projection coordinates for the upper left and lower right image corners.

  18. [resample-getin] Error parsing input image specification for XXX.

    The image specification for the input parameter XXX could not be parsed. Ensure that the input format is proper.

  19. [resample-getout] Error parsing output image specification for XXX.

    The image specification for the output parameter XXX could not be parsed. Ensure that the input format is proper.

  20. [resample-getpar] Error reading parameters.

    There was an error when trying to read the TAE parameters. Notify LAS support personnel.

  21. [resample-getstr] Unable to retrieve _SUBCMD.

    The TAE parameter _SUBCMD could not be retrieved. Notify LAS support personnel.

  22. [resample-grid] Band N is not present in the grid.

    The grid does not contain band-related information for band N. Verify that the grid is correct. Contact LAS support personnel if the problem persists.

  23. [resample-grid] Error reading geometric mapping grid file.

    An error occurred while reading the grid file. Ensure that the file is a proper LAS grid file.

  24. [resample-imagetype] Unknown image type.

    The IMGTYPE is unknown. Review and replace with one of the supported values.

  25. [resample-incomp] Resampling error in line M, last sample reached was N out of P samples.

    The resampler was unable to complete output line M due to unavailable input image data. The last sample resampled was N. The output image line contains P samples. Either not enough output image lines are being buffered or the input line overlap is not large enough. If this error occurs while performing pixel-based resampling, trying increasing BUFLINES to span the entire input image. If the problem persists, notify LAS support.

  26. [resample-incomp] Partial buffer section. Shouldn't be here.

    An output buffer underrun occurred. All of the output buffers were exhausted while the input buffer still contained needed data. The computed active line count is too small. Verify that the scenario (input image and expected output image) is correct. Contact LAS personnel if the problem persists.

  27. [resample-kern] Error setting up the resampling kernel.

    An error occurred while setting up the resampling kernel. If the resampling method is table based, ensure the correctness of the input weight table file.

  28. [resample-ltlocate] Error locating label table file.

    Unable to find the label table file. Check spelling and verify that the file exists.

  29. [resample-ltread] Error reading label table file.

    Unable to read the label table file. Ensure that the file is the correct format and is not corrupted.

  30. [resample-mutex] Error unlocking access to shared data.

    The routine for unlocking access to shared data has failed. Notify LAS support personnel.

  31. [resample-mutex] Error locking access to shared data.

    The routine for locking access to shared data has failed. Notify LAS support personnel.

  32. [resample-mutex] Unable to destroy lock on shared data.

    An error occurred while trying to destroy a mutex. The mutex is currently held by a thread. Notify LAS support if problem persists.

  33. [resample-nbnd] Number of bands exceeds limit of <MAXBND>.

    Number of input image bands exceeds limit. Break the case into separate cases, each handling a set of bands less than the limit.

  34. [resample-nls] Number of output lines, samples not specified.

    When two values are input for COORS, NL and NS must be specified in order to define the entire output image frame. Ensure that these parameters have been entered.

  35. [resample-nmrimg] Only one input image allowed for the -NOGRID subcommand.

    When using the -nogrid option, only one input image is allowed.

  36. [resample-noproj] Projection information not available from DDR.

    The input image DDR does not contain valid projection information. Verify and correct or replace the input image.

  37. [resample-open] Error opening input image <filename>.

    The file was not properly read. Ensure that the file exists and is in the proper format.

  38. [resample-open] Error returned from open_input_image for file <filename>.

    The file was not properly read. Ensure that the file exists and is in the proper format.

  39. [resample-open] Error opening dem image <filename>.

    The file was not properly read. Ensure that the file exists and is in the proper format.

  40. [resample-open] Error reading DEM from <filename>.

    The file was not properly read. Ensure that the file exists and is in the proper format.

  41. [resample-open] Error opening grid file <filename>.

    The grid file was not properly read. Ensure that the file exists and is in the proper format.

  42. [resample-open] Error opening table file <filename>.

    The file was not properly read. Ensure that the file exists and is in the proper format.

  43. [resample-open] Error opening projection file <filename>.

    The file was not properly read. Ensure that the file exists and is in the proper format.

  44. [resample-oprojkey] <key> key not found in <filename>.

    The requested key is not in the file. Check the file for correctness.

  45. [resample-option] Unknown resample option.

    The requested resampling method is not supported. Choose one of the supported methods and rerun.

  46. [resample-outside] Input window outside image.

    The input window specified lies entirely outside of the input image. Check the window parameters and the geometric mapping grid for errors.

  47. [resample-outwind] Output window falls outside mapping grid.

    All or part of the output window falls outside the mapping grid. Correct the window to be within the mapping grid.

  48. [resample-pixsiz] Output pixel size must be specified.

    The output pixel size must be input. Ensure that PIXSIZ has the appropriate Y, X dimensions.

  49. [resample-proj] Error reading output projection information.

    An error occurred while extracting information from the output projection file. Ensure the file is in the proper format.

  50. [resample-read] Error occurred while reading input image.

    An error occurred while reading the input image. Notify LAS support personnel of the problem.

  51. [resample-satnum] Satellite number of N is not valid.

    The satellite number is not supported. Ensure that the SATNUM parameter is correct and supported.

  52. [resample-sclat] Error calculating scene center latitude for input image.

    The scene center latitude could not be computed. The DDR and/or projection information may be incorrect. Verify that the DDR is valid and the projection is supported.

  53. [resample-size] Input images must be the same size.

    The input images must be of the same size. Grid cell and input image statistics are calculated only once; the requirements change when the image sizes change. Correct the input images to be the same size or run them separately.

  54. [resample-terrain] DEM image size not equal to output image size.

    The terrain image must be the same size as the output (non-windowed) image.

  55. [resample-terrain] Unsupported product type.

    The terrain product type given is not one of the supported values. Check the validity of the product type.

  56. [resample-terrain] Unable calculate the nadir pixels.

    The nadir pixels for all output lines could not be calculated.

  57. [resample-thread] Error creating thread M of N.

    Could not create thread. Contact LAS support if problem persists.

  58. [resample-thread] Error waiting for thread termination.

    Could not rejoin thread. Contact LAS support if problem persists.

  59. [resample-thread] Error encountered in resampling thread N.

    An error occurred in thread N. The cause is probably listed in a previous statement. Contact LAS support if the cause is not clear.

  60. [resample-thread] Error destroying semaphore.

    An error occurred while attempting to destroy a semaphore. Contact LAS support if problem persists.

  61. [resample-thread] Error attempting to post to an invalid semaphore.

    An error occurred while attempting to post to an invalid semaphore. Contact LAS support if problem persists.

  62. [resample-tnmrimg] More than one terrain input image specified.

    RESAMPLE can only handle one terrain input image. Run RESAMPLE again and specify a single terrain input image.

  63. [resample-trans] Error initializing the transformation package.

    An error occurred during the initialization of the projection transformation package. Check the input projection information for accuracy.

  64. [resample-units] Unsupported units.

    The projection units in the output projection are not valid. Verify that the units value is one of the supported types.

  65. [resample-wind] Specified window is not valid.

    The specified window values are not valid. Correct the window parameters.

  66. [resample-wrap] Wrapping of grid detected at or around row M, column N.

    The input grid is bad. The grid check discoverd "grid wrapping". Check the grid for correctness.

  67. [resample-write] Error writing to output image file.

    An error occurred while attempting to write to the output image file. Notify LAS support personnel of the problem.

User Notes:

  1. File descriptions of the geometric mapping grid file and the resampling weight table file may be found in the LAS Programmer's Manual.

  2. Geometric mapping grid files are created by the ROTRNSCL, GRIDGEN, POLYFIT, REMAP, FINITE, and GRIDFORM modules.

  3. RESAMPLE requires mapping grids be in the LAS geometric mapping grid standard format. Users having grids with other formats may reformat their grids using GRIDFORM.

  4. Resampling weight table files may be generated with the RTABLE module.

  5. If the input image is large, the output image may be obtained in segments by specifying consecutive output windows and consecutive runs of RESAMPLE. The resulting output image segments may be combined using the program CONCAT. This method of processing works only with output windows because a rectangular space is defined in the output image area. Input windowing defines a rectangular area in input space which is then possibly warped to a nonrectangular output space--and thus neighboring windows will not combine easily.

  6. The default number of threads is equal to half the number of processors the machine has. Scheduling of these threads is the same as normal Unix processes, so running several RESAMPLEs at once is not advised unless the number of compute threads used by each RESAMPLE is limited. If NTHREADS is not used, the number of compute threads may also be controlled by setting the Unix environment variable IL_COMPUTE_THREADS (a hold-over from IVGEOM that is supposedly based on a naming convention associated with the SGI ImageVision Library) to the desired number of threads. Setting the number of threads to 1 disables multi-threading. The maximum number of compute threads is 100. The number of compute threads should never be more than the number of processors in a system or performance will suffer.

  7. In order to optimize on-demand processing flow, caches are allocated for the input images. The user can control the maximum amount of cache used with CACHESZ. Larger caches will generally increase performance since the application may not have to read from disk as often. However, if the system doesn't have enough memory or is very busy, a larger cache may actually decrease performance since the operating system will have to swap virtual memory more often. The default values may be used in most cases.

  8. Terrain correction note: Use only if you know what you are doing. The user is responsible for ensuring that the DEM image is registered with the output image projection space.