c_window_proj_to_ls - Converts window specifications to line sample using an input DDR structure

SYNTAX

#include "las.h"
#include "util.h"
#include "geompak.h"
#include "cproj.h"
int c_window_proj_to_ls
(
    struct DDR *ddr,  /* I: pointer to DDR structure */
    double window[],  /* I/O: Image window
                              on input: uly, ulx, lry, lrx
                              on output: sl, ss, nl, ns */
    long units[]      /* I: winow units */
)

PARAMETERS

ddr (input, struct DDR *)

Pointer to the input DDR structure.

window (input/output, double[4])

Image window to convert to line/sample
   On input: Upper-left y, Upper-left x, Lower-right y, Lower-right x
   On output: Starting line, Starting sample, Number of lines, Number of samples

units (input, long)

Window units (DEG, DMS, PRO, LS)

DESCRIPTION

The c_window_proj_to_ls() routine is used to convert input window coordinates in units other than line/sample to line/sample units. E_SUCC is returned if the window conversion was successful. E_FAIL is returned if an error occurred converting the window.

RETURN VALUE

c_window_proj_to_ls() returns

     E_SUCC (0)  --> successful completion
     E_FAIL (-1) --> operation failed

The routine c_wndconv() is a similar routine which also converts an input window to line/sample coordinates. However, c_wndconv() requires a DDR file to be present, whereas c_window_proj_to_ls() only requires a DDR structure to be passed to this routine. c_wndconv() actually calls c_window_proj_to_ls() once it has read in the DDR from file.