MISR Toolkit  1.5.1
MtkLSToLatLon.c
Go to the documentation of this file.
1 /*===========================================================================
2 = =
3 = MtkLSToLatLon =
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 "MisrCoordQuery.h"
19 #include "MisrError.h"
20 
34  MTKt_MapInfo mapinfo,
35  float line,
36  float sample,
37  double *lat_dd,
38  double *lon_dd )
39 {
40  MTKt_status status_code; /* Return status of this function */
41  MTKt_status status; /* Return status */
42  double som_x; /* SOM X */
43  double som_y; /* SOM Y */
44 
45  if (lat_dd == NULL || lon_dd == NULL)
47 
48  status = MtkLSToSomXY(mapinfo, line, sample, &som_x, &som_y);
49  MTK_ERR_COND_JUMP(status);
50 
51  status = MtkSomXYToLatLon(mapinfo.path, som_x, som_y, lat_dd, lon_dd);
52  MTK_ERR_COND_JUMP(status);
53 
54  return MTK_SUCCESS;
55 
56 ERROR_HANDLE:
57  return status_code;
58 }
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 MtkSomXYToLatLon(int path, double som_x, double som_y, double *lat_dd, double *lon_dd)
Convert SOM X, SOM Y to decimal degrees latitude and longitude.
#define MTK_ERR_COND_JUMP(code)
Definition: MisrError.h:188
MTKt_status
Definition: MisrError.h:11
MTKt_status MtkLSToLatLon(MTKt_MapInfo mapinfo, float line, float sample, double *lat_dd, double *lon_dd)
Convert line, sample to decimal degrees latitude and longitude.
Definition: MtkLSToLatLon.c:33

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