GRASS to GMT?

Stephan Eickschen eicksch at gfz-potsdam.de
Mon Oct 16 04:12:11 EDT 2000


David

> Has anyone written a GRASS script to dump a raster
> grid into a format ready for GMT?
I did ...

> It seems to me that it
> wouldn't take much effort to tap into GMT's plotting
> prowess by writing an r.out.gmt tool which would
> format the GMT header by reading the WIND files and
> then write out the binary stream in GMT format.
GMT (the Generic Mapping Tools) uses the NETcdf format
so such a program would make use of the NETcdf library
and might be better called r.out.cdf. gmt as a file
format is used by the "marine geophysical database"
supplementary GMT programs. From the "README.mgg":
>         These programs are intended for use with the marine geophysical
> data base files known as GMT-files.  These GMT-files are written using
> a native binary data format.  These data files are NOT supplied with
> GMT, but we provide you with a program (mgd77togmt) that allows you to
> create your own GMT-files from the MGD-77 standard exchange format files
> provided by the National Geophysical Data Center*.

I will try to remember it tonight at home to serach for the
script. Basically it is something like

#!/bin/csh -f

set reginc=`g.region -g | awk '{ (this-i-don't-remember) }'`
r.stats -1lg <rastermap> | xyz2grd -$reginc -Graster.grd

> Maybe even translating the colormap would be possible?!
That would be nice, indeed!

Regards,

	Stephan

-- 
----------------------------------------------------------------------
Stephan Eickschen                      Tel. :      +49 (0)8153 28-1351
GeoForschungsZentrum Potsdam (GFZ)     Fax. :      +49 (0)8153 28-1207
Division 1, Section 1.2
c/o                                    email:   eicksch at gfz-potsdam.de
DLR Oberpfaffenhofen                   www  : http://op.gfz-potsdam.de
Box 1116
82234 Wessling
Germany
----------------------------------------------------------------------




More information about the grass-user mailing list