MISR Toolkit  1.5.1
MtkSomXYToLSAry.c
Go to the documentation of this file.
1 /*===========================================================================
2 = =
3 = MtkSomXYToLSAry =
4 = =
5 =============================================================================
6 
7  Jet Propulsion Laboratory
8  MISR
9  MISR Toolkit
10 
11  Copyright 2005, California Institute of Technology.
12  ALL RIGHTS RESERVED.
13  U.S. Government Sponsorship acknowledged.
14 
15 ============================================================================*/
16 
17 #include "MisrMapQuery.h"
18 #include "MisrError.h"
19 
38  MTKt_MapInfo mapinfo,
39  int nelement,
40  const double *som_x,
41  const double *som_y,
42  float *line,
43  float *sample )
44 {
45  MTKt_status status; /* Return status */
46  MTKt_status status_code; /* Error return status code */
47  int i; /* Loop index */
48 
49  if (som_x == NULL || som_y == NULL || line == NULL || sample == NULL)
51 
52  if (nelement < 0)
54 
55  /* This routine will processing all elements in the input arrays */
56  /* no matter if an error occurred in any of the elements. */
57  /* An unsuccessful error code will be return only if one of the */
58  /* elements encountered an error. If none do then the status is */
59  /* success. */
60 
61  status_code = MTK_SUCCESS;
62 
63  for (i = 0; i < nelement; i++) {
64  status = MtkSomXYToLS(mapinfo, som_x[i], som_y[i], &line[i], &sample[i]);
65  if (status) status_code = status;
66  }
67 
68  return status_code;
69 
70 ERROR_HANDLE:
71  return status_code;
72 }
#define MTK_ERR_CODE_JUMP(code)
Definition: MisrError.h:175
Map Information.
Definition: MisrMapQuery.h:65
MTKt_status MtkSomXYToLSAry(MTKt_MapInfo mapinfo, int nelement, const double *som_x, const double *som_y, float *line, float *sample)
Convert array of SOM X, SOM Y to array of line, sample.
MTKt_status MtkSomXYToLS(MTKt_MapInfo mapinfo, double som_x, double som_y, float *line, float *sample)
Convert SOM X, SOM Y to line, sample.
Definition: MtkSomXYToLS.c:32
MTKt_status
Definition: MisrError.h:11

MISR Toolkit - Copyright © 2005 - 2020 Jet Propulsion Laboratory
Generated on Fri Jun 19 2020 22:49:51