OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
mds.h
Go to the documentation of this file.
1 /******************************************************************************
2  *
3  * NAME: mds.h
4  *
5  * DESCRIPTION: description of the structure that constitutes a Map Data Set.
6  * Defines prototypes for users of the map functions.
7  *
8  * PARAMETER TYPE DESCRIPTION
9  * ------------- ------ --------------------------------
10  * grid_type short identifies which map projection is being used
11  * 11=standard Mercator, cylindrical, coaxial
12  * 21=Polar Stereographic, Northern Hemisphere
13  * 25=Polar Stereographic, Southern Hemisphere
14  * 31=Lambert Conformal Conic, Tangent cone,
15  * Northern Hemisphere
16  * 35=Lambert Conformal Conic, Tangent cone,
17  * Southern Hemisphere
18  * 41=Lambert Conformal Conic, Secant cone,
19  * Northern Hemisphere
20  * 45=Lambert Conformal Conic, Secant cone,
21  * Southern Hemisphere
22  * 51=Cylindrical Equidistant
23  * 61=Northern Polar Azmuthal Equidistant
24  * 65=Southern Polar Azmuthal Equidistant
25  *
26  * wedge_rotation short used for Lambert Conformal Conic, position of the
27  * empty wedge: 1=up,2=left,3=down,4=right
28  *
29  * mds_num int identification number of mds, optional
30  *
31  * stan_lat1 double first standard latitude
32  * stan_lat2 double second standard latitude, needed for Lambert
33  * Conformal Conics, secant cone projections
34  * base_lon double base longitude of the X-Y coordinate system, not
35  * always the same meaning, see notes for projection
36  * grid_inc_constant double primarily determines scaling and grid sizes
37  * grid_inc_c2 double second constant of same purpose, needed in
38  * cylindrical equidistant
39  * grid_exponent double needed for Lamberts
40  * grid_constant_A double needed for Lamberts,
41  * -on mercators (grid_type=11) it is the width of
42  * the MDS in radians
43  * max_row double maximum row number in the grid
44  * max_col double maximum column number in the grid
45  * upr_left_lat double latitude of upper left corner of grid
46  * upr_left_lon double longitude of upper left corner of grid
47  * lwr_right_lat double latitude of lower right corner of grid
48  * lwr_right_lon double longitude of lower right corner of grid
49  * upr_left_x double x coordinate of upper left corner
50  * upr_left_y double y coordinate of upper left corner
51  * lwr_right_x double x coordinate of lower right corner
52  * lwr_right_y double y coordinate of lower right corner
53  * split_lon double for all lamberts, the longitude on both
54  * sides of the empty sector
55  * latsml double smallest latitude in the MDS
56  * latbig double largest latitude in the MDS
57  * lonsml[2] double smallest longitude in the MDS, need two because
58  * there might be two longitude ranges in the MDS,
59  * which happens when the MDS spans 180 degrees
60  * longitude
61  * lonbig[2] double biggest longitude in the MDS, need two for the
62  * same reason as lonsml
63  * num_lonrange short number of longitude ranges in the MDS, always
64  * either 1 or 2
65  * junk[3] short filler to make the length of an MDS an even
66  * multiple of 8 bytes.
67  * ------------- ------ --------------------------------
68  *
69  * REFERENCES: none
70  *
71  * LIMITATIONS: none
72  *
73  * NOTES (MISCELLANEOUS) SECTION:
74  *
75  * MDS = Map Data Set
76  *
77  ******************************************************************************/
78 
79 #ifndef MDS_TYPE_H
80 #define MDS_TYPE_H
81 
82 #ifdef __cplusplus
83 extern "C" {
84 #endif
85 
86 
87 /* Map Data Set Grid types */
90 
91 /***************************************************************************
92 Define the Map Data Set
93  **********************/
94 
95 typedef struct {
96  short grid_type;
97  short wedge_rotation;
98  int mds_num;
99  double stan_lat1;
100  double stan_lat2;
101  double base_lon;
102  double grid_inc_constant;
103  double grid_inc_c2;
104  double grid_exponent;
105  double grid_constant_A;
106  double max_row;
107  double max_col;
108  double upr_left_lat;
109  double upr_left_lon;
110  double lwr_right_lat;
111  double lwr_right_lon;
112  double upr_left_x;
113  double upr_left_y;
114  double lwr_right_x;
115  double lwr_right_y;
116  double split_lon;
117  double costanlat;
118  double latsml;
119  double latbig;
120  double lonsml[2];
121  double lonbig[2];
122  short num_lonrange;
123  char explicit_pad[6];
125 
126 /***************************************************************************
127 NOTE: All Map Data Sets (MDS) are rectangular, so the functions that
128 create them have to know how many pixels (grids) there are in the left-right
129 and up-down directions. The upper left corner of the grid is row=0 and
130 column=0, rows increase down the grid, and columns increase toward the
131 right.
132 
133 NOTE: The latitude or longitude in all of these functions refers to the
134 center of the pixel (intersection of the grid).
135 
136 NOTE: The North-at-Top Method (nortop) - The functions whose names begin
137 with "bldmds" build map data sets for arbitrary grids. In the "nortop"
138 method the first three arguments provide geodetic latitude and longitude
139 of the center of the map set, and the approximate number of kilometers
140 the map set will span in the north south direction, along the center
141 longitude. By definition in the "nortop" method, the center longitude
142 is straight up and down the center of the map set, and north is towards
143 the top of that line.
144 
145 NOTE: The Upper-Left-Lower-Right method (ullr) - Other functions that begin
146 with "bldmds" build MDS by specifying the upper left and lower right
147 corners of the MDS. These functions have a middle part to their names
148 that is "ullr"
149 
150 NOTE: Geodetic vs Geocentric and the Oblate Spheroid. The functions in
151 this library do not account for the oblatness of the Earth because it is
152 assumed that the latitudes passed to this library are all Geodetic.
153 Once you have geodetic latitude, you have accounted for the oblatness of
154 the Earth. Therefore, all the calculations in this library are based on
155 a spherical Earth model.
156  **********************/
157 
158 /***************************************************************************
159 These are the meanings of the variable names used in the parameter lists
160 of the functions:
161 
162 
163  int function_name - returns an integer error flag
164  0 means no errors
165  <100 means a warning, err_string contains message
166  >100 means an important error, err_string contains message
167  double clat - center geodetic latitude, in radians, positive north,
168  range is -pi/2 to +pi/2
169  double clon - center longitude, in radians, positive east,
170  range is -pi to +pi
171  double ul_lat - upper left corner geodetic latitude, in radians,
172  positive north, range is -pi/2 to +pi/2,
173  must be > radian equivalent of 30 degrees south
174  double ul_lon - upper left corner longitude, in radians,
175  positive east, range is -pi to +pi
176  double lr_lat - lower right corner geodetic latitude, in radians,
177  positive north, range is -pi/2 to +pi/2,
178  must be > radian equivalent of 30 degrees south
179  double lr_lon - lower right corner longitude, in radians,
180  positive east, range is -pi to +pi
181  double ns_dist - approximate north-south distance, spanned by the
182  MDS, along the center longitude, in kilometers
183  double row - row coordinate of the input point
184  double col - column coordinate of the input point
185  double* rlat - input point geodetic latitude pointer, in radians,
186  positive north, range is -pi/2 to +pi/2,
187  double* rlon - input point longitude pointer, in radians,
188  positive east, range is -pi to +pi
189  int lftrgt_pix - number of pixels (grids) in the left to right
190  direction
191  int updwn_pix - number of pixels (grids) in the up to down
192  direction of the rectangle.
193  mds_type* dmds - Output MDS data structure pointer, memory allocated
194  by the calling function
195  char* err_string - string pointer (256 bytes) containing any
196  error messages created, memory allocated by the calling
197  function
198  **********************/
199 
200 
201 /***************************************************************************
202 bldmds_nortop_polen : build an MDS, by the the nortop method, on a
203 northern polar stereographic map projection.
204 
205 lerr = bldmds_nortop_polen(clat,clon,ns_dist,lftrgt_pix,updwn_pix,
206  dmds,err_string);
207  **********************/
208 
209 int bldmds_nortop_polen(double clat,
210  double clon,
211  double ns_dist,
212  int lftrgt_pix,
213  int updwn_pix,
214  mds_type *dmds,
215  char *err_string);
216 
217 /***************************************************************************
218 bldmds_nortop_poles : build an MDS, by the the nortop method, on a
219 southern polar stereographic map projection.
220 
221 lerr = bldmds_nortop_poles(clat,clon,ns_dist,lftrgt_pix,updwn_pix,
222  dmds,err_string);
223  **********************/
224 
225 int bldmds_nortop_poles(double clat,
226  double clon,
227  double ns_dist,
228  int lftrgt_pix,
229  int updwn_pix,
230  mds_type *dmds,
231  char *err_string);
232 
233 /***************************************************************************
234 bldmds_nortop_merc: build an MDS, by the the nortop method, on a
235 mercator map projection.
236 
237 lerr = bldmds_nortop_merc(clat,clon,ns_dist,lftrgt_pix,updwn_pix,
238  dmds,err_string);
239  **********************/
240 
241 int bldmds_nortop_merc(double clat,
242  double clon,
243  double ns_dist,
244  int lftrgt_pix,
245  int updwn_pix,
246  mds_type *dmds,
247  char *err_string);
248 
249 /***************************************************************************
250 bldmds_ullr_polen : build an MDS, by the "ullr" method, on a northern
251 polar stereographic map projection.
252 
253 lerr = bldmds_ullr_polen(ul_lat,ul_lon,lr_lat,lr_lon,lftrgt_pix,updwn_pix,
254  dmds, err_string);
255  **********************/
256 
257 int bldmds_ullr_polen(double ul_lat,
258  double ul_lon,
259  double lr_lat,
260  double lr_lon,
261  int lftrgt_pix,
262  int updwn_pix,
263  mds_type *dmds,
264  char *err_string);
265 
266 /***************************************************************************
267 bldmds_ullr_poles : build an MDS, by the "ullr" method, on a southern
268 polar stereographic map projection.
269 
270 lerr = bldmds_ullr_poles(ul_lat,ul_lon,lr_lat,lr_lon,lftrgt_pix,updwn_pix,
271  dmds, err_string);
272  **********************/
273 
274 int bldmds_ullr_poles(double ul_lat,
275  double ul_lon,
276  double lr_lat,
277  double lr_lon,
278  int lftrgt_pix,
279  int updwn_pix,
280  mds_type *dmds,
281  char *err_string);
282 
283 /***************************************************************************
284 bldmds_ullr_merc : build an MDS, by the "ullr" method, on a mercator map
285 projection.
286 
287 NOTE: The lower right longitude is deliberately not present. Once the
288 lower right latitude is defined, the lower right longitude is no longer
289 arbitrary. It is determined by the upper left corner and the
290 dimensions of the grid. We could have allowed specification of the
291 lower right longitude instead of the latitude, but we arbitrarily chose
292 the latitude.
293 
294 lerr = bldmds_ullr_merc(ul_lat,ul_lon,lr_lat,lftrgt_pix,updwn_pix,
295  dmds, err_string);
296  **********************/
297 
298 int bldmds_ullr_merc(double ul_lat,
299  double ul_lon,
300  double lr_lat,
301  int lftrgt_pix,
302  int updwn_pix,
303  mds_type* dmds,
304  char* err_string);
305 
306 /***************************************************************************
307 grid_to_latlon : convert an input grid coordinate row and column to latitude
308 and longitude.
309 
310 lerr = grid_to_latlon(row,col,imds,&rlat,&rlon,err_string);
311  **********************/
312 
313 int grid_to_latlon(double row,
314  double col,
315  mds_type *imds,
316  double *rlat,
317  double *rlon,
318  char *err_string);
319 
320 /***************************************************************************
321 latlon_to_grid : convert an input latitude and longitude to grid coordinate
322 row and column. The output coordinates are doubles, but when an integer
323 grid position is needed, the calling function would simply apply the rint
324 or round function to the coordinates.
325 
326 lerr = latlon_to_grid(rlat,rlon,imds,&row,&col,err_string);
327  **********************/
328 
329 int latlon_to_grid(double rlat,
330  double rlon,
331  mds_type *imds,
332  double *row,
333  double *col,
334  char *err_string);
335 
336 /***************************************************************************
337 ll2g_polen : converts a latitude and longitude to a row and column
338 position on a northern polar stereographic MDS.
339 
340 lerr = ll2g_polen(rlat,rlon,imds,&row,&col,err_string);
341  **********************/
342 
343 int ll2g_polen(double rlat,
344  double rlon,
345  mds_type *imds,
346  double *row,
347  double *col,
348  char *err_string);
349 
350 /***************************************************************************
351 ll2g_poles : converts a latitude and longitude to a row and column
352 position on a southern polar stereographic MDS.
353 
354 lerr = ll2g_poles(rlat,rlon,imds,&row,&col,err_string);
355  **********************/
356 
357 int ll2g_poles(double rlat,
358  double rlon,
359  mds_type *imds,
360  double *row,
361  double *col,
362  char *err_string);
363 
364 /***************************************************************************
365 ll2g_merc : converts a latitude and longitude to a row and column
366 position on a mercator MDS.
367 
368 lerr = ll2g_merc(rlat,rlon,imds,&row,&col,err_string);
369  **********************/
370 
371 int ll2g_merc(double rlat,
372  double rlon,
373  mds_type *imds,
374  double *row,
375  double *col,
376  char *err_string);
377 
378 /***************************************************************************
379 g2ll_merc : converts a grid position on a mercator MDS to latitude and
380 longitude.
381 
382 lerr = g2ll_merc(row,col,imds,&rlat,&rlon,err_string);
383  **********************/
384 
385 int g2ll_merc(double row,
386  double col,
387  mds_type *imds,
388  double *rlat,
389  double *rlon,
390  char *err_string);
391 
392 /***************************************************************************
393 g2ll_polen : converts a grid position on a northern polar stereographic MDS
394 to latitude and longitude.
395 
396 lerr = g2ll_polen(row,col,imds,&rlat,&rlon,err_string);
397  **********************/
398 
399 int g2ll_polen(double row,
400  double col,
401  mds_type *imds,
402  double *rlat,
403  double *rlon,
404  char *err_string);
405 
406 /***************************************************************************
407 g2ll_poles : converts a grid position on a southern polar stereographic MDS
408 to latitude and longitude.
409 
410 lerr = g2ll_poles(row,col,imds,&rlat,&rlon,err_string);
411  **********************/
412 
413 int g2ll_poles(double row,
414  double col,
415  mds_type *imds,
416  double *rlat,
417  double *rlon,
418  char *err_string);
419 
420 /***************************************************************************
421 fllr_merc : finds and sets the ranges of latitude and longitude in the input
422 mercator MDS.
423 
424 lerr = fllr_merc(imds,err_string);
425  **********************/
426 
427 int fllr_merc(mds_type *imds,
428  char *err_string);
429 
430 /***************************************************************************
431 fllr_polar : finds and sets the ranges of latitude and longitude in the
432 input polar stereographic MDS.
433 
434 lerr = fllr_polar(imds,err_string);
435  **********************/
436 
437 int fllr_polar(mds_type *imds,
438  char *err_string);
439 
440 /***************************************************************************
441 NOTE: "ced" is cylindrical equidistant.
442  **********************/
443 
444 /***************************************************************************
445 bldmds_nortop_ced: build an MDS, by the the nortop method, on a
446 cylindrical equidistant map projection.
447 
448 lerr = bldmds_nortop_ced(clat,clon,ns_dist,lftrgt_pix,updwn_pix,
449  dmds,err_string);
450  **********************/
451 
452 int bldmds_nortop_ced(double clat,
453  double clon,
454  double ns_dist,
455  int lftrgt_pix,
456  int updwn_pix,
457  mds_type *dmds,
458  char *err_string);
459 
460 /***************************************************************************
461 bldmds_ullr_ced: build an MDS, by the "ullr" method, on a cylindrical
462 equidistant map projection.
463 
464 lerr = bldmds_ullr_ced(ul_lat,ul_lon,lr_lat,lr_lon,lftrgt_pix,updwn_pix,
465  dmds, err_string);
466  **********************/
467 
468 int bldmds_ullr_ced(double ul_lat,
469  double ul_lon,
470  double lr_lat,
471  double lr_lon,
472  int lftrgt_pix,
473  int updwn_pix,
474  mds_type* dmds,
475  char* err_string);
476 
477 /***************************************************************************
478 fllr_ced: finds and sets the ranges of latitude and longitude in the input
479 cylindrical equidistant MDS.
480 
481 lerr = fllr_ced(imds,err_string);
482  **********************/
483 
484 int fllr_ced(mds_type *imds,
485  char *err_string);
486 
487 /***************************************************************************
488 g2ll_ced : converts a grid position on a cylindrical equidistant MDS to
489 latitude and longitude.
490 
491 lerr = g2ll_ced(row,col,imds,&rlat,&rlon,err_string);
492  **********************/
493 
494 int g2ll_ced(double row,
495  double col,
496  mds_type *imds,
497  double *rlat,
498  double *rlon,
499  char *err_string);
500 
501 /***************************************************************************
502 ll2g_ced : converts a latitude and longitude to a row and column
503 position on a cylindrical equidistant MDS.
504 
505 lerr = ll2g_ced(rlat,rlon,imds,&row,&col,err_string);
506  **********************/
507 
508 int ll2g_ced(double rlat,
509  double rlon,
510  mds_type *imds,
511  double *row,
512  double *col,
513  char *err_string);
514 
515 /***************************************************************************
516 NOTE: "polazn" or "polazs" are related to Polar Azimuthal Equidistant
517  **********************/
518 
519 /***************************************************************************
520 bldmds_ullr_polazn: build an MDS, by the "ullr" method, on a northern polar
521 azimuthal equidistant map projection.
522 
523 lerr = bldmds_ullr_polazn(ul_lat,ul_lon,lr_lat,lr_lon,lftrgt_pix,updwn_pix,
524  dmds, err_string);
525  **********************/
526 
527 int bldmds_ullr_polazn(double ul_lat,
528  double ul_lon,
529  double lr_lat,
530  double lr_lon,
531  int lftrgt_pix,
532  int updwn_pix,
533  mds_type* dmds,
534  char* err_string);
535 
536 /***************************************************************************
537 bldmds_ullr_polazs: build an MDS, by the "ullr" method, on a southern polar
538 azimuthal equidistant map projection.
539 
540 lerr = bldmds_ullr_polazs(ul_lat,ul_lon,lr_lat,lr_lon,lftrgt_pix,updwn_pix,
541  dmds, err_string);
542  **********************/
543 
544 int bldmds_ullr_polazs(double ul_lat,
545  double ul_lon,
546  double lr_lat,
547  double lr_lon,
548  int lftrgt_pix,
549  int updwn_pix,
550  mds_type* dmds,
551  char* err_string);
552 
553 /***************************************************************************
554 bldmds_nortop_polazn: build an MDS, by the the nortop method, on a
555 northern polar azimuthal equidistant map projection.
556 
557 lerr = bldmds_nortop_polazn(clat,clon,ns_dist,lftrgt_pix,updwn_pix,
558  dmds,err_string);
559  **********************/
560 
561 int bldmds_nortop_polazn(double clat,
562  double clon,
563  double ns_dist,
564  int lftrgt_pix,
565  int updwn_pix,
566  mds_type* dmds,
567  char* err_string);
568 
569 /***************************************************************************
570 bldmds_nortop_polazs: build an MDS, by the the nortop method, on a
571 southern polar azimuthal equidistant map projection.
572 
573 lerr = bldmds_nortop_polazs(clat,clon,ns_dist,lftrgt_pix,updwn_pix,
574  dmds,err_string);
575  **********************/
576 
577 int bldmds_nortop_polazs(double clat,
578  double clon,
579  double ns_dist,
580  int lftrgt_pix,
581  int updwn_pix,
582  mds_type* dmds,
583  char* err_string);
584 
585 /***************************************************************************
586 g2ll_polazn : converts a grid position on a northern polar azimuthal
587 equidistant MDS to latitude and longitude.
588 
589 lerr = g2ll_polazn(row,col,imds,&rlat,&rlon,err_string);
590  **********************/
591 
592 int g2ll_polazn(double row,
593  double col,
594  mds_type *imds,
595  double *rlat,
596  double *rlon,
597  char *err_string);
598 
599 /***************************************************************************
600 g2ll_polazs : converts a grid position on a southern polar azimuthal
601 equidistant MDS to latitude and longitude.
602 
603 lerr = g2ll_polazs(row,col,imds,&rlat,&rlon,err_string);
604  **********************/
605 
606 int g2ll_polazs(double row,
607  double col,
608  mds_type *imds,
609  double *rlat,
610  double *rlon,
611  char *err_string);
612 
613 /***************************************************************************
614 ll2g_polazn : converts a latitude and longitude to a row and column
615 position on a northern polar azimuthal equidistant MDS.
616 
617 lerr = ll2g_polazn(rlat,rlon,imds,&row,&col,err_string);
618  **********************/
619 
620 int ll2g_polazn(double rlat,
621  double rlon,
622  mds_type *imds,
623  double *row,
624  double *col,
625  char *err_string);
626 
627 /***************************************************************************
628 ll2g_polazs : converts a latitude and longitude to a row and column
629 position on a southern polar azimuthal equidistant MDS.
630 
631 lerr = ll2g_polazs(rlat,rlon,imds,&row,&col,err_string);
632  **********************/
633 
634 int ll2g_polazs(double rlat,
635  double rlon,
636  mds_type *imds,
637  double *row,
638  double *col,
639  char *err_string);
640 
641 /***************************************************************************
642 end of include file
643  **********************/
644 
645 #ifdef __cplusplus
646 }
647 #endif
648 
649 #endif
int ll2g_polazs(double rlat, double rlon, mds_type *imds, double *row, double *col, char *err_string)
Definition: mds.h:95
int ll2g_ced(double rlat, double rlon, mds_type *imds, double *row, double *col, char *err_string)
int bldmds_nortop_ced(double clat, double clon, double ns_dist, int lftrgt_pix, int updwn_pix, mds_type *dmds, char *err_string)
int g2ll_ced(double row, double col, mds_type *imds, double *rlat, double *rlon, char *err_string)
int fllr_merc(mds_type *imds, char *err_string)
int bldmds_ullr_polazs(double ul_lat, double ul_lon, double lr_lat, double lr_lon, int lftrgt_pix, int updwn_pix, mds_type *dmds, char *err_string)
int ll2g_merc(double rlat, double rlon, mds_type *imds, double *row, double *col, char *err_string)
int bldmds_ullr_polen(double ul_lat, double ul_lon, double lr_lat, double lr_lon, int lftrgt_pix, int updwn_pix, mds_type *dmds, char *err_string)
int bldmds_nortop_polen(double clat, double clon, double ns_dist, int lftrgt_pix, int updwn_pix, mds_type *dmds, char *err_string)
int bldmds_nortop_polazn(double clat, double clon, double ns_dist, int lftrgt_pix, int updwn_pix, mds_type *dmds, char *err_string)
int fllr_ced(mds_type *imds, char *err_string)
const int NORTHERN_POLAR_STEREOGRAPHIC
Definition: mds.h:88
const int SOUTHERN_POLAR_STEREOGRAPHIC
Definition: mds.h:89
int ll2g_poles(double rlat, double rlon, mds_type *imds, double *row, double *col, char *err_string)
int bldmds_ullr_merc(double ul_lat, double ul_lon, double lr_lat, int lftrgt_pix, int updwn_pix, mds_type *dmds, char *err_string)
int g2ll_polen(double row, double col, mds_type *imds, double *rlat, double *rlon, char *err_string)
int g2ll_polazs(double row, double col, mds_type *imds, double *rlat, double *rlon, char *err_string)
int bldmds_nortop_merc(double clat, double clon, double ns_dist, int lftrgt_pix, int updwn_pix, mds_type *dmds, char *err_string)
int latlon_to_grid(double rlat, double rlon, mds_type *imds, double *row, double *col, char *err_string)
int ll2g_polen(double rlat, double rlon, mds_type *imds, double *row, double *col, char *err_string)
int g2ll_merc(double row, double col, mds_type *imds, double *rlat, double *rlon, char *err_string)
int g2ll_polazn(double row, double col, mds_type *imds, double *rlat, double *rlon, char *err_string)
int g2ll_poles(double row, double col, mds_type *imds, double *rlat, double *rlon, char *err_string)
int ll2g_polazn(double rlat, double rlon, mds_type *imds, double *row, double *col, char *err_string)
int bldmds_ullr_ced(double ul_lat, double ul_lon, double lr_lat, double lr_lon, int lftrgt_pix, int updwn_pix, mds_type *dmds, char *err_string)
int fllr_polar(mds_type *imds, char *err_string)
int bldmds_ullr_polazn(double ul_lat, double ul_lon, double lr_lat, double lr_lon, int lftrgt_pix, int updwn_pix, mds_type *dmds, char *err_string)
int bldmds_ullr_poles(double ul_lat, double ul_lon, double lr_lat, double lr_lon, int lftrgt_pix, int updwn_pix, mds_type *dmds, char *err_string)
int grid_to_latlon(double row, double col, mds_type *imds, double *rlat, double *rlon, char *err_string)
int bldmds_nortop_poles(double clat, double clon, double ns_dist, int lftrgt_pix, int updwn_pix, mds_type *dmds, char *err_string)
int bldmds_nortop_polazs(double clat, double clon, double ns_dist, int lftrgt_pix, int updwn_pix, mds_type *dmds, char *err_string)