GSJ Open-File Report, no. 442 August, 2006

Library Software for Geophysical Data Processing and Representation (2)

Tadashi Nakatsuka (Institute of Geology and Geoinformation, GSJ/AIST)

Japanese

1. Introduction

  We have been engaged in the research on aeromagnetic survey. During the course of our work, various softwares were developed, and some of them are so versatile that its publication will be beneficial to another people. Here the library software consisting of many subprograms is reported.
  This report is a revised version for the previous GSJ Open-File Report no. 400 (Nakatsuka, 2003). The points of revision are
    1) addition of perspective (oblique grid) representation in coutour/color-grading map,
    2) improved data precision of coastlines, rivers/lakes, and prefecture boundaries,
    3) repleted utility program including BATCH process support,
    4) known bugs were fixed,
    5) provision of manual HTMLs.

2. Outline of the Library Software

  This library 'libgm' consists of versatile subprograms coded in C language, with proper interfaces with FORTRAN language. There are 13 subprograms listed bellow, and each has multiple entry point names to realize various function systemtically.
  In the Geological Survey of Japan, a library software called "GSJLIB" (Nakatsuka et al., 1986, 1990) was developed, and the ideas in it are also succeeded in our library. The subprogram calculating IGRF is taken from the report by Nakatsuka (2005).
  Manual ducumentations by Adobe Systems Inc. (1990, 1994) were informative for the coding of subprograms generating PostScript output.

3. Files included in this Report

  All subprograms are coded in C language, and the filenames of sources have .c (specifier) extensions. There are also HTML documentations (manual) how to use the library subprograms. The trailing E.html (specifier) indicates English documentation HTML, while those without "E" are in Japanese. Some utility programs are also stored as an appendix.
  All the contents of this report are stored in a CD-ROM with a tree structure bellow.

  In actual environment of utilizing the software, the directories lib, prog and data are assumed to be stored under the directory path of /home/SHARE.

        <<< Tree structure of files included in this report >>>
(root)
 +-- openfile0442index.html  Cover page HTML (in Japanese)
 +-- index.html      Introduction HTML in English (This document)
 +-- indexJ.html     Introduction HTML in Japanese
 +-- man.tgz         Gzipped Tar Archive of the directory 'man'
 |                     (Equivalent to whole 'man' directory)
 +-- lib.tgz         Gzipped Tar Archive of the directory 'lib'
 |                     (Equivalent to whole 'lib' directory)
 +-- prog.tgz        Gzipped Tar Archive of the directory 'prog'
 |                     (Equivalent to whole 'prog' directory)
 +-- shore.tgz       Gzipped Tar Archive of the directory 'data/shore'
 |                     (Equivalent to whole 'data/shore' directory)
 +-- igrfcf.tgz      Gzipped Tar Archive of the directory 'data/IGRFCOEF'
 |                     (Equivalent to whole 'data/IGRFCOEF' directory)
 |
 +-- man/           (Directory containing Manual HTMLs)
 |    +-- libf.html       Index to manual pages (for FORTRAN) (in Japanese)
 |    +-- libfE.html      Index to manual pages (for FORTRAN) (in English)
 |    +-- libc.html       C language prototype and summary (in Japanese)
 |    +-- libcE.html      C language prototype and summary (in English)
 |    |
 |    +-- axis.html, calma.html, cont.html, igrf.html,     |
 |    |    lwkdir.html, pspaint.html, psplot.html,         | Manual pages for
 |    |     ptext.html, rand.html, sml.html,               |  each subprogram
 |    |      wshore.html, xw84t.html, xyconv.html          |   (in Japanese)
 |    |
 |    +-- axisE.html, calmaE.html, contE.html, igrfE.html, |
 |    |    lwkdirE.html, pspaintE.html, psplotE.html,      | Manual pages for
 |    |     ptextE.html, randE.html, smlE.html,            |  each subprogram
 |    |      wshoreE.html, xw84tE.html, xyconvE.html       |   (in English)
 |    |
 |    +-- prog.html       Description of utility programs (in Japanese)
 |    +-- progE.html      Description of utility programs (in English)
 |    +-- samples.f       FORTRAN program to generate Manual Page illustrations
 |    +-- figs/          (Directory containing Manual Page illustrations)
 |         +-- axis.png, cont.png, csymbl.png,             |
 |              gsymbl.png, pmark.png, pspaint.png,        | Manual page
 |               ptext1.png, ptext2.png, test.png,         |  illustrations
 |                wshore.png                               |
 |
 +-- lib/           (Directory containing Library program sources)
 |    +-- @mkall          Script to make Library Archive file 'libgm.a'
 |    +-- axis.c, calma.c, cont.c, igrf.c, lwkdir.c,       |
 |         pspaint.c, psplot.c, ptext.c, rand.c,           | Source of
 |          sml.c, wshore.c, xw84t.c, xyconv.c             |  each subprogram
 |
 +-- prog/          (Directory containing Misc.Utility program sources)
 |    +-- @mkall          Script to make all Executable files
 |    +-- cats.c, cat4.c, cat8.c, euc.c, sj.c, jis.c,      |
 |         jisx.c, cview.c, uncview.c, hdumpe.c,           | Source of
 |          prtps.c, igrfcal.c, utmcal.c, xycal.c,         |  each utility
 |           cxtw84.c, cxw84t.c, job.c, job1.c             |   program
 |
 +-- data/          (Directory containing various Data)
      +-- shore/         (Directory containing Coastline data etc.)
      |    +-- SH20/, SH21/, SH22/, SH23/, SH24/,  |
      |    |    SH25/, SH26/, SH27/, SH28/, SH29/, | Directories containing
      |    |    SH30/, SH31/, SH32/, SH33/, SH34/, |  coastlines, rivers/lakes,
      |    |    SH35/, SH36/, SH37/, SH38/, SH39/, |  pref.boundary data (fine)
      |    |    SH40/, SH41/, SH42/, SH43/, SH44/, |  in Old-TOKYO coordinates
      |    |    SH45/, SH46/, SH47/, SH48/, SH49/  |  for each Latitude zone.
      |    |
      |    +-- SW20/, SW21/, SW22/, SW23/, SW24/,  |
      |    |    SW25/, SW26/, SW27/, SW28/, SW29/, | Directories containing
      |    |    SW30/, SW31/, SW32/, SW33/, SW34/, |  coastlines, rivers/lakes,
      |    |    SW35/, SW36/, SW37/, SW38/, SW39/, |  pref.boundary data (fine)
      |    |    SW40/, SW41/, SW42/, SW43/, SW44/, |  in WGS-84 coordinates
      |    |    SW45/, SW46/, SW47/, SW48/, SW49/  |  for each Latitude zone.
      |    |
      |    +-- wcoast.jpn      Coastlines data (coarse) of Japan
      |    +-- wriver.jpn      Rivers/lakes data (coarse) of Japan
      |    +-- world.cst       Coastline data of the world
      |
      +-- IGRFCOEF/       (Directory containing IGRF coefficients data)
           +-- igrf01.coef, igrf02.coef, igrf03.coef,      | Gauss Coefficients
                igrf04.coef, igrf05.coef, igrf06.coef,     |  data for each 
                 igrf07.coef, igrf08.coef, igrf09.coef,    |  Generation of
                  igrf10.coef                              |  IGRF

