Takenaka Mapper -- Tmap ver.3.0 C²
==================================

Original design and implementation by Hideaki Takenaka.
Refined by Chappy & Claudy.

Tmap reads a headerless big-endian Float32 raster and draws a JPEG or PNG
image with latitude/longitude labels, a color bar, and coastlines.


1. Download sample data
-----------------------

Ubuntu:

  wget -c ftp://amaterass.cr.chiba-u.ac.jp/quasi-realtime/himawari829/archived/FD/201605/20160519/201605190300.dwn.sw.flx.sfc.fld.4km.bin.bz2
  bunzip2 201605190300.dwn.sw.flx.sfc.fld.4km.bin.bz2

Fedora:

  curl -O ftp://amaterass.cr.chiba-u.ac.jp/quasi-realtime/himawari829/archived/FD/201605/20160519/201605190300.dwn.sw.flx.sfc.fld.4km.bin.bz2
  bunzip2 201605190300.dwn.sw.flx.sfc.fld.4km.bin.bz2

Windows 10/11:

  curl.exe -O ftp://amaterass.cr.chiba-u.ac.jp/quasi-realtime/himawari829/archived/FD/201605/20160519/201605190300.dwn.sw.flx.sfc.fld.4km.bin.bz2

After downloading on Windows, extract the .bz2 file with 7-Zip or another
bzip2-compatible program.


2. Try tmap
-----------

Compile:

  javac *.java

Draw the sample data:

  java tmap 201605190300.dwn.sw.flx.sfc.fld.4km.bin 1400 0 7 1 auto jpg 60 120 6 85 120 6

The output image is:

  201605190300.dwn.sw.flx.sfc.fld.4km.bin.jpg

The sample covers 60N--60S and 85E--155W.


3. Usage
--------

  java tmap file max min color_div unit coast_color|auto type north lat_span lat_div west lon_span lon_div [side | width height] [coast_width=auto|1..12]

Arguments:

  file         Input file
  max          Maximum value of the color scale
  min          Minimum value of the color scale
  color_div    Number of color-scale divisions
  unit         Unit number or free text
  coast_color  auto, or grayscale from 0 (black) to 1 (white)
  type         jpg, jpeg, or png
  north        Northern edge in degrees
  lat_span     Latitude range in degrees
  lat_div      Number of latitude divisions
  west         Western edge in degrees east
  lon_span     Longitude range in degrees
  lon_div      Number of longitude divisions

For a square raster, tmap determines the grid size from the file size.

For a non-square raster, add its width and height:

  java tmap file max min color_div unit coast_color type north lat_span lat_div west lon_span lon_div width height

Coastline width is normally selected automatically. It can be specified with
one additional named argument:

  coast_width=3


4. Reserved unit numbers
------------------------

   0  None
   1  W/m^2
   2  um
   3  K
   4  km
   5  m/s
   6  kW/kWp
   7  deg
   8  hPa
   9  g/m^2
  10  %

Text may be entered instead of a reserved number.


5. Input data
-------------

  Data type:   IEEE 754 Float32
  Byte order:  big-endian
  Layout:      headerless, row-major flat binary

Very large rasters may need a larger Java heap. Example:

  java -Xmx1g tmap ...


6. Coastline data
-----------------

Tmap uses the bundled GSHHG coastline data. Coastline rasters are created in
cache/coastline/ when needed and reused later. The cache directory may be
deleted safely; tmap will recreate it.

See THIRD_PARTY_NOTICES.txt and config/gshhg/ for the GSHHG notices and
license.


7. License
----------

The Tmap software is distributed under the MIT License. See LICENSE.txt.

The bundled GSHHG data are distributed under their own license. The MIT
License does not replace or modify the GSHHG license terms.
