[GRASS-user] problem in grd output file

Dylan Beaudette dylan.beaudette at gmail.com
Fri Sep 8 13:11:14 EDT 2006


On Friday 08 September 2006 12:29, temiz wrote:
> Hello
>
> I  used this command to create GMT map.
> r.out.bin -h input=elv1 output=el2.grd.
>
> But GMT's grdinfo command gives
> $ grdinfo el2.grd
> grdinfo: Not a netCDF file [el2.grd]
>
> How can I produce GMT compatible grid file?
>
> regards
>
> --
> Ahmet Temiz


Ahmet,

There are two ways to do this, both of which I will be discussing in a soon to 
be finished ;) article for the GRASS newsletter.

in summary:

#hackish way see this:
http://169.237.35.250/~dylan/grass_user_group/map1.html

#for a better approach, use r.out.bin | xyz2grd :
MAP_TYPE=`r.info -t "$output_raster" | cut -f2 -d'='`

case "$MAP_TYPE" in
	CELL)
r.out.bin input=$output_raster output=- null=-9999 | 
xyz2grd -G$output_raster.grd -R$min_x/$max_x/$min_y/$max_y -I$ewres/$nsres -ZTLh -F -N-9999
	FCELL)
		r.out.bin input=$output_raster output=- null=-9999 | 
xyz2grd -G$output_raster.grd -R$min_x/$max_x/$min_y/$max_y -I$ewres/$nsres -ZTLf -F -N-9999 ;; 
	DCELL)
		r.out.bin input=$output_raster output=- null=-9999 | 
xyz2grd -G$output_raster.grd -R$min_x/$max_x/$min_y/$max_y -I$ewres/$nsres -ZTLd -F -N-9999 ;; 
esac


attached is a sample script, which will be presented in the newsletter article 
soon.




-- 
Dylan Beaudette
Soils and Biogeochemistry Graduate Group
University of California at Davis
530.754.7341
-------------- next part --------------
A non-text attachment was scrubbed...
Name: template.sh
Type: application/x-shellscript
Size: 15369 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/grass-user/attachments/20060908/6ca04452/template.bin


More information about the grass-user mailing list