4. Manual Documentation

  Manual ducumentations how to use this library from a FORTARN language program are included in this report in the form of HTML files. As the further detail adjustment or advanced use of the libarary might be possible from C language program, a brief documentation on the prototype definitions and the summary of functions is provided. The explanation of the miscellaneous utility program (appendix) is also available.

  Library Manual
(for FORTRAN)
Prototype & Summary
(for C language)
Appendix Utility
Brief explanation
Japanese   libf.html   libc.html   prog.html
English   libfE.html   libcE.html   progE.html

5. Coastlines etc. Data for "WSHORE"

  This library includes the subprogram WSHORE drawing coastlines, rivers/lakes, and prefecture boundaries. This program assumes that the coordinates values of coastlines etc. are stored in the '/home/SHARE/data/shore' directory.
  In this open-file report, the data from authoritative institutions bellow have been re-constructed into smaller files under the 'data/shore' directory, with a reduced accuracy, which can be used easily by adjusting directory location setting. The resolution of actual data included in this report is 0.01 minute in latutude and longitude for larger scale drawing, and 1 minute for smaller scale.

The source data used in this report for coastlines etc.:
 1. Shorelines and Administrative Boundaries data from "Digital Map 25000 (Spatial Data Framework)" by the Geographical Survey Institute, Japan (*)
(http://www.gsi.go.jp/MAP/CD-ROM/25000outline/25000outline.htm : in Japanese)
2. World coastline data from "Coastline Extractor" by NGDC/NOAA
(http://rimmer.ngdc.noaa.gov/mgg/coast/getcoast.html)
(*)
"Digital Map 25000 (Spatial Data Framework)" data was utilized under the permission by the Director General, Geographical Survey Institute, Japan. (Approval Number: HEI 18 SOUSHI no. 190)

References

  1. Nakatsuka, T., T. Miyazaki, N. Ando, Y. Kinugasa, and I. Sato (1986) Computer subprogram library "GSJLIB" at the Geological Survey of Japan. GSJ Open-File Report, no. 25, 156p., Geol. Surv. Japan.
  2. Nakatsuka, T., T. Miyazaki, N. Ando, Y. Kinugasa, and I. Sato (1990) Computer subprogram library "GSJLIB" at the Geological Survey of Japan (second version). 164p., Geol. Surv. Japan.
  3. Nakatsuka, T. (2003) Library Software for Geophysical Data Processing and Representation. GSJ Open-File Report, no. 400, 86p.+ 1 CD-ROM, Geol. Surv. Japan, AIST.
  4. Nakatsuka, T. (2005) Calculation of the International Geomagnetic Reference Field (4). GSJ Open-File Report, no. 423, 39p.+ 1 Diskette, Geol. Surv. Japan, AIST.
  5. Adobe Systems Incorporated (1990) PostScript language tutorial and cookbook. 16th printing, 244p., Addison-Wesley Publishing.
  6. Adobe Systems Incorporated (1994) PostScript language reference manual, 2nd ed. 11th printing, 765p., Addison-Wesley Publishing.