MISR Toolkit  1.5.1
MtkLSToSomXYAry.c
Go to the documentation of this file.
1 /*===========================================================================
2 = =
3 = MtkLSToSomXYAry =
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 float *line,
41  const float *sample,
42  double *som_x,
43  double *som_y ) {
44 
45  MTKt_status status; /* Return status */
46  MTKt_status status_code; /* Error return status code */
47  int i; /* Loop index */
48 
49  if (line == NULL || sample == NULL || som_x == NULL || som_y == 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 = MtkLSToSomXY(mapinfo, line[i], sample[i], &som_x[i], &som_y[i]);
65  if (status) status_code = status;
66  }
67 
68  return status_code;
69 
70 ERROR_HANDLE:
71  return status_code;
72 }
MTKt_status MtkLSToSomXY(MTKt_MapInfo mapinfo, float line, float sample, double *som_x, double *som_y)
Convert line, sample to SOM X, SOM Y.
Definition: MtkLSToSomXY.c:33
#define MTK_ERR_CODE_JUMP(code)
Definition: MisrError.h:175
Map Information.
Definition: MisrMapQuery.h:65
MTKt_status MtkLSToSomXYAry(MTKt_MapInfo mapinfo, int nelement, const float *line, const float *sample, double *som_x, double *som_y)
Convert array of line, sample to array of SOM X, SOM Y.
MTKt_status
Definition: MisrError.h:11

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