DRAW Coastline / Lakes and Rivers / Prefecture boundary (WSHORE)


WSHORE, RSHORE, PSHORE
NAME
     wshore - Draw coast, lake and rivers with small scale
     rshore - Define the range to draw coastlines etc. by 'pshore'
     pshore - Draw coast, lake, rivers, prefecture boundary with larger scale

    All the data used to draw coastlines etc. are stored under the directory
  /home/SHARE/data/shore/.  The coarse data files "wcoast.jpn", "wriver.jpn",
  and "world.cst" contain Lat. and Lon. values (in minutes, integer) and are
  used by 'wshore'.  This data does not have the resolutiuon of distinguishing
  the geodetic system.
    The data used by 'pshore' are stored with subdirectory structure of the
  name Z?? and t??, and the filenames NiiEkkk.coast, NiiEkkk.river, and
  NiiEkkk.prefb for each 1 deg.Lat. x 1 deg.Long. area, SW corner of which is
  ii deg.N Lat. and kkk deg.E Long.  Here the filename extensions .coast,
  .river, and .prefb indicate coastlines data, rivers and lakes, and
  prefecture boundaries, respectively.  The subdirectory Z?? cooresponds to
  the WGS position data of UTM zone ??, and t?? to Tokyo datum positions.
  The contents of those files are the sequence of curve data, and a curve data
  is composed of multiple pairs of Lat. and Long. (node) data (in 0.01 minute,
  integer relative to SW corner of the area) preceded by the number of pairs
  constituting the curve.
    Users may place their own data of drawing coastlines etc. by 'pshore'
  under the directory /home/SHARE/data/shore/ (as defined by symbolic constant
  DIRSHORE in 'wshore.c' source), with subdirectory tree structure with UTM
  zone number, and naming rule of data files above.   [For southern hemisphere
  N?? may be alternated by S?? (south latitude), and also E### by W### (west
  longitude) for western hemisphere (still corresponding to SE corner of the
  range).]

SYNOPSIS

      call rshore(m, is, in, kw, ke)
  m           [int]   Specify whether WGS (m=1) or old Tokyo Datum (m=0) to
                      use as a reference geodetic system.
                      Must be m=1 or m=0.
  is, in      [int]   Specify South bound and North bound latitudes to draw.
  kw, ke      [int]   Specify West bound and East bound longitudes to draw.
                  This assignement is effective only for 'pshore' drawing.
                  Map data for Larger scale are prepared only around Japan
                (Latitude range of 20-50 deg.N and Longitude range of 120-155
                deg.E), although users can place their own data to expand.

      external conv
      call wshore(xorg, yorg, mpen, scl, conv)
      call pshore(xorg, yorg, mpen, scl, conv)
  xorg, yorg  [float] Coordinates (in cm) of the origin in the drawing.
  mpen        [int]   Specify pen numbers to draw  coast / lakes and rivers /
                      prefecture boundary  in the form of 3 digits number:
                      pen numbers for  prefecture boundary / lakes and rivers
                      / coast  on the digits of  100 / 10 / 1 , respevtively.
                      If a digit is 1-8, lines are drawn by its pen number,
                      and if it is 0 corresponding information is not drawn.
                      As a special case for 'wshore', mpen=99 or mpen=999 is
                      accepted to draw the coast of world with the current pen,
                      for the range of 0 deg. to 360 deg. Long. (Pacific mode)
                      [mpen=99] or for the range of -180 deg. to +180 deg.
                      (Atlantic mode) [mpen=999].
  scl         [float] Reduction rate.  Coordinate values of scl given by 'conv'
                      is represented by 1 cm of length on the drawing.
                      (If the coordinate values are in km, the drawing scale is
                       1 : (scl*100,000) .)
  conv    [ext.symb.] External procedure name to define projection, i.e.,
                      the name of subroutine with 4 arguments as follows:
                         subroutine conv(alat, alon, xe, yn)
                      where Lat. (alat) and Lon. (alon) [in minutes] is
                      converted into drawing coordinates toward right (xe)
                      and upward (yn).
               This argument 'conv' may be user-defined, or the Map Projection
               (XYCONV) 'cviken' routine is useful for this purpose.  Here,
               the projection number, origin, etc. must be assigned at calling
               'cvinit', and its geodetic system should coincide with the
               selection by calling 'rshore'.

EXAMPLE

!----------
  external cviken
  call cvinit(100, 35.*60., 135.*60., 0., 0.)
  call psopn("wshore.ps","A4P")
  call plots(2., 2.)
  call plot(8., 7., -3)
  call wshore(0., 0., 12, 250., cviken)
  do i=20,50,5
    call cviken(float(i*60), 7200., xe, yn)
    call plot(xe/250., yn/250., 3)
    do k=121,155
      call cviken(float(i*60), float(k*60), xe, yn)
      call plot(xe/250., yn/250., 2)
    enddo
  enddo
  do k=120,155,5
    call cviken(1200., float(k*60), xe, yn)
    call plot(xe/250., yn/250., 3)
    do i=21,50
      call cviken(float(i*60), float(k*60), xe, yn)
      call plot(xe/250., yn/250., 2)
    enddo
  enddo
  call plot(0., 16., -3)
  call wrect(-8., -8., 16., 10.)
  call scisor(-8., -8., 16., 10.)
  call cvinit(253, 0., 0., 0., 0.)
  call cviken(float(35*60), float(135*60), xo, yo)
  call rshore(1, 34, 36, 133, 136)
  call pshore(-xo/12., -yo/12., 212, 12., cviken)
  call plot(-8., 0., 3)
  do k=-90,90
    call cviken(float(35*60), float(135*60+k), xe, yn)
    call plot((xe-xo)/12., (yn-yo)/12., 2)
  enddo
  do k=134,136
    call plot(0., -8., 3)
    do i=-60,30
      call cviken(float(35*60+i), float(k*60), xe, yn)
      call plot((xe-xo)/12., (yn-yo)/12., 2)
    enddo
  enddo
  call plote
  call pscls
  stop
  end