MISR Toolkit  1.5.1
MisrMapQuery.h
Go to the documentation of this file.
1 /*===========================================================================
2 = =
3 = MisrMapQuery =
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 MISRMAPQUERY_H
18 #define MISRMAPQUERY_H
19 
20 #include "MisrError.h"
21 #include "MisrProjParam.h"
22 #include "MisrUtil.h"
23 
25 typedef struct {
26  double lat;
27  double lon;
29 
30 #define MTKT_GEOCOORD_INIT { 0.0, 0.0 }
31 
33 typedef struct {
34  double x;
35  double y;
37 
38 #define MTKT_SOMCOORD_INIT { 0.0, 0.0 }
39 
41 typedef struct {
48 
49 #define MTKT_GEOREGION_INIT { MTKT_GEOCOORD_INIT, MTKT_GEOCOORD_INIT, \
50  MTKT_GEOCOORD_INIT, MTKT_GEOCOORD_INIT, \
51  MTKT_GEOCOORD_INIT }
52 
54 typedef struct {
55  int path;
60 
61 #define MTKT_SOMREGION_INIT { 0, MTKT_SOMCOORD_INIT, MTKT_SOMCOORD_INIT, \
62  MTKT_SOMCOORD_INIT }
63 
65 typedef struct {
66  int path;
68  int end_block;
69  int resolution;
70  int resfactor;
71  int nline;
72  int nsample;
77 } MTKt_MapInfo;
78 
79 #define MTKT_MAPINFO_INIT { 0, 0, 0, 0, 0, 0, 0, MTK_TRUE, \
80  MTKT_SOMREGION_INIT, MTKT_GEOREGION_INIT, \
81  MTKT_MISRPROJPARAM_INIT }
82 
84 typedef enum {
90 
92 typedef enum {
96 
98 typedef struct {
99  double min_x;
100  double min_y;
101  double max_x;
102  double max_y;
103  int size_line;
107  double resolution_x;
108  double resolution_y;
109  double tline[4];
112  double tsample[4];
118 
119 
120 #define MTKT_GENERICMAPINFO_INIT { 0, 0, 0, 0, 0, 0, 0, 0, {0,0,0}, {0,0,0}, MTKe_ORIGIN_UL, MTKe_PIX_REG_CENTER }
121 
123 typedef struct {
127  double proj_param[15];
129 
130 #define MTKT_GCTPPROJINFO_INIT { 0, 0, 0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} }
131 
133  float line,
134  float sample,
135  double *som_x,
136  double *som_y );
137 
139  int nelement,
140  const float *line,
141  const float *sample,
142  double *som_x,
143  double *som_y );
144 
146  double som_x,
147  double som_y,
148  float *line,
149  float *sample );
150 
152  int nelement,
153  const double *som_x,
154  const double *som_y,
155  float *line,
156  float *sample );
157 
159  double lat_dd,
160  double lon_dd,
161  float *line,
162  float *sample );
163 
165  int nelement,
166  const double *lat_dd,
167  const double *lon_dd,
168  float *line,
169  float *sample );
170 
172  float line,
173  float sample,
174  double *lat_dd,
175  double *lon_dd );
176 
178  int nelement,
179  const float *line,
180  const float *sample,
181  double *lat_dd,
182  double *lon_dd );
183 
185  MTKt_DataBuffer *latbuf,
186  MTKt_DataBuffer *lonbuf );
187 
189  double Min_x,
190  double Min_y,
191  double Resolution_x,
192  double Resolution_y,
193  int Number_pixel_x,
194  int Number_pixel_y,
195  MTKt_OriginCode Origin_code,
196  MTKt_PixRegCode Pix_reg_code,
197  MTKt_GenericMapInfo *Map_info );
198 
200  int Proj_code,
201  int Sphere_code,
202  int Zone_code,
203  double Proj_param[15],
204  MTKt_GCTPProjInfo *Proj_info );
205 
207  const MTKt_GenericMapInfo *Map_info,
208  const MTKt_GCTPProjInfo *Proj_info,
209  MTKt_DataBuffer *Latitude,
210  MTKt_DataBuffer *Longitude );
211 
213  const char *Filename,
214  MTKt_GenericMapInfo *Map_info
215 );
216 
218  const char *Filename,
219  MTKt_GCTPProjInfo *Proj_info
220 );
221 
223  const MTKt_MapInfo *Map_info_in,
224  int Resolution,
225  MTKt_MapInfo *Map_info_out
226 );
227 
228 #endif /* MISRMAPQUERY_H */
SOM Coordinates.
Definition: MisrMapQuery.h:33
MTKt_status MtkGCTPProjInfoRead(const char *Filename, MTKt_GCTPProjInfo *Proj_info)
Initialize a MTKt_GCTPProjInfo structure using data from an external file.
MTKt_PixRegCode pix_reg_code
Definition: MisrMapQuery.h:116
MTKt_OriginCode
Origin code.
Definition: MisrMapQuery.h:84
MTKt_OriginCode origin_code
Definition: MisrMapQuery.h:115
Generic map information.
Definition: MisrMapQuery.h:98
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 Projection Parameters.
GCTP projection information.
Definition: MisrMapQuery.h:123
Geographic Region.
Definition: MisrMapQuery.h:41
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
MTKt_status MtkLatLonToLS(MTKt_MapInfo mapinfo, double lat_dd, double lon_dd, float *line, float *sample)
Convert decimal degrees latitude and longitude to line, sample.
Definition: MtkLatLonToLS.c:33
MTKt_status MtkChangeMapResolution(const MTKt_MapInfo *Map_info_in, int Resolution, MTKt_MapInfo *Map_info_out)
Change resolution of an MTKt_MapInfo structure.
MTKt_GeoCoord urc
Definition: MisrMapQuery.h:43
Map Information.
Definition: MisrMapQuery.h:65
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.
MTKt_GeoCoord lrc
Definition: MisrMapQuery.h:45
MTKt_boolean
Definition: MisrError.h:6
MTKt_PixRegCode
Pixel registration code.
Definition: MisrMapQuery.h:92
2-dimensional Data Buffer
Definition: MisrUtil.h:98
MTKt_GeoCoord llc
Definition: MisrMapQuery.h:46
MTKt_status MtkSomXYToLSAry(MTKt_MapInfo mapinfo, int nelement, const double *som_x, const double *som_y, float *line, float *sample)
Convert array of SOM X, SOM Y to array of line, sample.
MTKt_GeoCoord ulc
Definition: MisrMapQuery.h:42
MTKt_GeoCoord ctr
Definition: MisrMapQuery.h:44
MTKt_MisrProjParam pp
Definition: MisrMapQuery.h:76
MTKt_status MtkGCTPCreateLatLon(const MTKt_GenericMapInfo *Map_info, const MTKt_GCTPProjInfo *Proj_info, MTKt_DataBuffer *Latitude, MTKt_DataBuffer *Longitude)
Create an array of latitude and longitude values corresponding to each pixel in the given map...
MTKt_status MtkSomXYToLS(MTKt_MapInfo mapinfo, double som_x, double som_y, float *line, float *sample)
Convert SOM X, SOM Y to line, sample.
Definition: MtkSomXYToLS.c:32
MTKt_status MtkLatLonToLSAry(MTKt_MapInfo mapinfo, int nelement, const double *lat_dd, const double *lon_dd, float *line, float *sample)
Convert array of decimal degrees latitude and longitude to array of line, sample. ...
MTKt_GeoRegion geo
Definition: MisrMapQuery.h:75
MTKt_status MtkLSToLatLonAry(MTKt_MapInfo mapinfo, int nelement, const float *line, const float *sample, double *lat_dd, double *lon_dd)
Convert array of line, sample to array of decimal degrees latitude and longitude. ...
MTKt_status MtkGenericMapInfoRead(const char *Filename, MTKt_GenericMapInfo *Map_info)
Initialize a MTKt_GenericMapInfo structure using data from an external file.
MTKt_boolean pixelcenter
Definition: MisrMapQuery.h:73
MTKt_SomCoord lrc
Definition: MisrMapQuery.h:58
SOM Region.
Definition: MisrMapQuery.h:54
MTKt_SomCoord ctr
Definition: MisrMapQuery.h:57
MTKt_status
Definition: MisrError.h:11
MTKt_status MtkCreateLatLon(MTKt_MapInfo mapinfo, MTKt_DataBuffer *latbuf, MTKt_DataBuffer *lonbuf)
Creates a 2-D latitude buffer and a 2-D longitude buffer in decimal degrees corresponding to the data...
MTKt_SomRegion som
Definition: MisrMapQuery.h:74
Geographic Coordinates.
Definition: MisrMapQuery.h:25
MTKt_status MtkLSToSomXYAry(MTKt_MapInfo mapinfo, int nelement, const float *line, const float *sample, double *som_x, double *som_y)
Convert array of line, sample to array of SOM X, SOM Y.
MTKt_status MtkGenericMapInfo(double Min_x, double Min_y, double Resolution_x, double Resolution_y, int Number_pixel_x, int Number_pixel_y, MTKt_OriginCode Origin_code, MTKt_PixRegCode Pix_reg_code, MTKt_GenericMapInfo *Map_info)
Initialize a MTKt_GenericMapInfo structure.
MTKt_SomCoord ulc
Definition: MisrMapQuery.h:56

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