gray2rgb: Command-line tool to convert greyscale, geo-referenced raster files to RGB, colorizing the original file through a color ramp definition specified in a CSV file.

A) Usage
   gray2rgb [-v] [-nd #r,#g,#b] -i <infile.xyz> -o <outfile.tif> -c <colorfile.csv>
      
      o Input file can be any format that GDAL supports, Output file is GeoTiff.
      o Geo-Information will be copied 1:1
      o Colorfile is a CSV-file with each line having the format:
        R,G,B,Start Height,End Height
        See below for details.
      o Optional paramters:
        -v: Print version and input/output image information.
        -nd: RGB value for 'No Data Value' in the output file. E.g.: -nd 255,255,255
             If omitted, <255,255,255> is the default.
             

B) CSV file
    The structure of the CSV-File must be as follows:
    1) All lines with an alphanumeric character at the start are ignored (for descriptions,
       field names, etc.)
    2) Consecutive lines must have their fields in the order: R,G,B,Start Height,End Height
    3) No more than 255 lines
    4) Fields can be separated by commas or semicolons
    5) Height intervals need not to be in order, eg: line with the values for 100-200 can come
       before line with the values for 50-99
    6) Values must not overlap, i.e. if there's one line for height range 100-200, there shall
       be no range 200-300, but 201-300
    7) If <Start Height> is larger than <End Height>, the values will simply be swapped.
    7) Height values should be adapted to the Geo-Information in the input file. I.e. in a 8bpp image, you have only 
       values between 0 and 255 for each pixel, so it doesn't make sense to define a height range between eg. 800 and 
       1000 in the CSV file. The program won't scale the values of the CSV file to fit in the value range of the 
       input image.

c) Example Usage
   To convert file 'a.tif' to 'b.tif', utilizing 'mycolors.csv' with 'No Data' value set to 
   <255,234,222>, type:
   gray2rgb -i a.tif -o b.tif -c mycolors.csv -nd 255,234,222
   
    (c) 2006 by Alexander von Lnen
