MISR Toolkit  1.5.1
MtkGCTPProjInfo.c
Go to the documentation of this file.
1 /*===========================================================================
2 = =
3 = MtkGCTPProjInfo =
4 = =
5 =============================================================================
6 
7  Jet Propulsion Laboratory
8  MISR
9  MISR Toolkit
10 
11  Copyright 2008, California Institute of Technology.
12  ALL RIGHTS RESERVED.
13  U.S. Government Sponsorship acknowledged.
14 
15 ============================================================================*/
16 
17 #include "MisrMapQuery.h"
18 #include "MisrUtil.h"
19 #include <stdlib.h>
20 #include <math.h>
21 
36  int Proj_code,
37  int Sphere_code,
38  int Zone_code,
39  double Proj_param[15],
40  MTKt_GCTPProjInfo *Proj_info
41 )
42 {
43  MTKt_status status_code; /* Return status of this function */
45  /* Projection information */
46  int i;
47 
48  /* ------------------------------------------------------------------ */
49  /* Argument check: Proj_info == NULL */
50  /* ------------------------------------------------------------------ */
51 
52  if (Proj_info == NULL) {
53  MTK_ERR_CODE_MSG_JUMP(MTK_NULLPTR,"Proj_info == NULL");
54  }
55 
56  /* ------------------------------------------------------------------ */
57  /* Initialize projection information. */
58  /* ------------------------------------------------------------------ */
59 
60  proj_info_tmp.proj_code = Proj_code;
61  proj_info_tmp.sphere_code = Sphere_code;
62  proj_info_tmp.zone_code = Zone_code;
63  for (i = 0 ; i < 15; i++) {
64  proj_info_tmp.proj_param[i] = Proj_param[i];
65  }
66 
67  /* ------------------------------------------------------------------ */
68  /* Return. */
69  /* ------------------------------------------------------------------ */
70 
71  *Proj_info = proj_info_tmp;
72  return MTK_SUCCESS;
73 
74 ERROR_HANDLE:
75  return status_code;
76 }
77 
78 
MTKt_status MtkGCTPProjInfo(int Proj_code, int Sphere_code, int Zone_code, double Proj_param[15], MTKt_GCTPProjInfo *Proj_info)
Initialize a MTKt_GCTPProjInfo structure.
GCTP projection information.
Definition: MisrMapQuery.h:123
double proj_param[15]
Definition: MisrMapQuery.h:127
#define MTK_ERR_CODE_MSG_JUMP(code, msg)
Definition: MisrError.h:181
MTKt_status
Definition: MisrError.h:11
#define MTKT_GCTPPROJINFO_INIT
Definition: MisrMapQuery.h:130

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