home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: Science / Science.zip / gmt_os2.zip / src / gmt_init.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-02-17  |  4.7 KB  |  147 lines

  1. /*--------------------------------------------------------------------
  2.  *    The GMT-system:    @(#)gmt_init.h    2.19  2/17/95
  3.  *
  4.  *    Copyright (c) 1991-1995 by P. Wessel and W. H. F. Smith
  5.  *    See README file for copying and redistribution conditions.
  6.  *--------------------------------------------------------------------*/
  7. /*
  8.  *  This include file contains initializations for the GMT system
  9.  *
  10.  */
  11.  
  12. struct GMTDEFAULTS gmtdefs = {    /* Initial default values */
  13. #include "gmt_defaults.h"
  14. };
  15.  
  16. struct GMT_LUT *gmt_lut;
  17.  
  18. char *font_name[N_FONTS] = {
  19. #include "PS_font_names.h"
  20. };
  21.  
  22. double font_height[N_FONTS] = { /* Relative; based on the size of A devided by fontsize */
  23. #include "PS_font_heights.h"
  24. };
  25.  
  26. char *gmt_keywords[N_KEYS] = {
  27.     "ANOT_MIN_ANGLE",
  28.     "ANOT_FONT",
  29.     "ANOT_FONT_SIZE",
  30.     "ANOT_OFFSET",
  31.     "BASEMAP_AXES",
  32.     "BASEMAP_FRAME_RGB",
  33.     "BASEMAP_TYPE",
  34.     "COLOR_BACKGROUND",
  35.     "COLOR_FOREGROUND",
  36.     "COLOR_NAN",
  37.     "COLOR_IMAGE",
  38.     "COLOR_MODEL",
  39.     "D_FORMAT",
  40.     "DEGREE_FORMAT",
  41.     "DOTS_PR_INCH",
  42.     "ELLIPSOID",
  43.     "FRAME_PEN",
  44.     "FRAME_WIDTH",
  45.     "GLOBAL_X_SCALE",
  46.     "GLOBAL_Y_SCALE",
  47.     "GRID_CROSS_SIZE",
  48.     "GRID_PEN",
  49.     "HEADER_FONT",
  50.     "HEADER_FONT_SIZE",
  51.     "HSV_MIN_SATURATION",
  52.     "HSV_MAX_SATURATION",
  53.     "HSV_MIN_VALUE",
  54.     "HSV_MAX_VALUE",
  55.     "INTERPOLANT",
  56.     "IO_HEADER",
  57.     "N_HEADER_RECS",
  58.     "LABEL_FONT",
  59.     "LABEL_FONT_SIZE",
  60.     "LINE_STEP",
  61.     "MAP_SCALE_FACTOR",
  62.     "MEASURE_UNIT",
  63.     "N_COPIES",
  64.     "OBLIQUE_ANOTATION",
  65.     "PAGE_COLOR",
  66.     "PAGE_ORIENTATION",
  67.     "PAPER_WIDTH",
  68.     "PSIMAGE_FORMAT",
  69.     "TICK_LENGTH",
  70.     "TICK_PEN",
  71.     "UNIX_TIME",
  72.     "UNIX_TIME_POS",
  73.     "VECTOR_SHAPE",
  74.     "VERBOSE",
  75.     "WANT_EURO_FONT",
  76.     "X_AXIS_LENGTH",
  77.     "Y_AXIS_LENGTH",
  78.     "X_ORIGIN",
  79.     "Y_ORIGIN",
  80.     "XY_TOGGLE",
  81.     "Y_AXIS_TYPE"
  82. };
  83.  
  84. double gmt_units[3] = {0.01, 0.0254, 1.0};    /* No of meters in a cm, inch, m */
  85. double gmt_ppu[3] = {72.0/2.54, 72.0, 72.0/0.0254};    /* No of points in a cm, inch, m */
  86. char *gmt_unit_names[3] = {"cm", "inch", "m"};
  87. char *gmt_choice[2] = {"OFF", "ON"};
  88. char *unique_option[N_UNIQUE] = {
  89.     "B", "JA", "Ja", "JB", "Jb", "JC", "Jc", "JE", "Je", "JG",
  90.     "Jg", "JH", "Jh", "JI", "Ji", "JK", "Jk", "JL", "Jl", "JM",
  91.     "Jm", "JN", "Jn", "JO", "Jo", "JP", "Jp", "JR", "Jr", "JS",
  92.     "Js", "JT", "Jt", "JU", "Ju", "JW", "Jw", "Jx", "JX", "Jy",
  93.     "JY", "Jz", "JZ", "R", "X", "x", "Y", "y", "#"
  94. };
  95. int gmt_days_of_month[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
  96.  
  97. int oldargc;
  98. char *oldargv[N_UNIQUE];    /* Pointers to old common arguments */
  99.  
  100. double EQ_RAD, ECC, ECC2, ECC4, ECC6, M_PR_DEG;
  101.  
  102. /*    For plotting purposes */
  103.  
  104. double *gmt_x_plot = 0;    /* Holds the x/y (inches) of a line to be plotted */
  105. double *gmt_y_plot = 0;
  106. int *gmt_pen = 0;        /* Pen (3 = up, 2 = down) for these points */
  107. int gmt_n_plot = 0;            /* Number of such points */
  108. int gmt_n_alloc = 0;        /* Size of allocated arrays */
  109. int gmt_x_status_new;        /* Tells us what quadrant old and new points are in */
  110. int gmt_y_status_new;
  111. int gmt_x_status_old;
  112. int gmt_y_status_old;
  113. int gmt_corner = 0;
  114. BOOLEAN on_border_is_outside = FALSE;    /* TRUE if a point exactly on the map border shoud be considered outside the map */
  115. BOOLEAN gmt_world_map = FALSE;    /* TRUE if map has 360 degrees of longitude range */
  116. double gmt_map_width;        /* Full width in inches of this world map */
  117. double gmt_map_height;        /* Full height in inches of this world map */
  118. double gmt_half_map_size;    /* Half width in inches of this world map */
  119. int gmt_n_colors = 0;
  120. BOOLEAN gmt_gray;        /* TRUE if only grayshades are needed */
  121. BOOLEAN gmt_b_and_w;        /* TRUE if only black and white are needed */
  122. BOOLEAN gmt_continuous;        /* TRUE if continuous color tables have been given */
  123. BOOLEAN gmt_quick = FALSE;
  124.  
  125. PFI forward, inverse;        /*    Pointers to the selected mapping functions */
  126. PFI x_forward, x_inverse;    /*    Pointers to the selected linear functions */
  127. PFI y_forward, y_inverse;    /*    Pointers to the selected linear functions */
  128. PFI z_forward, z_inverse;    /*    Pointers to the selected linear functions */
  129. PFI outside;            /*    pointer to function checking if a lon/lat point is outside map */
  130. PFI crossing;            /*    pointer to functions returning crossover point at boundary */
  131. PFI overlap;            /*    pointer to function checking for overlap between 2 regions */
  132. PFI map_clip;            /*    pointer to functions that clip a polygon to fit inside map */
  133. PFD left_edge, right_edge;    /*    pointers to functions that return left/right edge of map */
  134.  
  135. PFI gmt_input;            /* Pointer to function reading ascii or binary tables */
  136. PFI gmt_output;            /* Pointer to function writing ascii or binary tables */
  137.  
  138. struct MAP_PROJECTIONS project_info;
  139. struct MAP_FRAME frame_info;
  140. struct THREE_D z_project;
  141.  
  142. double gmt_NaN;
  143.  
  144. int grd_i_format = 0;        /* Default is GMT's cdf format */
  145. int grd_o_format = 0;
  146. double grd_in_nan_value, grd_out_nan_value;
  147.