c_arcopnrd - Open an AVHRR archive image for reading or updating

SYNTAX

#include "adaps.h"

FUNCTION c_arcopnrd (image, access, window, model, tpunit, arcdesc)

    char	*image;	
    long	*access;
    long	window[4];
    struct	MODEL *model;
    long	*tpunit;	
    long	*arcdesc;

PARAMETERS

image (char *, input)

If the image is being read from disk, this is the host file name of the AVHRR archive image to be opened. If the image is being read from an archive tape, this must be the 16 character scene ID of the image to be read.

access (long *, input)

Specifies whether the image is to be opened for reading (IREAD) or updating (IUPDATE).

window (long [4], input/output)

Window specification. If either window[SL] or window[SS] are less than one, the entire archive image will be opened for processing. If window[NL] is less than one, the remaining lines from window[SL] will be opened for processing. Likewise, if window[NS] is less than one, the remaining samples from window[SS] will be opened for processing. If the window is reset by this function, the new window values will be returned.

model (struct MODEL *, input)

AVHRR model structure for the specified image. The model structure can be filled using c_getahdr() or c_tpgetahdr().

tpunit (long *, input)

If the image is being read from disk, tpunit should point to a value of NULL. If the image is being read from an AVHRR archive tape, tpunit should be a tape descriptor record, and the tape must be positioned at the beginning of the archive image file. See c_tpgetahdr() for additional details.

arcdesc (long *, output)

The archive file descriptor. This record is passed to c_arcread(), c_arcseek(), and/or c_arclose() as needed.

DESCRIPTION

Open an AVHRR archive image for reading or updating. The image may be located on disk or on tape, however, images located on tape cannot be opened for updating.

The sat_view flag within the model structure indicates the order in which ascending images will be processed. If it is nonzero, the lines of these images will be processed in the same order as they were acquired by the satellite. If zero, the lines will be processed in a "North-up" order and c_pixflip() will be called to flip the pixels before they are returned by c_arcread(). For descending images, satellite view and "North-up" are the same and therefore, the sat_view flag has no effect. When the window is reported to the user it will always be given in the "North-up" order.

RETURN VALUE

c_arcopnrd() returns

    E_SUCC (0)  --> Successful completion.
    E_FAIL (-1) --> Operation failed.  Tapes will be dismounted.