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

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