MISR Toolkit  1.5.1
MtkBlsToLatLon.c
Go to the documentation of this file.
1 /*===========================================================================
2 = =
3 = MtkBlsToLatLon =
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 "MisrCoordQuery.h"
18 #include "MisrError.h"
19 #include "misrproj.h"
20 
34  int path,
35  int resolution_meters,
36  int block,
37  float line,
38  float sample,
39  double *lat_dd,
40  double *lon_dd )
41 {
42  MTKt_status status_code; /* Return status of this function */
43  MTKt_status status; /* Return status */
44  double som_x; /* SOM X */
45  double som_y; /* SOM Y */
46 
47  if (lat_dd == NULL || lon_dd == NULL)
49 
50  status = MtkBlsToSomXY(path, resolution_meters, block, line, sample,
51  &som_x, &som_y);
52  MTK_ERR_COND_JUMP(status);
53 
54  status = MtkSomXYToLatLon(path, som_x, som_y, lat_dd, lon_dd);
55  MTK_ERR_COND_JUMP(status);
56 
57  return MTK_SUCCESS;
58 
59 ERROR_HANDLE:
60  return status_code;
61 }
#define MTK_ERR_CODE_JUMP(code)
Definition: MisrError.h:175
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.
MTKt_status MtkBlsToLatLon(int path, int resolution_meters, int block, float line, float sample, double *lat_dd, double *lon_dd)
Convert from Block, Line, Sample, to Latitude and Longitude in decimal degrees.
MTKt_status MtkBlsToSomXY(int path, int resolution_meters, int block, float line, float sample, double *som_x, double *som_y)
Convert from Block, Line, Sample, to SOM Coordinates.
Definition: MtkBlsToSomXY.c:33
#define MTK_ERR_COND_JUMP(code)
Definition: MisrError.h:188
MTKt_status
Definition: MisrError.h:11

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