The VMF format is a convenient ASCII vector map format which has been 
designed to work with sunclock. It has been originally inspired by the
algorithms used by xearth ((C) Kirk Lauritz Johnson) to encode Earth 
regions - however, many changes have been introduced later, so that not 
much of the original remains...

We come to the precise VMF specifications

==============================================================================


%!VMF is the initial signature for the format

Any character # indicates a comment until a newline character is found

The first two data specified should be 2 numbers:
 num_colors  (number of distinct colors used in the map)
 max_palette (number of color codes -- ranging from 0 to max_palette-1)

Then, a list of <num_colors> explicit RGB values or conventional names
of colors should follow, in the format understood by the XAllocNamedColor()
Xlib routine.
 
The next value is the default color. Colors are indicated by their index in
the range  0 .. N  where N = num_colors-1

The next data are the palette values, given in the form  
(color --> list of codes):
c0  j1 j2 j3 ...
c1  k1 k2 ...
c2  l1 l2 l3 l4
c4  ...
(etc)
cN  u1 u2 ...
.

Do not forget the final point to indicate that the palette values are complete.
The meaning of this is that codes j1 j2 j3 will be attributed color 0
(first listed color), codes k1 k2 will be attributed color 1 (second listed
color), etc. All codes should be in the range 0 .. max_palette-1

The next value is the "background value", that is the color code which will
be affected to all pixels, before the codes are modified by drawing objects 
on the map.

Follows a line indicating four float values
  phi_min phi_max  theta_min theta_max
which sets the range in which the latitude phi and longitude vary, normally
  -90.0 90.0 -180.0 180.0

The next data are arrays of float values, defining closed curves drawn on 
the map. The vector map algorithm fills the interior of each curve with a 
prescribed color, and leaves the outside of the curve 
unmodified; however, if some pixels in the interior already carry colors, 
the effect of the coloring scheme is to combine colors together -- 
precisely by adding their codes.

 - the beginning of an array is marked by the symbol < and the end by >
 - the next symbol is an integer value, representing the color code with a 
   plus or minus sign, depending e.g. on whether the curve should add a new
   domain with the given color code, or should dig a hole in a previously
   drawn domain with the given color code.
 - the next values are the point coordinate values [phi, theta] 
   phi the latitude (normally between -90 and 90)
   and theta is the longitude (normally between -180 and 180 degrees)
 - normally, the curves should be non-self-intersecting and traced in a
   counter-clockwise orientation (An incorrect orientation can be
   coped with by negating the corresponding color code).
 - if there are several curves bounding overlapping domains, the color code
   obtained in the intersection is just the sum of color codes produced
   by each curve (that is, the color code in the interior of the curve and
   0 outside). In that case, it might be preferable to use color codes which
   are e.g. powers of 2 (or more), so that colors don't mix without things
   being controllable. The practical limit on the code values is 2^15-1.

The end of the file is marked as usual by the keyword 'end'




