[GRASS-user] about r.out.GMT

Dylan Beaudette dylan.beaudette at gmail.com
Fri Oct 20 14:20:05 EDT 2006


On Friday 20 October 2006 02:28, Huidae Cho wrote:
> On Fri, Oct 20, 2006 at 10:22:27AM +0200, mrigotti at agrsci.unibo.it wrote:
> > Hi,
> >
> > I have some issues using the r.out.GMT addons, using grass63-cvs.
> > Basically, the addons works, and I get two files, a file.grd a file.cpt,
> > which I use with the following commands to directly display with GMT
> > (4.1.2):
> >
> > grdimage file.grd -R689000/710000/4895000/4920000 -Jx1:100 -Cfile.cpt -P
> > -V
> >
> > >map.ps
> >
> > Unfortunately, I then get this error message:
> >
> > grdimage: Allocates memory and read data file
> > grdimage: Not a netCDF file [slp_GMT.grd]
> >
> > I was wondering why this happens, given that the addons should produce a
> > compatible grd file to be used with GMT.
> > Is it that I'm missing something? Can you help me?
>
> You need to add a map type to the file name.  If the original map is in
> CELL format, "grdimage file.grd=2 ...", otherwise "gridimage file.grd=1
> ..." is correct.
>
> > By the way, I also used v.out.GMT, aand it works fine, except for the
> > fact that I got a compatibility error message, which was solved after I
> > deleted the first line of the xy file produced by the addons, which only
> > contained the '>' character.
>
> v.out.gmt supports multiple polylines using the '>' flag.  You have to
> specify -M option for psxy to work.
>
> If you're not sure, use -p flag when running [rv].out.gmt to see GMT
> commands.
>
> Huidae
>
> > Hope you can help,
> > thanks,
> > Marco
> >

Nice to see that there has been some development in connecting GRASS and GMT . 
I have some updates for the r.out.gmt script which make the output grid files 
directly readable by all GMT apps. Perhaps Hamish and I can work out a good 
time to merge the changes. As far as I know, there are still some issues with 
the automatic creation of CPT files, used by GMT for color lookup.

I wasn't aware of the v.out.GMT script - I will have to take a look, as it is 
something that I have been meaning to do for quite some time now. 

I'll post back with details once my changes are merged into the r.out.gmt 
script.

Cheers,

-- 
Dylan Beaudette
Soils and Biogeochemistry Graduate Group
University of California at Davis
530.754.7341




More information about the grass-user mailing list