MISR Toolkit
1.5.1
MapQuery
src
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
35
MTKt_status
MtkGCTPProjInfo
(
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 */
44
MTKt_GCTPProjInfo
proj_info_tmp =
MTKT_GCTPPROJINFO_INIT
;
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
MtkGCTPProjInfo
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.
Definition:
MtkGCTPProjInfo.c:35
MTKt_GCTPProjInfo::zone_code
int zone_code
Definition:
MisrMapQuery.h:126
MTK_NULLPTR
Definition:
MisrError.h:19
MTKt_GCTPProjInfo
GCTP projection information.
Definition:
MisrMapQuery.h:123
MTKt_GCTPProjInfo::sphere_code
int sphere_code
Definition:
MisrMapQuery.h:125
MTK_SUCCESS
Definition:
MisrError.h:12
MTKt_GCTPProjInfo::proj_param
double proj_param[15]
Definition:
MisrMapQuery.h:127
MTK_ERR_CODE_MSG_JUMP
#define MTK_ERR_CODE_MSG_JUMP(code, msg)
Definition:
MisrError.h:181
MisrUtil.h
MisrMapQuery.h
MTKt_GCTPProjInfo::proj_code
int proj_code
Definition:
MisrMapQuery.h:124
MTKt_status
MTKt_status
Definition:
MisrError.h:11
MTKT_GCTPPROJINFO_INIT
#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