MISR Toolkit  1.5.1
MisrCoordQuery.h
Go to the documentation of this file.
1 /*===========================================================================
2 = =
3 = MisrCoordQuery =
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 #ifndef MISRCOORDQUERY_H
18 #define MISRCOORDQUERY_H
19 
20 #include "MisrError.h"
21 #include "MisrProjParam.h"
22 #include "MisrSetRegion.h"
23 #include "MisrFileQuery.h"
24 
26 typedef struct {
34 
35 #define MTKT_GEOBLOCK_INIT { -1, MTKT_GEOCOORD_INIT, \
36  MTKT_GEOCOORD_INIT, MTKT_GEOCOORD_INIT, \
37  MTKT_GEOCOORD_INIT, MTKT_GEOCOORD_INIT }
38 
40 typedef struct {
41  int path;
43  int end_block;
44  MTKt_GeoBlock block[NBLOCK+1];
46 
47 #define MTKT_BLOCKCORNERS_INIT { 0, 0, 0, { MTKT_GEOBLOCK_INIT }}
48 
49 
51  int resolution_meters,
52  MTKt_MisrProjParam *pp );
53 
55  double lat_dd,
56  double lon_dd,
57  double *som_x,
58  double *som_y );
59 
61  int nelement,
62  const double *lat_dd,
63  const double *lon_dd,
64  double *som_x,
65  double *som_y );
66 
68  double som_x,
69  double som_y,
70  double *lat_dd,
71  double *lon_dd );
72 
74  int nelement,
75  const double *som_x,
76  const double *som_y,
77  double *lat_dd,
78  double *lon_dd );
79 
80 MTKt_status MtkBlsToSomXY( int path,
81  int resolution_meters,
82  int block,
83  float line,
84  float sample,
85  double *som_x,
86  double *som_y );
87 
89  int resolution_meters,
90  int nelement,
91  const int *block,
92  const float *line,
93  const float *sample,
94  double *som_x,
95  double *som_y );
96 
97 MTKt_status MtkSomXYToBls( int path,
98  int resolution_meters,
99  double som_x,
100  double som_y,
101  int *block,
102  float *line,
103  float *sample );
104 
105 MTKt_status MtkSomXYToBlsAry( int path,
106  int resolution_meters,
107  int nelement,
108  const double *som_x,
109  const double *som_y,
110  int *block,
111  float *line,
112  float *sample );
113 
114 MTKt_status MtkLatLonToBls( int path,
115  int resolution_meters,
116  double lat_dd,
117  double lon_dd,
118  int *block,
119  float *line,
120  float *sample );
121 
123  int resolution_meters,
124  int nelement,
125  const double *lat_dd,
126  const double *lon_dd,
127  int *block,
128  float *line,
129  float *sample );
130 
131 MTKt_status MtkBlsToLatLon( int path,
132  int resolution_meters,
133  int block,
134  float line,
135  float sample,
136  double *lat_dd,
137  double *lon_dd );
138 
140  int resolution_meters,
141  int nelement,
142  const int *block,
143  const float *line,
144  const float *sample,
145  double *lat_dd,
146  double *lon_dd );
147 
149  int start_block,
150  int end_block,
151  MTKt_BlockCorners *block_corners );
152 
154  double som_x,
155  double som_y,
156  char pixel_time[MTKd_DATETIME_LEN] );
157 
158 /* GCTP does not have a prototype for the following functions */
159 int inv_init(int insys,
160  int inzone,
161  const double *inparm,
162  int indatum,
163  char *fn27,
164  char *fn83,
165  int *iflg,
166  int (*inv_trans[])(double, double, double*, double*));
167 
168 int for_init(int outsys,
169  int outzone,
170  const double *outparm,
171  int outdatum,
172  char *fn27,
173  char *fn83,
174  int *iflg,
175  int (*for_trans[])(double, double, double *, double *));
176 
177 extern int sominv(double y, /* (I) Y projection coordinate */
178  double x, /* (I) X projection coordinate */
179  double *lon, /* (O) Longitude */
180  double *lat); /* (O) Latitude */
181 
182 extern int somfor(double lon, /* (I) Longitude */
183  double lat, /* (I) Latitude */
184  double *y, /* (O) X projection coordinate */
185  double *x); /* (O) Y projection coordinate */
186 #endif /* MISRCOORDQUERY_H */
MTKt_GeoCoord ctr
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 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 MtkPathBlockRangeToBlockCorners(int path, int start_block, int end_block, MTKt_BlockCorners *block_corners)
Compute block corner coordinates in decimal degrees of latitude and longitude for a given path and bl...
MTKt_GeoCoord ulc
MISR Projection Parameters.
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
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 MtkSomXYToBlsAry(int path, int resolution_meters, int nelement, const double *som_x, const double *som_y, int *block, float *line, float *sample)
Convert array of SOM X, SOM Y to array of block, line, sample.
MTKt_status MtkBlsToSomXYAry(int path, int resolution_meters, int nelement, const int *block, const float *line, const float *sample, double *som_x, double *som_y)
Convert array from Block, Line, Sample, to SOM Coordinates.
Block Corners.
MTKt_status MtkLatLonToBlsAry(int path, int resolution_meters, int nelement, const double *lat_dd, const double *lon_dd, int *block, float *line, float *sample)
Convert array of decimal degrees latitude and longitude to array of block, line, sample.
int sominv(double y, double x, double *lon, double *lat)
MTKt_GeoCoord lrc
Geographic Block Coordinates.
MTKt_status MtkPathToProjParam(int path, int resolution_meters, MTKt_MisrProjParam *pp)
Get projection parameters.
MTKt_status MtkLatLonToSomXYAry(int path, int nelement, const double *lat_dd, const double *lon_dd, double *som_x, double *som_y)
Convert array of decimal degrees latitude and longitude to array of SOM X, SOM Y. ...
#define NBLOCK
Definition: MisrProjParam.h:51
MTKt_GeoCoord urc
MTKt_status MtkSomXYToLatLonAry(int path, int nelement, const double *som_x, const double *som_y, double *lat_dd, double *lon_dd)
Convert array of SOM X, SOM Y to array of latitude, longitude.
int for_init(int outsys, int outzone, const double *outparm, int outdatum, char *fn27, char *fn83, int *iflg, int(*for_trans[])(double, double, double *, double *))
Time Metadata.
Definition: MisrFileQuery.h:77
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
MTKt_status MtkBlsToLatLonAry(int path, int resolution_meters, int nelement, const int *block, const float *line, const float *sample, double *lat_dd, double *lon_dd)
Convert array from Block, Line, Sample, to Latitude and Longitude.
MTKt_status MtkPixelTime(MTKt_TimeMetaData time_metadata, double som_x, double som_y, char pixel_time[MTKd_DATETIME_LEN])
Given SOM Coordinates compute pixel time.
Definition: MtkPixelTime.c:41
MTKt_GeoCoord llc
MTKt_status
Definition: MisrError.h:11
int somfor(double lon, double lat, double *y, double *x)
Geographic Coordinates.
Definition: MisrMapQuery.h:25
int inv_init(int insys, int inzone, const double *inparm, int indatum, char *fn27, char *fn83, int *iflg, int(*inv_trans[])(double, double, double *, double *))
#define MTKd_DATETIME_LEN
Definition: MisrUtil.h:149
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